aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortechknowlogick2020-10-01 13:22:49 -0400
committerGitHub2020-10-01 13:22:49 -0400
commit20a75f86a16dba5b4039b9d4dee695cf82501cfd (patch)
treedb33c9011b6448eb98e2d8755fc292798a16725e
parentc1c5e00d207634acfa73aea2c3bdc43508fa7181 (diff)
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 <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
-rw-r--r--modules/setting/setting.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 45e55a2f9..42a01cc11 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -1032,8 +1032,8 @@ func NewContext() {
newMarkup()
sec = Cfg.Section("U2F")
- U2F.TrustedFacets, _ = shellquote.Split(sec.Key("TRUSTED_FACETS").MustString(strings.TrimRight(AppURL, "/")))
- U2F.AppID = sec.Key("APP_ID").MustString(strings.TrimRight(AppURL, "/"))
+ U2F.TrustedFacets, _ = shellquote.Split(sec.Key("TRUSTED_FACETS").MustString(strings.TrimSuffix(AppURL, AppSubURL+"/")))
+ U2F.AppID = sec.Key("APP_ID").MustString(strings.TrimSuffix(AppURL, "/"))
zip.Verbose = false