safe-redirect-manager icon indicating copy to clipboard operation
safe-redirect-manager copied to clipboard

Simple loop detection

Open joshbetz opened this issue 10 years ago • 3 comments
trafficstars

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.

joshbetz avatar Apr 29 '15 17:04 joshbetz

Yup, this would be great.

tlovett1 avatar May 04 '15 01:05 tlovett1

@joshbetz @tlovett1 was this ever resolved in a Safe Redirect Manager release (e.g. v1.8) or is this still open?

jeffpaul avatar Nov 13 '19 03:11 jeffpaul

@jameswburke another reference here perhaps in the downstream fork that might be helpful here?

jeffpaul avatar Jun 28 '22 20:06 jeffpaul