Closed louis77 closed 3 years ago
So strip de-DE-u-rg-chzzzz
to de-DE
is acceptable?
I found this issue in the golang repo: https://github.com/golang/go/issues/24211
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]
So strip
de-DE-u-rg-chzzzz
tode-DE
is acceptable?
What we should do is strip off the - one by one until there is a locale available that matches
@louis77 could you help to confirm #15452 fix this?
I can confirm, works well for me now.
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 12Can 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.