From 1a7a6b228fd613b56a2e5cbe13282eb4e541d7f5 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 14 Dec 2012 21:34:29 +0530 Subject: [PATCH] handler.py: don't update demo password --- webnotes/handler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webnotes/handler.py b/webnotes/handler.py index b828783932..22c0d5f04b 100755 --- a/webnotes/handler.py +++ b/webnotes/handler.py @@ -138,6 +138,9 @@ def reset_password(): from webnotes.utils import random_string user = webnotes.form_dict.get('user', '') + if user in ["demo@erpnext.com", "Administrator"]: + webnotes.msgprint("Not allowed", raise_exception=1) + if webnotes.conn.sql("""select name from tabProfile where name=%s""", user): new_password = random_string(8) webnotes.conn.sql("""update `__Auth` set password=password(%s)