1
0
Fork 0
mirror of https://github.com/Luzifer/nginx-sso.git synced 2024-10-18 07:34:22 +00:00

Fix: Compiler refuses to convert 0x0 to string

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2022-12-21 01:06:02 +01:00
parent 9a5aa86b1b
commit 89a1a2e565
Signed by: luzifer
GPG key ID: D91C3E91E4CAD6F5

View file

@ -175,7 +175,7 @@ func handleAuthRequest(res http.ResponseWriter, r *http.Request) {
case plugins.ErrNoValidUserFound: case plugins.ErrNoValidUserFound:
// No valid user found, check whether special anonymous "user" has access // No valid user found, check whether special anonymous "user" has access
// Username is set to 0x0 character to prevent accidental whitelist-match // Username is set to 0x0 character to prevent accidental whitelist-match
if mainCfg.ACL.HasAccess(string(0x0), nil, r) { if mainCfg.ACL.HasAccess(string(byte(0x0)), nil, r) {
mainCfg.AuditLog.Log(auditEventValidate, r, map[string]string{"result": "anonymous access granted"}) // #nosec G104 - This is only logging mainCfg.AuditLog.Log(auditEventValidate, r, map[string]string{"result": "anonymous access granted"}) // #nosec G104 - This is only logging
res.WriteHeader(http.StatusOK) res.WriteHeader(http.StatusOK)
return return