diff --git a/py/build/version.py b/py/build/version.py index cefc3d3b79..0cb3f4a87c 100644 --- a/py/build/version.py +++ b/py/build/version.py @@ -184,7 +184,6 @@ class VersionControl: """ import os for wt in os.walk(self.root_path, followlinks = True): - # ignore folders for folder in self.ignore_folders: if folder in wt[1]: @@ -455,4 +454,4 @@ if __name__=='__main__': import os, sys sys.path.append('py') sys.path.append('lib/py') - unittest.main() \ No newline at end of file + unittest.main() diff --git a/py/core/page/login_page/login_page.js b/py/core/page/login_page/login_page.js index ac8dfd573b..7ca5aab426 100644 --- a/py/core/page/login_page/login_page.js +++ b/py/core/page/login_page/login_page.js @@ -18,7 +18,7 @@ pscript.onLoginReply = function(r, rtext) { if(r.message=="Logged In"){ window.location.href='index.html' + (get_url_arg('page') ? ('?page='+get_url_arg('page')) : ''); } else { - $i('login_message').innerHTML = ''+eval(r.message)+''; + $i('login_message').innerHTML = ''+(r.message)+''; //if(r.exc)alert(r.exc); } } @@ -53,4 +53,4 @@ pscript.show_forgot_password = function(){ } d.show(); pscript.forgot_dialog = d; -} \ No newline at end of file +} diff --git a/py/webnotes/auth.py b/py/webnotes/auth.py index 6858151560..2cb03df438 100644 --- a/py/webnotes/auth.py +++ b/py/webnotes/auth.py @@ -137,10 +137,9 @@ class LoginManager: def authenticate(self, user=None, pwd=None): if not (user and pwd): user, pwd = webnotes.form_dict.get('usr'), webnotes.form_dict.get('pwd') - if not (user and pwd): - webnotes.msgprint('Incomplete Login Details', raise_exception=1) - + webnotes.response['message'] = 'Incomplete Login Details' + raise Exception # custom authentication (for single-sign on) self.load_control_panel() if hasattr(self.cp, 'authenticate'): @@ -151,9 +150,10 @@ class LoginManager: p = webnotes.conn.sql("select name from tabProfile where name=%s and (`password`=%s OR `password`=PASSWORD(%s))", (user, pwd, pwd)) else: p = webnotes.conn.sql("select name from tabProfile where name=%s and (`password`=%s OR `password`=PASSWORD(%s)) and IFNULL(enabled,0)=1", (user, pwd, pwd)) - if not p: - webnotes.msgprint('Authentication Failed', raise_exception=1) + webnotes.response['message'] = 'Authentication Failed' + raise Exception + #webnotes.msgprint('Authentication Failed',raise_exception=1) self.user = p[0][0]