Auth Proxy: encoding of non-ASCII headers (#44797)

* Decode auth proxy headers using URL encoding

* Header encoding configuration via settings file

* Rename configuration setting to headers_encoded

* Quoted-printable encoding

* Tests for AuthProxy

* Fix encoding name

* Remove authproxy init
This commit is contained in:
Sergey Kostrukov
2022-03-04 01:58:27 -08:00
committed by GitHub
parent 9b5a42845d
commit 1dca39fb91
8 changed files with 140 additions and 14 deletions
+3
View File
@@ -306,6 +306,7 @@ type Cfg struct {
AuthProxyEnableLoginToken bool
AuthProxyWhitelist string
AuthProxyHeaders map[string]string
AuthProxyHeadersEncoded bool
AuthProxySyncTTL int
// OAuth
@@ -1317,6 +1318,8 @@ func readAuthSettings(iniFile *ini.File, cfg *Cfg) (err error) {
}
}
cfg.AuthProxyHeadersEncoded = authProxy.Key("headers_encoded").MustBool(false)
return nil
}