Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
9b142443
Commit
9b142443
authored
8 years ago
by
njqaaa
Committed by
老广
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix id_dsa check error (#458)
* fix id_dsa check error * fix 邮件修改密码 token错误 * fix 3c8aec9 add )
parent
b680a424
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
utils.py
apps/common/utils.py
+2
-3
user.py
apps/users/models/user.py
+1
-1
No files found.
apps/common/utils.py
View file @
9b142443
...
@@ -180,15 +180,14 @@ def timesince(dt, since='', default="just now"):
...
@@ -180,15 +180,14 @@ def timesince(dt, since='', default="just now"):
def
ssh_key_string_to_obj
(
text
):
def
ssh_key_string_to_obj
(
text
):
key_f
=
StringIO
(
text
)
key
=
None
key
=
None
try
:
try
:
key
=
paramiko
.
RSAKey
.
from_private_key
(
key_f
)
key
=
paramiko
.
RSAKey
.
from_private_key
(
StringIO
(
text
)
)
except
paramiko
.
SSHException
:
except
paramiko
.
SSHException
:
pass
pass
try
:
try
:
key
=
paramiko
.
DSSKey
.
from_private_key
(
key_f
)
key
=
paramiko
.
DSSKey
.
from_private_key
(
StringIO
(
text
)
)
except
paramiko
.
SSHException
:
except
paramiko
.
SSHException
:
pass
pass
return
key
return
key
...
...
This diff is collapsed.
Click to expand it.
apps/users/models/user.py
View file @
9b142443
...
@@ -189,7 +189,7 @@ class User(AbstractUser):
...
@@ -189,7 +189,7 @@ class User(AbstractUser):
return
'https://www.gravatar.com/avatar/c6812ab450230979465d7bf288eadce2a?s=120&d=identicon'
return
'https://www.gravatar.com/avatar/c6812ab450230979465d7bf288eadce2a?s=120&d=identicon'
def
generate_reset_token
(
self
):
def
generate_reset_token
(
self
):
return
signer
.
sign_t
({
'reset'
:
self
.
id
,
'email'
:
self
.
email
},
expires_in
=
3600
)
return
signer
.
sign_t
({
'reset'
:
self
.
id
,
'email'
:
self
.
email
},
expires_in
=
3600
)
.
decode
(
'utf-8'
)
def
to_json
(
self
):
def
to_json
(
self
):
return
OrderedDict
({
return
OrderedDict
({
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment