Skip to content

Commit

Permalink
allow U2F with default settings for gitea in subpath (#12990) (#13001)
Browse files Browse the repository at this point in the history
* allow U2F with default settings for gitea in subpath

* use trim suffix

Co-authored-by: zeripath <[email protected]>

Co-authored-by: zeripath <[email protected]>
  • Loading branch information
techknowlogick and zeripath authored Oct 1, 2020
1 parent c1c5e00 commit 20a75f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/setting/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 20a75f8

Please sign in to comment.