From 201ef814f9b23ab5dc92349dd49dfbaf8d00f1d8 Mon Sep 17 00:00:00 2001 From: guanghongwei Date: Wed, 1 Oct 2014 21:15:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=87=EE=86=BD=E6=95=BCbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webroot/AutoSa/AutoSa/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webroot/AutoSa/AutoSa/views.py b/webroot/AutoSa/AutoSa/views.py index 35ff74708..80b84067e 100644 --- a/webroot/AutoSa/AutoSa/views.py +++ b/webroot/AutoSa/AutoSa/views.py @@ -718,7 +718,8 @@ def chgKey(request): return HttpResponse(error) keyfile = '%s/keys/%s' % (base_dir, username) - ret = bash('ssh-keygen -p -P %s -N %s -f %s' % (user.key_pass, password, keyfile)) + jm = PyCrypt(key) + ret = bash('ssh-keygen -p -P %s -N %s -f %s' % (jm.decrypt(user.key_pass), password, keyfile)) if ret != 0: error = '更改私钥密码错误' return HttpResponse(error)