diff options
| author | 2022-12-11 08:37:25 +0000 | |
|---|---|---|
| committer | 2022-12-11 08:49:44 +0000 | |
| commit | cd6329d4b08bcfc9853948fc89310013b112dd53 (patch) | |
| tree | 70ae5692bee40c022a36d0952adafbd6fd8302a4 /src/modules | |
| parent | Update some references to services_account that were missed. (diff) | |
Improve the oper login flow and error messages.
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/m_account.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_sslinfo.cpp | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/m_account.cpp b/src/modules/m_account.cpp index 3c446dffc..d9251f04f 100644 --- a/src/modules/m_account.cpp +++ b/src/modules/m_account.cpp @@ -357,6 +357,8 @@ public: return MOD_RES_PASSTHRU; // Matches on account name. } + ServerInstance->SNO.WriteGlobalSno('o', "%s (%s) [%s] failed to log into the \x02%s\x02 oper account because they are not logged into the correct user account.", + user->nick.c_str(), user->MakeHost().c_str(), user->GetIPString().c_str(), oper->GetName().c_str()); return MOD_RES_DENY; // Account required but it does not match. } diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp index 2f3d4d0c8..d89f74006 100644 --- a/src/modules/m_sslinfo.cpp +++ b/src/modules/m_sslinfo.cpp @@ -327,11 +327,19 @@ public: { auto cert = cmd.sslapi.GetCertificate(user); if (oper->GetConfig()->getBool("sslonly") && !cert) + { + ServerInstance->SNO.WriteGlobalSno('o', "%s (%s) [%s] failed to log into the \x02%s\x02 oper account because they are not connected using TLS.", + user->nick.c_str(), user->MakeHost().c_str(), user->GetIPString().c_str(), oper->GetName().c_str()); return MOD_RES_DENY; + } const std::string fingerprint = oper->GetConfig()->getString("fingerprint"); if (!fingerprint.empty() && (!cert || !MatchFP(cert, fingerprint))) + { + ServerInstance->SNO.WriteGlobalSno('o', "%s (%s) [%s] failed to log into the \x02%s\x02 oper account because they are not using the correct TLS client certificate.", + user->nick.c_str(), user->MakeHost().c_str(), user->GetIPString().c_str(), oper->GetName().c_str()); return MOD_RES_DENY; + } return MOD_RES_PASSTHRU; } |
