Prevent infinite loops of redirection #5

Closed
opened 2022-10-20 13:47:18 +00:00 by Bauke · 2 comments
Owner

It's possible to create redirects that end up infinitely looping. In the background script there should be some way of detecting and preventing that.

It's possible to create redirects that end up infinitely looping. In the background script there should be some way of detecting and preventing that.
Bauke added this to the Version 0.1.0 milestone 2022-10-20 13:47:18 +00:00
Bauke added the
Feature Request
label 2022-10-20 13:47:18 +00:00
Bauke self-assigned this 2022-10-20 13:47:18 +00:00
Author
Owner

Potential solution: save the most recently redirected URL and the timestamp for it, then when another redirect is about to happen, check if it's the same URL and within 30 seconds of the last time. If it is, it's highly likely that an infinite loop is happening, or, (and this would be a nice unintended feature) the user wants to go to the original URL without being redirected.

Also, rate-limit checking redirects to 100ms. So if it's been less than 100ms since the last redirect, don't check for any again.

Potential solution: save the most recently redirected URL and the timestamp for it, then when another redirect is about to happen, check if it's the same URL and within 30 seconds of the last time. If it is, it's highly likely that an infinite loop is happening, ***or***, (and this would be a nice unintended feature) the user wants to go to the original URL without being redirected. Also, rate-limit checking redirects to 100ms. So if it's been less than 100ms since the last redirect, don't check for any again.
Author
Owner

Implemented in 3e59d0e13b.

Implemented in 3e59d0e13bb4625fc6d85904cbbc9caec10c5e70.
Bauke closed this issue 2022-10-21 16:49:43 +00:00
Bauke added the
Completed
label 2022-10-21 16:49:48 +00:00
Sign in to join this conversation.
No description provided.