-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endless loop in sessions.py #2231
Comments
I apologise, we didn't quite fix this. We actually have a separate bug, in that we can have a redirect loop of size greater than 1. Ideally we ought to be able to spot redirect loops, regardless of whether they use the redirect cache. |
So this is a pretty serious problem. We could do: checked_urls = set()
while request.url in self.redirect_cache:
checked_urls.add(request.url)
new_url = self.redirect_cache.get(request.url)
if new_url in checked_urls:
break
request.url = new_url The break will mean that we use the existing request URL which should, ideally, trigger a The idea is that if we followed a redirect in the cache to something else, it will find that in
We will catch it as soon as |
I'm having the same issue, just wanted to chip in. For a faulty url that loops to itself, the max_redirects counter never goes beyond 1. |
The patch mentioned above works for me btw. CouchPotato/CouchPotatoServer@3338b72 |
PR #2244 has a fix for this. |
redirect_cache dict could have complementary key/values that forces and enless loop.
Current request chain with wget:
Suggested resolution:
The text was updated successfully, but these errors were encountered: