diff options
author | guillep2k <18600385+guillep2k@users.noreply.github.com> | 2020-02-21 10:08:04 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-21 10:08:04 -0300 |
commit | cfcd8e41467dd17c13c2ef80a6f12ae883f1f9f3 (patch) | |
tree | 74920ec597c768fedf3f35238b36363980c31ae6 /models/user.go | |
parent | ac18c3f6f279959decb1ae96027b909841dc5412 (diff) | |
download | gitea-cfcd8e41467dd17c13c2ef80a6f12ae883f1f9f3.tar.gz gitea-cfcd8e41467dd17c13c2ef80a6f12ae883f1f9f3.zip |
Ensure only own addresses are updated (#10397)
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/user.go b/models/user.go index d77a54b069..5031849f90 100644 --- a/models/user.go +++ b/models/user.go @@ -1025,7 +1025,7 @@ func VerifyActiveEmailCode(code, email string) *EmailAddress { data := com.ToStr(user.ID) + email + user.LowerName + user.Passwd + user.Rands if base.VerifyTimeLimitCode(data, minutes, prefix) { - emailAddress := &EmailAddress{Email: email} + emailAddress := &EmailAddress{UID: user.ID, Email: email} if has, _ := x.Get(emailAddress); has { return emailAddress } |