diff options
author | Teddy <[email protected]> | 2013-08-31 17:11:35 +0800 |
---|---|---|
committer | Teddy <[email protected]> | 2013-08-31 17:11:35 +0800 |
commit | 10d9a349c911825eb36704c92702fbea7eae32d7 (patch) | |
tree | 3a5d8d65421a8114181f0a56ade69c1eb7aaaf14 | |
parent | d8c8ba04baeed4f11003d5483890f6cafbc55fb0 (diff) |
close push tunnel when the password being changed
-rw-r--r-- | server/piztor/server.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/server/piztor/server.py b/server/piztor/server.py index d175d99..d9e8bc3 100644 --- a/server/piztor/server.py +++ b/server/piztor/server.py @@ -679,6 +679,13 @@ class ChangePasswordHandler(RequestHandler): uauth.set_password(new_pass) self.session.commit() logger.info("Password changed successfully!") + + pt = RequestHandler.push_tunnels + uid = uauth.uid + pt[uid].close() + del pt[uid] + uauth.regen_token() + return self.pack(struct.pack("!B", _StatusCode.sucess)) |