1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-05 17:05:03 -05:00

Change cookie name to prevent name collision.

E.g.: Couchpotato
This commit is contained in:
Alexandre Beloin 2015-02-09 12:41:31 -05:00
parent c62d8f2c79
commit d0152e898c

View File

@ -192,7 +192,7 @@ class BaseHandler(RequestHandler):
def get_current_user(self, *args, **kwargs):
if not isinstance(self, UI) and sickbeard.WEB_USERNAME and sickbeard.WEB_PASSWORD:
return self.get_secure_cookie('user')
return self.get_secure_cookie('sickrage')
else:
return True
@ -269,14 +269,14 @@ class LoginHandler(BaseHandler):
if api_key:
remember_me = int(self.get_argument('remember_me', default=0) or 0)
self.set_secure_cookie('user', api_key, expires_days=30 if remember_me > 0 else None)
self.set_secure_cookie('sickrage', api_key, expires_days=30 if remember_me > 0 else None)
self.redirect('/home/')
class LogoutHandler(BaseHandler):
def get(self, *args, **kwargs):
self.clear_cookie("user")
self.clear_cookie("sickrage")
self.redirect('/login/')
class KeyHandler(RequestHandler):