From 4513525cc406b0f46e25708db6856e93146c0a26 Mon Sep 17 00:00:00 2001 From: echel0n Date: Tue, 17 Jun 2014 13:04:17 -0700 Subject: [PATCH] Fix for basicauth and no user/pass set --- sickbeard/webserve.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index b1106f10..626ee5f0 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -86,7 +86,7 @@ from tornado.ioloop import IOLoop # def _handle_reverse_proxy(): # if sickbeard.HANDLE_REVERSE_PROXY: -# cherrypy.lib.cptools.proxy() +# cherrypy.lib.cptools.proxy() # cherrypy.tools.handle_reverse_proxy = cherrypy.Tool('before_handler', _handle_reverse_proxy) @@ -105,6 +105,9 @@ def authenticated(handler_class): return False try: + if not (sickbeard.WEB_USERNAME and sickbeard.WEB_PASSWORD): + return True + auth_hdr = handler.request.headers.get('Authorization') if auth_hdr == None: @@ -136,6 +139,7 @@ class RedirectHandler(RequestHandler): def get(self, path, **kwargs): self.redirect(path, permanent=True) + @authenticated class IndexHandler(RedirectHandler): def __init__(self, application, request, **kwargs): @@ -450,6 +454,7 @@ class IndexHandler(RedirectHandler): browser = WebFileBrowser + class PageTemplate(Template): def __init__(self, *args, **KWs): KWs['file'] = os.path.join(sickbeard.PROG_DIR, "gui/" + sickbeard.GUI_NAME + "/interfaces/default/",