Skip to content
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

User's Email will turn lower case automatically #10279

Closed
2 of 7 tasks
prosopa opened this issue Feb 15, 2020 · 6 comments
Closed
2 of 7 tasks

User's Email will turn lower case automatically #10279

prosopa opened this issue Feb 15, 2020 · 6 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@prosopa
Copy link

prosopa commented Feb 15, 2020

  • Gitea version (or commit ref): 1.11
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

When the user email contains capital letter, e.g. BugHere@example.com, Gitea will turn all capital letter to lower case, e.g. bughere@example.com
...

Screenshots

Setting Email as BugHere@example.com
圖片

Result
圖片

@davidsvantesson
Copy link
Contributor

It is done to ensure not two registrations can be done with same email addresses. I think all mail servers/hosts treat full email address case insensitive.

@prosopa
Copy link
Author

prosopa commented Feb 17, 2020

A little bit strange to the user.
Why not doing duplication check "background"?
I mean, just show what they are typed.

@lunny lunny added the type/bug label Feb 17, 2020
@lunny
Copy link
Member

lunny commented Feb 17, 2020

I think this should be a bug. We should add a new lower_email column to ensure the unique email address.

@lafriks lafriks added type/proposal The new feature has not been accepted yet but needs to be discussed first. and removed type/bug labels Mar 4, 2020
@lafriks
Copy link
Member

lafriks commented Mar 4, 2020

I don't think it is bug as email addresses are case insensitive so I don't really see problem in lower-casing email addresses

@pezhovski
Copy link
Contributor

Hi @lafriks, sorry to bring this up, I was looking for reasons why there is lower_email field and what it purpose and found this.
I think standard states that local-part of email address may be case sensitive and it should be treated as so
https://www.rfc-editor.org/rfc/rfc5321#section-2.4

The local-part of a mailbox MUST BE treated as case sensitive.

So converting email to lower case by default is a bug and could possibly lead to leaking of a private data.

@lafriks
Copy link
Member

lafriks commented Sep 28, 2022

They may be but to be honest I have not seen SMTP server that would treat User@example.com and user@example.com as different email addresses. In practice you can write email address in any casing combinations and it will be delivered to same user account. Problem from security perspective is that we could end up having user with the same email address otherwise

@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

6 participants