mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-08 23:08:27 +00:00
api: Log API authorization failures. (#7575)
This commit is contained in:
parent
e893ca1c9a
commit
130d14cec9
@ -35,6 +35,9 @@ func emitLoginAttempt(success bool, username, address string, evLogger events.Lo
|
|||||||
"username": username,
|
"username": username,
|
||||||
"remoteAddress": address,
|
"remoteAddress": address,
|
||||||
})
|
})
|
||||||
|
if !success {
|
||||||
|
l.Infof("Wrong credentials supplied during API authorization from %s", address)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func basicAuthAndSessionMiddleware(cookieName string, guiCfg config.GUIConfiguration, ldapCfg config.LDAPConfiguration, next http.Handler, evLogger events.Logger) http.Handler {
|
func basicAuthAndSessionMiddleware(cookieName string, guiCfg config.GUIConfiguration, ldapCfg config.LDAPConfiguration, next http.Handler, evLogger events.Logger) http.Handler {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user