API: Fix issue with inbounduser not finding emails with uppercase letters (#4818)

This commit is contained in:
fL1pSt3r 2025-06-23 05:57:02 +04:00 committed by GitHub
parent 27742da2c6
commit b043db8260
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -63,6 +63,7 @@ func (v *MemoryValidator) Get(id uuid.UUID) *protocol.MemoryUser {
// Get a VLESS user with email, nil if user doesn't exist.
func (v *MemoryValidator) GetByEmail(email string) *protocol.MemoryUser {
email = strings.ToLower(email)
u, _ := v.email.Load(email)
if u != nil {
return u.(*protocol.MemoryUser)