LDAP doesn't allow hyphens in email addresses #9424

Closed
opened 2025-11-02 08:38:21 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @mctaguma on GitHub (Aug 19, 2022).

Description

When trying an LDAP sync I see the following in the log:

2022/08/19 14:41:39 .../ldap/source_sync.go:120:Sync() [E] SyncExternalUsers[AD]: Error creating user firstname.name: e-mail address contains unsupported character [email: :firstname.last-name@domain.com]

Gitea Version

1.16.9

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

1.16.9

Operating System

CentOS 7

How are you running Gitea?

Using the binary on CentOS 7

Database

MySQL

Originally created by @mctaguma on GitHub (Aug 19, 2022). ### Description When trying an LDAP sync I see the following in the log: 2022/08/19 14:41:39 .../ldap/source_sync.go:120:Sync() [E] SyncExternalUsers[AD]: Error creating user firstname.name: e-mail address contains unsupported character [email: :firstname.last-name@domain.com] ### Gitea Version 1.16.9 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 1.16.9 ### Operating System CentOS 7 ### How are you running Gitea? Using the binary on CentOS 7 ### Database MySQL
GiteaMirror added the issue/needs-feedback label 2025-11-02 08:38:21 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Oct 3, 2022):

Since the error message is:

Error creating user firstname.name: e-mail address contains unsupported character [email: :firstname.last-name@domain.com]

You are using :firstname.last-name@domain.com as the email address, which starts with a : ?

At the moment, it's not a valid email for Gitea.

@wxiaoguang commented on GitHub (Oct 3, 2022): Since the error message is: `Error creating user firstname.name: e-mail address contains unsupported character [email: :firstname.last-name@domain.com]` You are using `:firstname.last-name@domain.com` as the email address, which starts with a `:` ? At the moment, it's not a valid email for Gitea.
Author
Owner

@mctaguma commented on GitHub (Oct 3, 2022):

The email address was configured with format of first name.last-name@domain.com in Active Directory.

Strange, there was no colon preceding the email address in AD.

I just tried to reproduce this in 1.17.2, and I was unable to reproduce this issue.

@mctaguma commented on GitHub (Oct 3, 2022): The email address was configured with format of first name.last-name@domain.com in Active Directory. Strange, there was no colon preceding the email address in AD. I just tried to reproduce this in 1.17.2, and I was unable to reproduce this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9424