Skip to content

Always return booleans from RackAttack request predicate methods

Markus Koller requested to merge 344807-refactor-rackattack-predicates into master

What does this MR do and why?

Some of these could previously return nil due to the use of =~. Also adds missing specs for these methods.

This extracts the refactoring from !76965 (merged), which ended up causing a production incident because it contained a subtle bug in the protected_path? method: !78082 (comment 817796863)

Part of #344807 (closed)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #344807 (closed)

Merge request reports