mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Return 400 instead of 404 for bad token
This commit is contained in:
@@ -382,10 +382,9 @@ class Guardian
|
||||
end
|
||||
|
||||
def auth_token
|
||||
return nil if !request&.cookies[Auth::DefaultCurrentUserProvider::TOKEN_COOKIE]
|
||||
|
||||
cookie = request.cookies[Auth::DefaultCurrentUserProvider::TOKEN_COOKIE]
|
||||
UserAuthToken.hash_token(cookie)
|
||||
if cookie = request&.cookies[Auth::DefaultCurrentUserProvider::TOKEN_COOKIE]
|
||||
UserAuthToken.hash_token(cookie)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user