diff options
| author | 2021-04-17 18:52:19 +0100 | |
|---|---|---|
| committer | 2021-04-17 18:52:19 +0100 | |
| commit | 8e6b4d17d4d5fc45d2ed8c3043bed770c6d64d22 (patch) | |
| tree | 54c9b151e3812bdd49daf012ed3664c39f50b555 /src/modules/m_httpd_acl.cpp | |
| parent | Clean up the ConvTo functions. (diff) | |
| parent | Improve the debug logging for httpd_acl auth attempts. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_httpd_acl.cpp')
| -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 b0ed65455..19af85f04 100644 --- a/src/modules/m_httpd_acl.cpp +++ b/src/modules/m_httpd_acl.cpp @@ -199,20 +199,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; |
