WIP: lowercase all emails when comparing #1109
No reviewers
Labels
No labels
A: API
A: Backend
A: Federation
A: Front-End
A: I18N
A: Meta
A: Security
Build
C: Bug
C: Discussion
C: Enhancement
C: Feature
Compatibility
Dependency
Design
Documentation
Good first issue
Help welcome
Mobile
Rendering
S: Blocked
S: Duplicate
S: Incomplete
S: Instance specific
S: Invalid
S: Needs Voting/Discussion
S: Ready for review
Suggestion
S: Voted on Loomio
S: Wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Plume/Plume#1109
Loading…
Reference in a new issue
No description provided.
Delete branch "Marius/Plume:lowercase_emails"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
In #989 , it is described that email should be compared case insensitively.
The RFC 5321 describes that:
In plume, we compare the emails as-is, so case-sensitively, this PR proposes to replace all emails comparisons and search within tables of the form
by
It is more verbose, but permit to keep the database coherent with what user types (case-sensitive email).
How to find where to modify
I launched the following command in plume repository, on a standard debian to find all files using emails.
Then i just searched for comparisons as previously described and replaced them.
Testing
Launch an instance with that and verify everything works, with email case-insensitive, but that they are still stored case sensitive.
Right now this don't work, because the lower function seems not implemented in diesel, however i found this discussion Lemmy lower.
They seems to implement it straightforward, but i can't find how to use the same idea without modifying to much.
So waiting for that, and your ideas on this PR.
Seems nice solution. Thanks!
Making comparison rule case-insensitive in database is also a solution.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.