Browse Source

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>
tags/v1.12.5
techknowlogick 3 years ago
parent
commit
20a75f86a1
No account linked to committer's email address
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      modules/setting/setting.go

+ 2
- 2
modules/setting/setting.go View File

@@ -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


Loading…
Cancel
Save