Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14080361
D20958.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D20958.diff
View Options
diff --git a/src/applications/auth/data/PhabricatorAuthHighSecurityToken.php b/src/applications/auth/data/PhabricatorAuthHighSecurityToken.php
--- a/src/applications/auth/data/PhabricatorAuthHighSecurityToken.php
+++ b/src/applications/auth/data/PhabricatorAuthHighSecurityToken.php
@@ -1,3 +1,17 @@
<?php
-final class PhabricatorAuthHighSecurityToken extends Phobject {}
+final class PhabricatorAuthHighSecurityToken
+ extends Phobject {
+
+ private $isUnchallengedToken = false;
+
+ public function setIsUnchallengedToken($is_unchallenged_token) {
+ $this->isUnchallengedToken = $is_unchallenged_token;
+ return $this;
+ }
+
+ public function getIsUnchallengedToken() {
+ return $this->isUnchallengedToken;
+ }
+
+}
diff --git a/src/applications/auth/engine/PhabricatorAuthSessionEngine.php b/src/applications/auth/engine/PhabricatorAuthSessionEngine.php
--- a/src/applications/auth/engine/PhabricatorAuthSessionEngine.php
+++ b/src/applications/auth/engine/PhabricatorAuthSessionEngine.php
@@ -493,7 +493,8 @@
// adds an auth factor, existing sessions won't get a free pass into hisec,
// since they never actually got marked as hisec.
if (!$factors) {
- return $this->issueHighSecurityToken($session, true);
+ return $this->issueHighSecurityToken($session, true)
+ ->setIsUnchallengedToken(true);
}
$this->request = $request;
diff --git a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
--- a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
+++ b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
@@ -5152,12 +5152,14 @@
'an MFA check.'));
}
- id(new PhabricatorAuthSessionEngine())
+ $token = id(new PhabricatorAuthSessionEngine())
->setWorkflowKey($workflow_key)
->requireHighSecurityToken($actor, $request, $cancel_uri);
- foreach ($xactions as $xaction) {
- $xaction->setIsMFATransaction(true);
+ if (!$token->getIsUnchallengedToken()) {
+ foreach ($xactions as $xaction) {
+ $xaction->setIsMFATransaction(true);
+ }
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 1:06 PM (17 h, 5 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6778574
Default Alt Text
D20958.diff (2 KB)
Attached To
Mode
D20958: When issuing a "no-op" MFA token because no MFA is configured, don't give the timeline story a badge
Attached
Detach File
Event Timeline
Log In to Comment