Skip to content

Commit

Permalink
Add Rate Limit To Request Actions (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsrec authored Oct 12, 2023
1 parent 9fc826c commit 77a7cb5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/subpages/RequestPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,12 @@ function handleRequestActionSubmission($userContext, SpecialPage $pageContext, $
$mutexId = 'scratch-confirmaccount-action-request-' . $requestId;

$dbw = getTransactableDatabase($mutexId);


if($user->pingLimiter('requestaccountaction')){
cancelTransaction($dbw, $mutexId);
$output->showErrorPage('actionthrottled', 'actionthrottledtext');
return;
}
//find the request
$accountRequest = getAccountRequestById($requestId, $dbw);
if (!$accountRequest) {
Expand Down

0 comments on commit 77a7cb5

Please sign in to comment.