Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14729231
D20018.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
D20018.diff
View Options
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
@@ -557,9 +557,18 @@
// Limit factor verification rates to prevent brute force attacks.
$any_attempt = false;
foreach ($factors as $factor) {
+ $factor_phid = $factor->getPHID();
+
$provider = $factor->getFactorProvider();
$impl = $provider->getFactor();
+ // If we already have a result (normally "wait..."), we won't try
+ // to validate whatever the user submitted, so this doesn't count as
+ // an attempt for rate limiting purposes.
+ if (isset($validation_results[$factor_phid])) {
+ continue;
+ }
+
if ($impl->getRequestHasChallengeResponse($factor, $request)) {
$any_attempt = true;
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 19, 6:26 AM (20 h, 22 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7018722
Default Alt Text
D20018.diff (1 KB)
Attached To
Mode
D20018: Don't rate limit users clicking "Wait Patiently" at an MFA gate even if they typed some text earlier
Attached
Detach File
Event Timeline
Log In to Comment