You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 test1@example.com, syncing such user from LDAP to gitea throws an error
2023/12/30 15:56:50 .../ldap/source_sync.go:134:Sync() [E] SyncExternalUsers[ldap]: Error creating user test: e-mail already in use [email: test1@example.com]
because 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.
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.
Fixesgo-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.
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
test1@example.com
, 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: