diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-03-19 16:28:15 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-03-19 16:31:57 -0300 |
commit | 6e04a78462cc41160c094f79cb3433051c38369f (patch) | |
tree | c6db5898cdbd709f10c02e6691600474d2d59335 /actionpack/lib/action_dispatch/middleware | |
parent | 139bf55b26e3a415c11fcf631c2dead81bd9df67 (diff) | |
download | rails-6e04a78462cc41160c094f79cb3433051c38369f.tar.gz rails-6e04a78462cc41160c094f79cb3433051c38369f.tar.bz2 rails-6e04a78462cc41160c094f79cb3433051c38369f.zip |
Fix secure cookies when there are more than one space before the secure
keyword
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/ssl.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/ssl.rb b/actionpack/lib/action_dispatch/middleware/ssl.rb index 39b27ecbf9..9098f4e170 100644 --- a/actionpack/lib/action_dispatch/middleware/ssl.rb +++ b/actionpack/lib/action_dispatch/middleware/ssl.rb @@ -58,7 +58,7 @@ module ActionDispatch cookies = cookies.split("\n") headers['Set-Cookie'] = cookies.map { |cookie| - if cookie !~ /; secure(;|$)/ + if cookie !~ /;\s+secure(;|$)/ "#{cookie}; secure" else cookie |