Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15464834
D18790.id45099.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
D18790.id45099.diff
View Options
diff --git a/src/applications/base/controller/PhabricatorController.php b/src/applications/base/controller/PhabricatorController.php
--- a/src/applications/base/controller/PhabricatorController.php
+++ b/src/applications/base/controller/PhabricatorController.php
@@ -160,6 +160,15 @@
}
}
+ // Require users sign Legalpad documents before we check if they have
+ // MFA. If we don't do this, they can get stuck in a state where they
+ // can't add MFA until they sign, and can't sign until they add MFA.
+ // See T13024 and PHI223.
+ $result = $this->requireLegalpadSignatures();
+ if ($result !== null) {
+ return $result;
+ }
+
// Check if the user needs to configure MFA.
$need_mfa = $this->shouldRequireMultiFactorEnrollment();
$have_mfa = $user->getIsEnrolledInMultiFactor();
@@ -226,12 +235,6 @@
}
}
-
- $result = $this->requireLegalpadSignatures();
- if ($result !== null) {
- return $result;
- }
-
// NOTE: We do this last so that users get a login page instead of a 403
// if they need to login.
if ($this->shouldRequireAdmin() && !$user->getIsAdmin()) {
@@ -523,6 +526,10 @@
}
private function requireLegalpadSignatures() {
+ if (!$this->shouldRequireLogin()) {
+ return null;
+ }
+
if ($this->shouldAllowLegallyNonCompliantUsers()) {
return null;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 3, 12:53 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7406819
Default Alt Text
D18790.id45099.diff (1 KB)
Attached To
Mode
D18790: Ask users to sign Legalpad documents before requiring they enroll in MFA
Attached
Detach File
Event Timeline
Log In to Comment