safe-redirect-manager
safe-redirect-manager copied to clipboard
Simple loop detection
check_for_possible_redirect_loops() is kind of slow. We could add simple loop detection that runs in constant time by checking each redirect individually when it is created. It won't be as comprehensive, but will protect against the most blatant redirect loops.
We should block:
- [ ] any rule that redirects to itself
- [ ] any rule that redirects all traffic to the current site
Example of the second:
/(.*) -> /$1/
Redirecting ALL traffic to the same site will always be a loop.
Yup, this would be great.
@joshbetz @tlovett1 was this ever resolved in a Safe Redirect Manager release (e.g. v1.8) or is this still open?
@jameswburke another reference here perhaps in the downstream fork that might be helpful here?