diff options
author | Sadie Powell <sadie@witchery.services> | 2021-04-17 18:04:50 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2021-04-17 18:04:50 +0100 |
commit | 23b8d6bbed74a44bef4936b1f92d0376a974bf76 (patch) | |
tree | fd14753a9023280b7e50b89973a8926cb5237cce | |
parent | b0f16081ccaef527ed4b5434a7264508cf455f39 (diff) |
Improve the debug logging for httpd_acl auth attempts.
-rw-r--r-- | src/modules/m_httpd_acl.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/m_httpd_acl.cpp b/src/modules/m_httpd_acl.cpp index 533e3c578..197bf589e 100644 --- a/src/modules/m_httpd_acl.cpp +++ b/src/modules/m_httpd_acl.cpp @@ -200,20 +200,30 @@ class ModuleHTTPAccessList : public Module, public HTTPACLEventListener return true; } else + { /* Invalid password */ + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "HTTP authorization: password and username do not match"); BlockAccess(http, 401, "WWW-Authenticate", "Basic realm=\"Restricted Object\""); + } } else + { /* Malformed user:pass pair */ + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "HTTP authorization: password and username malformed"); BlockAccess(http, 401, "WWW-Authenticate", "Basic realm=\"Restricted Object\""); + } } else + { /* Unsupported authentication type */ + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "HTTP authorization: unsupported auth type: %s", authtype.c_str()); BlockAccess(http, 401, "WWW-Authenticate", "Basic realm=\"Restricted Object\""); + } } else { /* No password given at all, access denied */ + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "HTTP authorization: password and username not sent"); BlockAccess(http, 401, "WWW-Authenticate", "Basic realm=\"Restricted Object\""); } return false; |