-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if email is used when updating user (#21289) #21750
Conversation
CI failure is related. |
models/user/user.go
Outdated
IsPrimary: false, | ||
}); err != nil { | ||
return err | ||
if has && emailAddress.UID != u.ID { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if email exists and is not active? This way I could add to my account let's say others person's email address and block him from adding his other email
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, but that brings another change with it:
We need to throw out unactivated emails then when someone else changes his email and verifies it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a backport, should I modify this patch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think this should be fixed
Signed-off-by: Xinyu Zhou <i@sourcehut.net>
wow, just noticed. |
Going to close this as we've moved on from |
Backport #21289
Fix #21075
When updating user data should check if email is used by other users