From 7413b3864023f3029092f96a340789e4f8a0cbff Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 1 Mar 2015 11:01:43 +0800 Subject: [PATCH] Remove requirement for username to be provided on login page Change login parameter descriptions on Config / General --- gui/slick/interfaces/default/config_general.tmpl | 4 ++-- gui/slick/interfaces/default/login.tmpl | 2 +- sickbeard/webserve.py | 5 +---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/gui/slick/interfaces/default/config_general.tmpl b/gui/slick/interfaces/default/config_general.tmpl index 0d4b7e11..8a9f77e9 100644 --- a/gui/slick/interfaces/default/config_general.tmpl +++ b/gui/slick/interfaces/default/config_general.tmpl @@ -333,7 +333,7 @@ Username -

blank = disable SickGear login

+

blank for none

@@ -343,7 +343,7 @@ Password -

blank = no authentication

+

blank for none

check autoProcessTV.cfg is set up for external apps to use post processing scripts diff --git a/gui/slick/interfaces/default/login.tmpl b/gui/slick/interfaces/default/login.tmpl index 6a717621..2ec5cfb1 100644 --- a/gui/slick/interfaces/default/login.tmpl +++ b/gui/slick/interfaces/default/login.tmpl @@ -46,7 +46,7 @@ \ No newline at end of file diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index fecba4d5..87767f0c 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -175,12 +175,9 @@ class LoginHandler(BaseHandler): username = sickbeard.WEB_USERNAME password = sickbeard.WEB_PASSWORD - if (self.get_argument('username') == username or not username) \ - and (self.get_argument('password') == password or not password): - + if (self.get_argument('username') == username) and (self.get_argument('password') == password): remember_me = int(self.get_argument('remember_me', default=0) or 0) self.set_secure_cookie('sickgear-session', sickbeard.COOKIE_SECRET, expires_days=30 if remember_me > 0 else None) - self.redirect(self.get_argument('next', '/home/')) else: next_arg = '&next=' + self.get_argument('next', '/home/')