Page MenuHomePhabricator

Make auth.email-domains case-insensitive
ClosedPublic

Authored by epriestley on May 22 2014, 6:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 29, 2:53 PM
Unknown Object (File)
Sat, Apr 27, 11:15 PM
Unknown Object (File)
Wed, Apr 24, 10:19 PM
Unknown Object (File)
Sat, Apr 20, 10:19 PM
Unknown Object (File)
Thu, Apr 11, 8:43 AM
Unknown Object (File)
Apr 4 2024, 11:37 PM
Unknown Object (File)
Apr 1 2024, 11:24 PM
Unknown Object (File)
Mar 27 2024, 9:27 PM
Subscribers

Details

Summary

Fixes T5143. Currently, if your allowed domain is "example.com", we reject signups from "@Example.com".

Instead, lowercase both parts before performing the check.

Test Plan
  • Before patch:
    • Set allowed domains to "yghe.net".
    • Tried "x@yghe.net", no error.
    • Tried "x@xxxy.net", error.
    • Tried "x@yghE.net", incorrectly results in an error.
  • After patch:
    • Set allowed domains to "yghe.net".
    • Tried "x@yghe.net", no error.
    • Tried "x@xxxy.net", error.
    • Tried "x@yghE.net", this correctly no longer produces an error.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Make auth.email-domains case-insensitive.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.

Maybe /config/edit/auth.email-domains/ needs an update to text that things match in a case insensitive way?

src/applications/people/storage/PhabricatorUserEmail.php
94

I was surprised this wasn't saved in a strtolower'd format. whatevs tho.

This revision is now accepted and ready to land.May 22 2014, 9:02 PM

We could try harder to normalize on input, but I think it gets a bit messy: if it comes from a config file we can't do anything about it at write-time since it's in an immutable PHP file, for instance. This approach means we don't have to deal with that case, don't have to migrate any data, etc.

epriestley updated this revision to Diff 21994.

Closed by commit rPa76f61f7e183 (authored by @epriestley).