Skip to content

Commit

Permalink
Added sensible defaults for the other rate limit identifiers. Removed…
Browse files Browse the repository at this point in the history
… unused indentifiers from rate limit test script config.
  • Loading branch information
dklawren committed Aug 27, 2024
1 parent faf381b commit 6981d2a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 14 additions & 6 deletions Bugzilla/Config/Admin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,20 @@ sub get_param_list {

sub default_rate_limit_rules {
return encode_json({
get_bug => [75, 60],
show_bug => [75, 60],
github => [10, 60],
get_attachments => [75, 60],
get_comments => [75, 60],
webpage_errors => [75, 60],
get_bug => [75, 60],
show_bug => [75, 60],
github => [10, 60],
get_attachments => [75, 60],
get_comments => [75, 60],
webpage_errors => [75, 60],
token_mismatch => [5, 60],
github => [5, 60],
create_account => [5, 60],
email_change => [5, 60],
password_reset => [5, 60],
cancel_token => [5, 60],
api_key_mismatch => [5, 60],
mfa_mismatch => [5, 60],
});
}

Expand Down
2 changes: 1 addition & 1 deletion qa/t/3_test_rate_limit.t
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ set_parameters(
'rate_limit_rules' => {
type => 'text',
value =>
'{"get_attachments":[5,100],"get_comments":[5,100],"get_bug":[5,100],"show_bug":[5,100],"github":[5,100],"webpage_errors":[5,100], "token":[5,100], "api_key":[5,100], "username_password":[3,100]}'
'{"get_attachments":[5,100],"get_comments":[5,100],"get_bug":[5,100],"show_bug":[5,100],"github":[5,100],"webpage_errors":[5,100]}'
}
}
}
Expand Down

0 comments on commit 6981d2a

Please sign in to comment.