This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
wangwei
/
aiforge
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
128
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
Fix double-generation of scratch token (
#6832
) (
#6833
)
tags/v1.9.0-rc1
SagePtr
Lauris BH
6 years ago
parent
09f83db6c6
commit
5ef16a4bef
1 changed files
with
1 additions
and
5 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-5
models/twofactor.go
+ 1
- 5
models/twofactor.go
View File
@@ -129,11 +129,7 @@ func aesDecrypt(key, text []byte) ([]byte, error) {
// NewTwoFactor creates a new two-factor authentication token.
func NewTwoFactor(t *TwoFactor) error {
_, err := t.GenerateScratchToken()
if err != nil {
return err
}
_, err = x.Insert(t)
_, err := x.Insert(t)
return err
}
Write
Preview
Loading…
Cancel
Save