Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13963173
D7571.id17090.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7571.id17090.diff
View Options
Index: src/applications/auth/controller/PhabricatorAuthRegisterController.php
===================================================================
--- src/applications/auth/controller/PhabricatorAuthRegisterController.php
+++ src/applications/auth/controller/PhabricatorAuthRegisterController.php
@@ -59,16 +59,30 @@
$default_realname = $account->getRealName();
$default_email = $account->getEmail();
if ($default_email) {
- // If the account source provided an email but it's not allowed by
- // the configuration, just pretend we didn't get an email at all.
+ // If the account source provided an email, but it's not allowed by
+ // the configuration, roadblock the user. Previously, we let the user
+ // pick a valid email address instead, but this does not align well with
+ // user expectation and it's not clear the cases it enables are valuable.
+ // See discussion in T3472.
if (!PhabricatorUserEmail::isAllowedAddress($default_email)) {
- $default_email = null;
+ return $this->renderError(
+ array(
+ pht(
+ 'The account you are attempting to register with has an invalid '.
+ 'email address (%s). This Phabricator install only allows '.
+ 'registration with specific email addresses:',
+ $default_email),
+ phutil_tag('br'),
+ phutil_tag('br'),
+ PhabricatorUserEmail::describeAllowedAddresses(),
+ ));
}
// If the account source provided an email, but another account already
// has that email, just pretend we didn't get an email.
// TODO: See T3340.
+ // TODO: See T3472.
if ($default_email) {
$same_email = id(new PhabricatorUserEmail())->loadOneWhere(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 16, 2:22 PM (3 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6717799
Default Alt Text
D7571.id17090.diff (1 KB)
Attached To
Mode
D7571: Roadblock users trying to register with external accounts that have invalid emails
Attached
Detach File
Event Timeline
Log In to Comment