-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix the bug that user may logout if GetUserByID return unknow error #29964
Fix the bug that user may logout if GetUserByID return unknow error #29964
Conversation
…a#29962) This PR fixed a bug when the user switching pages too fast, he will logout automatically. The reason is that when the error is context cancelled, the previous code think user hasn't login then the session will be deleted. Now it will return the errors but not think it's not login. --------- Co-authored-by: wxiaoguang <[email protected]>
I do not think it needs to be backported. Becaseu 1.21 uses |
But it may return other errors like temporary network problems between Gitea and database. Should the user be logout because of that reason? |
Then the title/description/comment don't match |
Updated. |
backport #29962
This PR fixed a bug when the user switching pages too fast, he will logout automatically.
The reason is that when the error is context cancelled, the previous code think user hasn't login then the session will be deleted. Now it will return the errors but not think it's not login.