@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make auth.email-domains case-insensitive

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.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5143

Differential Revision: https://secure.phabricator.com/D9261

+9 -1
+9 -1
src/applications/people/storage/PhabricatorUserEmail.php
··· 89 89 return false; 90 90 } 91 91 92 - return in_array($domain, $allowed_domains); 92 + $lower_domain = phutil_utf8_strtolower($domain); 93 + foreach ($allowed_domains as $allowed_domain) { 94 + $lower_allowed = phutil_utf8_strtolower($allowed_domain); 95 + if ($lower_allowed === $lower_domain) { 96 + return true; 97 + } 98 + } 99 + 100 + return false; 93 101 } 94 102 95 103