Skip to content

Commit 20a75f8

Browse files
allow U2F with default settings for gitea in subpath (#12990) (#13001)
* allow U2F with default settings for gitea in subpath * use trim suffix Co-authored-by: zeripath <[email protected]> Co-authored-by: zeripath <[email protected]>
1 parent c1c5e00 commit 20a75f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/setting/setting.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,8 +1032,8 @@ func NewContext() {
10321032
newMarkup()
10331033

10341034
sec = Cfg.Section("U2F")
1035-
U2F.TrustedFacets, _ = shellquote.Split(sec.Key("TRUSTED_FACETS").MustString(strings.TrimRight(AppURL, "/")))
1036-
U2F.AppID = sec.Key("APP_ID").MustString(strings.TrimRight(AppURL, "/"))
1035+
U2F.TrustedFacets, _ = shellquote.Split(sec.Key("TRUSTED_FACETS").MustString(strings.TrimSuffix(AppURL, AppSubURL+"/")))
1036+
U2F.AppID = sec.Key("APP_ID").MustString(strings.TrimSuffix(AppURL, "/"))
10371037

10381038
zip.Verbose = false
10391039

0 commit comments

Comments
 (0)