mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	allow U2F with default settings for gitea in subpath (#12990)
* allow U2F with default settings for gitea in subpath * use trim suffix Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
		@@ -933,7 +933,7 @@ func NewContext() {
 | 
				
			|||||||
	newMarkup()
 | 
						newMarkup()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	sec = Cfg.Section("U2F")
 | 
						sec = Cfg.Section("U2F")
 | 
				
			||||||
	U2F.TrustedFacets, _ = shellquote.Split(sec.Key("TRUSTED_FACETS").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, "/"))
 | 
						U2F.AppID = sec.Key("APP_ID").MustString(strings.TrimSuffix(AppURL, "/"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	UI.ReactionsMap = make(map[string]bool)
 | 
						UI.ReactionsMap = make(map[string]bool)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user