Merge pull request #3798 from jumpserver/dev

[Bugfix] 修复重置并下载ssh key的bug
pull/3882/head
BaiJiangJie 2020-03-19 16:28:34 +08:00 committed by GitHub
commit f89b1fd44b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ class UserPublicKeyGenerateView(PermissionsMixin, View):
def get(self, request, *args, **kwargs):
username = request.user.username
private, public = ssh_key_gen(username, hostname='jumpserver')
private, public = ssh_key_gen(username=username, hostname='jumpserver')
request.user.public_key = public
request.user.save()
response = HttpResponse(private, content_type='text/plain')