From b8a8c3ebf3bec6ebbab19a02c92f8d5d775ad53e Mon Sep 17 00:00:00 2001 From: liuzheng712 Date: Tue, 23 Feb 2016 14:15:55 +0800 Subject: [PATCH] feat(juser/views.py;func:down_key): delete the private key when user download it issue:62 --- juser/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/juser/views.py b/juser/views.py index 41baa7536..1b85019be 100644 --- a/juser/views.py +++ b/juser/views.py @@ -466,6 +466,7 @@ def down_key(request): f.close() response = HttpResponse(data, content_type='application/octet-stream') response['Content-Disposition'] = 'attachment; filename=%s' % os.path.basename(private_key_file) + os.unlink(private_key_file) # delete it return response return HttpResponse('No Key File. Contact Admin.')