diff options
author | Matthew Draper <matthew@trebex.net> | 2015-06-16 04:25:02 +0930 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2015-06-16 04:25:02 +0930 |
commit | c5152dd8031a5c2010b74a5388a8044fa6ef150c (patch) | |
tree | 083341f97f7e000723ac89838aecea5397592881 /activesupport/test | |
parent | feff9595fb1d79885ffc36d8b1a0f16d277de5a9 (diff) | |
parent | 4092f997f0c54564fea9ce68c2cf14d81c65ce87 (diff) | |
download | rails-c5152dd8031a5c2010b74a5388a8044fa6ef150c.tar.gz rails-c5152dd8031a5c2010b74a5388a8044fa6ef150c.tar.bz2 rails-c5152dd8031a5c2010b74a5388a8044fa6ef150c.zip |
Merge pull request #20440 from repinel/fix-message-verifier-encoding-issue
Fix the message verifier encoding issue
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/message_verifier_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/test/message_verifier_test.rb b/activesupport/test/message_verifier_test.rb index 6c3519df9a..668d78492e 100644 --- a/activesupport/test/message_verifier_test.rb +++ b/activesupport/test/message_verifier_test.rb @@ -24,6 +24,7 @@ class MessageVerifierTest < ActiveSupport::TestCase data, hash = @verifier.generate(@data).split("--") assert !@verifier.valid_message?(nil) assert !@verifier.valid_message?("") + assert !@verifier.valid_message?("\xff") # invalid encoding assert !@verifier.valid_message?("#{data.reverse}--#{hash}") assert !@verifier.valid_message?("#{data}--#{hash.reverse}") assert !@verifier.valid_message?("purejunk") |