mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-30 01:08:32 -05:00
Make the admin cookie HTTP only.
This commit is contained in:
@@ -894,7 +894,8 @@ class RedditController(MinimalController):
|
||||
@staticmethod
|
||||
def enable_admin_mode(user, first_login=None):
|
||||
# no expiration time so the cookie dies with the browser session
|
||||
c.cookies[g.admin_cookie] = Cookie(value=user.make_admin_cookie(first_login=first_login))
|
||||
admin_cookie = user.make_admin_cookie(first_login=first_login)
|
||||
c.cookies[g.admin_cookie] = Cookie(value=admin_cookie, httponly=True)
|
||||
|
||||
@staticmethod
|
||||
def remember_otp(user):
|
||||
|
||||
Reference in New Issue
Block a user