FIX: just trying to clean up the login stuff...again

This commit is contained in:
evilhero 2018-02-21 14:54:29 -05:00
parent 397290d8ee
commit 6a45836ed5
2 changed files with 9 additions and 9 deletions

View File

@ -15,7 +15,7 @@
<body>
<form action="${http_root}auth/login" method="post">
<input type="hidden" name="from_page" value="${http_root}${from_page}" />
<input type="hidden" name="from_page" value="${from_page}" />
<div class="wrap">
<div class="avatar">
<img src="${http_root}images/mylarlogo.png" />

View File

@ -137,14 +137,14 @@ class AuthController(object):
if error_msg:
return self.get_loginform(current_username, error_msg, from_page)
else:
if all([from_page != "/", from_page != "//"]):
from_page = from_page
if mylar.OS_DETECT == 'Windows':
if mylar.CONFIG.HTTP_ROOT != "//":
from_page = re.sub(mylar.CONFIG.HTTP_ROOT, '', from_page,1).strip()
else:
if mylar.CONFIG.HTTP_ROOT != "/":
from_page = re.sub(mylar.CONFIG.HTTP_ROOT, '', from_page,1).strip()
#if all([from_page != "/", from_page != "//"]):
# from_page = from_page
#if mylar.OS_DETECT == 'Windows':
# if mylar.CONFIG.HTTP_ROOT != "//":
# from_page = re.sub(mylar.CONFIG.HTTP_ROOT, '', from_page,1).strip()
#else:
# #if mylar.CONFIG.HTTP_ROOT != "/":
# from_page = re.sub(mylar.CONFIG.HTTP_ROOT, '', from_page,1).strip()
cherrypy.session.regenerate()
cherrypy.session[SESSION_KEY] = cherrypy.request.login = current_username
#expiry = datetime.now() + (timedelta(days=30) if remember_me == '1' else timedelta(minutes=60))