Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15456127
D8528.id20234.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
D8528.id20234.diff
View Options
diff --git a/src/applications/auth/controller/PhabricatorAuthRegisterController.php b/src/applications/auth/controller/PhabricatorAuthRegisterController.php
--- a/src/applications/auth/controller/PhabricatorAuthRegisterController.php
+++ b/src/applications/auth/controller/PhabricatorAuthRegisterController.php
@@ -57,8 +57,13 @@
$default_username = $account->getUsername();
$default_realname = $account->getRealName();
+
$default_email = $account->getEmail();
- if ($default_email) {
+ if (!PhabricatorUserEmail::isValidAddress($default_email)) {
+ $default_email = null;
+ }
+
+ if ($default_email !== null) {
// 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
@@ -84,7 +89,7 @@
// TODO: See T3340.
// TODO: See T3472.
- if ($default_email) {
+ if ($default_email !== null) {
$same_email = id(new PhabricatorUserEmail())->loadOneWhere(
'address = %s',
$default_email);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 31, 7:13 AM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7704611
Default Alt Text
D8528.id20234.diff (1 KB)
Attached To
Mode
D8528: Fix two registration errors for unusual provider emails
Attached
Detach File
Event Timeline
Log In to Comment