We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 095cf91 commit 76e971eCopy full SHA for 76e971e
actionpack/lib/action_controller/session/cookie_store.rb
@@ -168,8 +168,8 @@ def clear_old_cookie_value
168
if "foo".respond_to?(:force_encoding)
169
# constant-time comparison algorithm to prevent timing attacks
170
def secure_compare(a, b)
171
- a = a.force_encoding(Encoding::BINARY)
172
- b = b.force_encoding(Encoding::BINARY)
+ a = a.dup.force_encoding(Encoding::BINARY)
+ b = b.dup.force_encoding(Encoding::BINARY)
173
174
if a.length == b.length
175
result = 0
0 commit comments