mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
generated session ids should be encoded as UTF-8
This commit is contained in:
parent
12ae92216b
commit
199c0bb338
1 changed files with 3 additions and 1 deletions
|
@ -29,7 +29,9 @@ module ActionDispatch
|
|||
end
|
||||
|
||||
def generate_sid
|
||||
ActiveSupport::SecureRandom.hex(16)
|
||||
sid = ActiveSupport::SecureRandom.hex(16)
|
||||
sid.encode!('UTF-8') if sid.respond_to?(:encode!)
|
||||
sid
|
||||
end
|
||||
|
||||
protected
|
||||
|
|
Loading…
Reference in a new issue