Page MenuHomePhabricator

D18790.id45099.diff
No OneTemporary

D18790.id45099.diff

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

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)

Event Timeline