1
0
Fork 0
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:
Aaron Patterson 2011-04-14 11:27:27 -07:00
parent 12ae92216b
commit 199c0bb338

View file

@ -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