Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15443501
D18708.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
927 B
Referenced Files
None
Subscribers
None
D18708.id.diff
View Options
diff --git a/support/startup/PhabricatorClientRateLimit.php b/support/startup/PhabricatorClientRateLimit.php
--- a/support/startup/PhabricatorClientRateLimit.php
+++ b/support/startup/PhabricatorClientRateLimit.php
@@ -35,7 +35,15 @@
// If the user was logged in, let them make more requests.
if (isset($request_state['viewer'])) {
$viewer = $request_state['viewer'];
- if ($viewer->isLoggedIn()) {
+ if ($viewer->isOmnipotent()) {
+ // If the viewer was omnipotent, this was an intracluster request or
+ // some other kind of special request, so don't give it any points
+ // toward rate limiting.
+ $score = 0;
+ } else if ($viewer->isLoggedIn()) {
+ // If the viewer was logged in, give them fewer points than if they
+ // were logged out, since this traffic is much more likely to be
+ // legitimate.
$score = 0.25;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 28, 4:43 AM (3 w, 16 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7387280
Default Alt Text
D18708.id.diff (927 B)
Attached To
Mode
D18708: Tweak rate limiting point counts for omnipotent users
Attached
Detach File
Event Timeline
Log In to Comment