-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
WebUI: normalize url in post-login redirect #23276
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
base: master
Are you sure you want to change the base?
Conversation
Are you able to reproduce the issue? |
No, I'm still not able to reproduce it. However I see little downside to the change (it's actually a bit cleaner than the current approach) and it appears that it would fix the issue reported in #10405 (comment), #10405 (comment), and #10405 (comment) |
In what way? BTW, how about the address like
Is there any confirmation of this? |
|
As food for thought, I could suggest the following cases:
|
We currently have two lines that are meant to do the same thing -
Hmm, this is an edge case. Will add logic for this.
You have the same information that I have - just read the linked issue. We try this, see if it helps, if not we can always roll it back. Otherwise we just do nothing. |
9696527 to
aaab185
Compare
|
I've simplified the logic so it relies entirely on the |
aaab185 to
2284da0
Compare
At least I tried to analyze it and make some assumptions. And you? What do you think is the problem? BTW, if I didn't misunderstand it, in some cases the problem was described as reversed, i.e. removing the trailing slash solved it. |
I answered exactly this in this PR's description. Hence this PR. We can sit around for 6 years guessing what the issue is, or we can put up a potential fix and let users try it. And either way, I actually think the logic in this PR is cleaner than the existing logic, regardless of whether it ends up solving the issue.
qBittorrent already sends
This seems quite unlikely, otherwise this would be impacting far more sites than qBittorrent.
The linked issue literally includes "Removing the trailing slash then loads the full UI" in the title, which is why that's the issue I'm attempting to solve. It's possible there's another issue, but I haven't looked into that one. |
To me, this sounds like removing the trailing slash allows you to load the UI (i.e. solves the problem). In fact, it seems to me that adding a slash, as well as removing it (if it was originally present when the user opened the login page), only causes the browser to correctly request the page from the server, sending previously received cookies, etc.
Doesn't #10405 (comment) indicate such an issue? |
Maybe... but they both look like dirty workarounds for me.
OK, I won't bother you. |
This piece of code is revised almost every major release and I'm not going to approve it just because you think it is better. I'll need root cause analysis and reproduction.
No. And you completely disregarded all previous rationales that leads to today weird code. Search for previous PR and issues related to this login code. And make sure regressions do not creep back. From #10405 (comment) and #10405 (comment), I reckon this is due to two instances of webui that shared the same cookie. One webui logs in and affected the other webui. This is largely due to user misunderstanding of how cookies work: https://stackoverflow.com/questions/1612177/are-http-cookies-port-specific Or maybe the browser/reverse proxy messed up and cached the cookie instead of refreshing it. Anyway, the root cause won't be clear unless we have reproduction at hand. |
That's a lot of assumptions. I read through #21832 and #20442. It seems to me that directly setting the page's
No one has been able to reliably reproduce the issue after 6 years. Did you read the thread? You seem to be in the camp of "do nothing and hope it helps". I'm in the camp of wanting to try something and see if it fixes it. if it doesn't fix it then there's no downside and the code actually got cleaner. |
No, you are shooting in the dark and hope it didn't break anything. You have no understanding of why it didn't work in the first place and no testament that your code will resolve #10405 also no guarantee that the regressions won't come back. This is not the way of engineering.
Until another user reports that their weird browser/client don't work anymore. |
|
I maintain my code, so if something else breaks, I'll fix it. Can you identify any issues with my code? The current code is a mess - it has two calls to accomplish the same thing, and |
|
@qbittorrent/bug-handlers it would be great to move this PR forward. This replaces the legacy redirection logic, which requires two commands that do the same thing ( |
This is an attempt to fix one of the issues described in #10405. Several users indicate that they must manually add a trailing slash after logging in. This PR ensures that the URL the user is redirected to always contains a trailing slash.