mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Sign the auth token cookie and make it httpOnly
This commit is contained in:
@@ -117,7 +117,7 @@ class ApplicationController < ActionController::Base
|
||||
user.auth_token = SecureRandom.hex(16)
|
||||
user.save!
|
||||
end
|
||||
cookies.permanent[:_t] = user.auth_token
|
||||
cookies.permanent.signed[:_t] = { :value => user.auth_token, :httponly => true }
|
||||
end
|
||||
|
||||
# This is odd, but it seems that in Rails `render json: obj` is about
|
||||
|
||||
Reference in New Issue
Block a user