-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
E-mail address change in LDAP creates separate address in gitea #28660
Labels
Comments
lunny
pushed a commit
that referenced
this issue
Feb 4, 2024
Fixes #28660 Fixes an admin api bug related to `user.LoginSource` Fixed `/user/emails` response not identical to GitHub api This PR unifies the user update methods. The goal is to keep the logic only at one place (having audit logs in mind). For example, do the password checks only in one method not everywhere a password is updated. After that PR is merged, the user creation should be next.
silverwind
pushed a commit
to silverwind/gitea
that referenced
this issue
Feb 20, 2024
Fixes go-gitea#28660 Fixes an admin api bug related to `user.LoginSource` Fixed `/user/emails` response not identical to GitHub api This PR unifies the user update methods. The goal is to keep the logic only at one place (having audit logs in mind). For example, do the password checks only in one method not everywhere a password is updated. After that PR is merged, the user creation should be next.
Automatically locked because of our CONTRIBUTING guidelines |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
When gitea is syncing users from LDAP, changing user's e-mail address in LDAP and syncing users to gitea (cron task) creates extra e-mail address for this user in gitea db (
email_address
table) but should only change existing e-mail address like in LDAP.As result, all old user e-mail addresses are remembered in gitea and if other user is assigned in LDAP e-mail address that was already assinged in the past in LDAP (and was freed), say
[email protected]
, syncing such user from LDAP to gitea throws an errorbecause such freed e-mail address is still in use on gitea's side by previous user.
Consider updating gitea user's primary e-mail address only from LDAP mail attribute without creating separate entry in
email_address
table.Related: #18603
Gitea Version
1.21
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Compiled from sources.
Database
MySQL/MariaDB
The text was updated successfully, but these errors were encountered: