-
-
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
Login with Safari: Error updating user language #14793
Labels
Milestone
Comments
So strip |
I found this issue in the golang repo: Seems to be a bug in a Go lib. The most recent "solution" for this is: langTag, _, _ := languageMatcher.Match(tags...)
langTagString := langTag.String()[0:2] |
noerw
added
type/upstream
This is an issue in one of Gitea's dependencies and should be reported there
type/bug
labels
Feb 28, 2021
zeripath
added
good first issue
Likely to be an easy fix
and removed
type/upstream
This is an issue in one of Gitea's dependencies and should be reported there
labels
Mar 3, 2021
What we should do is strip off the - one by one until there is a locale available that matches |
I can confirm, works well for me now. |
zeripath
pushed a commit
that referenced
this issue
Apr 14, 2021
Fix #14793. The previous implementation used the first return value of matcher.Match, which is the chosen language tag but may contain extensions such as de-DE-u-rg-chzzzz. As mentioned in the documentation of language package, matcher.Match also returns the index of the supported tags, so I think it is better to use it rather than manipulate the returned language tag.
zeripath
pushed a commit
to zeripath/gitea
that referenced
this issue
Apr 15, 2021
Backport go-gitea#15452 Fix go-gitea#14793. The previous implementation used the first return value of matcher.Match, which is the chosen language tag but may contain extensions such as de-DE-u-rg-chzzzz. As mentioned in the documentation of language package, matcher.Match also returns the index of the supported tags, so I think it is better to use it rather than manipulate the returned language tag.
6543
pushed a commit
that referenced
this issue
Apr 15, 2021
Backport #15452 Fix #14793. The previous implementation used the first return value of matcher.Match, which is the chosen language tag but may contain extensions such as de-DE-u-rg-chzzzz. As mentioned in the documentation of language package, matcher.Match also returns the index of the supported tags, so I think it is better to use it rather than manipulate the returned language tag. Co-authored-by: Naohisa Murakami <[email protected]>
AbdulrhmnGhanem
pushed a commit
to kitspace/gitea
that referenced
this issue
Aug 10, 2021
Fix go-gitea#14793. The previous implementation used the first return value of matcher.Match, which is the chosen language tag but may contain extensions such as de-DE-u-rg-chzzzz. As mentioned in the documentation of language package, matcher.Match also returns the index of the supported tags, so I think it is better to use it rather than manipulate the returned language tag.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is a follow-up to issue #9806 which is closed and unfortunately not available for reopening.
Logging in with Safari
Version 14.0.3 (16610.4.3.1.4)
causes the following error message:routers/user/auth.go:524:[handleSignInFull()] Error updating user language [user: 3, locale: de-DE-u-rg-chzzzz]
and shows an empty page. Obviously Safari is sending a strange locale.
Checking with whatismyip.org:
Gitea version:
1.13.2 built with GNU Make 4.2.1, go1.14.6 : bindata
Running gitea binary compiled from source with no reverse proxies on port 443
OS:
Linux 4.19.0-13-cloud-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
DB: PostgreSQL 12
Can you reproduce the bug at https://try.gitea.io:
Log gist:
I've changed the
language
column in theuser
table:then the error goes away. So either the locale must be stripped or the column length must be made greater than 5.
The text was updated successfully, but these errors were encountered: