mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Log IP on SSH authentication failure for Built-in SSH server (#13150)
* Log IP on SSH authentication failure fixes https://github.com/go-gitea/gitea/issues/13094 * include string 'Failed authentication attempt' in error * update fail2ban docs also match failed authentication over command line * better logging of authentication errors with IP addresses * format ... Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@@ -102,6 +102,7 @@ func HTTP(ctx *context.Context) {
|
||||
|
||||
owner, err := models.GetUserByName(username)
|
||||
if err != nil {
|
||||
log.Error("Attempted access of unknown user from %s", ctx.RemoteAddr())
|
||||
ctx.NotFoundOrServerError("GetUserByName", models.IsErrUserNotExist, err)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user