fix(oauth): Error on auth sources with spaces (#37327)#37332
Merged
silverwind merged 2 commits intogo-gitea:release/v1.26from Apr 21, 2026
Merged
fix(oauth): Error on auth sources with spaces (#37327)#37332silverwind merged 2 commits intogo-gitea:release/v1.26from
silverwind merged 2 commits intogo-gitea:release/v1.26from
Conversation
The link to authentication sources is now escaped with the QueryEscape. This commit fixes that by unescaping the provider name in the URL. --------- Signed-off-by: prettysunflower <me@prettysunflower.moe> Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang
approved these changes
Apr 21, 2026
silverwind
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #37327 by @prettysunflower
Nyallo~
In pull request #36901, a change is made so that the link to authentication sources is now escaped with the QueryEscape filter. https://github.com/go-gitea/gitea/pull/36901/changes#diff-34c39c9736a8b62e293c0c0b24c4b5b8c1c792790018c5809f9ff2cbc12b16b1R4
The problem is that QueryEscape replace spaces with the
+character, and this is not unescaped when a user tries to log in with an authentication source that contains a space, which throws an error.This commit fixes that by unescaping the provider name in the URL.
Example of the error, on my instance, when I try to log in with
prettysunflower's auth