Infinite Redirect for Edited Question
calmdev opened this issue · comments
Describe the bug
I edited a question a few times yesterday and noticed that there is an infinite redirect on refresh.
To Reproduce
- Go here: https://godev.com/questions
- Find the post titled: How do I get started learning Go?
- Click it and notice question loads.
- Refresh the page and note an infinite redirect
Also note if you view other questions refreshing the page doesn't have the same redirect issue.
Expected behavior
Refreshing page for an edited question doesn't result in infinite redirect? I haven't had a chance to dig into it more yet. Or compare by editing other posts. Sharing here incase someone has seen it or might have an idea.
Screenshots
Screen.Recording.2024-03-27.at.2.03.08.PM.mov
![Screenshot 2024-03-27 at 2 36 17 PM](https://private-user-images.githubusercontent.com/461249/317475291-1adaf4d0-a3ad-437f-9c63-20457b0fe7ca.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkyODc5NTgsIm5iZiI6MTcxOTI4NzY1OCwicGF0aCI6Ii80NjEyNDkvMzE3NDc1MjkxLTFhZGFmNGQwLWEzYWQtNDM3Zi05YzYzLTIwNDU3YjBmZTdjYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyNVQwMzU0MThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01ZjRhN2ViY2M4NTRlMDBiZWQ4M2IxY2U1ODQwYzMwNDgzZmNkMWM0ZjQwMjY2ODJiNWQxYjM2OTNiMmE1ZjlkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.tDX6ZzfQm08Ed3KLWzHcE_tOySmh7hvZJpQqOhcFIDU)
Platform
- Device: Mac Book Air, 2022
- OS: MacOS Sonoma 14.4
- Browser and version: Brave – Version 1.64.109 Chromium: 123.0.6312.58 (Official Build) (arm64)
- Version: 1.20
FWIW, I just made a couple edits on this post as well and it seems fine:
https://godev.com/questions/10010000000000231/alternate-of-io-readall
Still not exactly sure what's different about the one in my video and original post.
@calmdev Thank you very much for your feedback. We have found the cause and are checking to see if there are other similar issues. Furthermore, we will fix this issue ASAP.
Awesome, I'll keep an eye out for the patch.
hmmm... very interesting bug. what is the issue?
hmmm... very interesting bug. what is the issue?
@zahash This is caused by the fact that there is a question mark(?) in the title of the question. So, I'm still testing to see if there are any other special characters that could cause this problem. 🧐
The loop is
/questions/:questionID/:questionTitle
->
/questions/:questionID/:questionTitle/:answerID(not exist)
->
/questions/:questionID/:questionTitle
Because the /questions/:questionID/:answerID
is also a correct path. We need to identify if the questionTitle
is a title or answerID. In this circumstances, It's a parsing error.
Are there specific steps or sequence of actions required to cause it?
I still haven't seen it for any other questions with (?) in the title.
In the video & screenshot what is the second id in path that is append to URL – a revision number or something?
Are there specific steps or sequence of actions required to cause it?
I still haven't seen it for any other questions with (?) in the title.
It's probably not just the special symbols that causes this problem. My final solution was to make sure that the correct answer ID must exist.
In the video & screenshot what is the second id in path that is append to URL – a revision number or something?
This is the wrong AnswerID that lead to the infinite redirect.