Skip to content

Commit

Permalink
Update message verify data hash
Browse files Browse the repository at this point in the history
Ensure data can be retrieved via symbol keys. When enabling the Rails
7.1 framework default data will be returned with string keys.
  • Loading branch information
gbp committed Jan 9, 2025
1 parent 24cdb7c commit 0dad6d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/post_redirect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ def local_part_uri
def email_token_valid?
return true unless PostRedirect.verifier.valid_message?(email_token)

data = PostRedirect.verifier.verify(email_token, purpose: circumstance)
data = PostRedirect.verifier.verify(email_token, purpose: circumstance).
symbolize_keys
user.id == data[:user_id] && user.login_token == data[:login_token]
end

Expand Down

0 comments on commit 0dad6d5

Please sign in to comment.