Znote / ZnoteAAC

Developement repository for the Znote AAC project. A website portal to represent and manage your Open Tibia server.
MIT License
146 stars 127 forks source link

Add status code 401 on login fail #301

Closed yrpen closed 7 years ago

yrpen commented 7 years ago

It would be great if invalid credits in login for will produce 401 status code in logs. 401 Unauthorized (RFC 7235) https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

It'll help configure fail2ban to protect ZnoteAcc against brute force attacks.

At this moment failed login attemt looks like: 127.0.0.1 - - [16/Jul/2017:09:06:05 +0000] "POST /login.php HTTP/1.1" 200 2146 "https://example.com/login.php" "Mozilla/5.0_my_client_options_etc"