diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-05-27 22:52:24 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-05-27 22:52:24 +0200 |
commit | 3254a85595dd27a96862d8d7b932c03ade166f95 (patch) | |
tree | 969bd75d09550da32792c2537e8d6e9f0101386e /module/web/json_app.py | |
parent | fixes last commit (diff) | |
download | pyload-3254a85595dd27a96862d8d7b932c03ade166f95.tar.xz |
change password in webif
Diffstat (limited to 'module/web/json_app.py')
-rw-r--r-- | module/web/json_app.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/module/web/json_app.py b/module/web/json_app.py index 738f5ac63..39cd81f5f 100644 --- a/module/web/json_app.py +++ b/module/web/json_app.py @@ -415,6 +415,16 @@ def update_accounts(): deleted.append((plugin,user)) PYLOAD.remove_account(plugin, user) +@route("/json/change_password", method="POST") +def change_password(): + + user = request.POST["user_login"] + oldpw = request.POST["login_current_password"] + newpw = request.POST["login_new_password"] + + if not PYLOAD.change_password(user, oldpw, newpw): + print "Wrong password" + return HTTPError() @route("/json/filemanager/rename", method="POST") @login_required('filemanager') |