Skip to content

Remove html_safe from password reset error messages#23

Merged
dadachi merged 1 commit intomainfrom
fix_html_safe_xss
Mar 12, 2026
Merged

Remove html_safe from password reset error messages#23
dadachi merged 1 commit intomainfrom
fix_html_safe_xss

Conversation

@dadachi
Copy link
Copy Markdown
Contributor

@dadachi dadachi commented Mar 12, 2026

Summary

  • Remove .join("<br/>").html_safe from render_update_error in ShopkeeperAuth::PasswordsController, use .to_sentence instead
  • Change render_not_found_error to return generic success response, preventing email enumeration
  • Enable check_current_password_before_update = :password in devise_token_auth config
  • Add test for password update validation failure and update non-existent email test

Test plan

  • bin/rubocop — no style violations
  • bin/brakeman — no security warnings
  • bin/rails test — full test suite passes (338 tests, 0 failures)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dadachi dadachi merged commit 74dd57f into main Mar 12, 2026
3 checks passed
@dadachi dadachi deleted the fix_html_safe_xss branch March 12, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant