Parse network and client from authzid. Tests will be in future commit

This commit is contained in:
Alexey Sokolov
2025-02-24 09:21:30 +00:00
parent ed20d489b6
commit 8778a2bb5d
4 changed files with 32 additions and 11 deletions
+3 -5
View File
@@ -36,13 +36,11 @@ class CSASLMechanismPlain : public CModule {
CString sAuthcId = sMessage.Token(1, false, sNullSeparator, true);
CString sPassword = sMessage.Token(2, false, sNullSeparator, true);
if (!sAuthzId.empty() && sAuthzId != sAuthcId) {
// Reject custom SASL plain authorization identifiers
GetClient()->RefuseSASLLogin("No support for custom AuthzId");
return HALTMODS;
if (sAuthzId.empty()) {
sAuthzId = sAuthcId;
}
GetClient()->StartSASLPasswordCheck(sAuthcId, sPassword);
GetClient()->StartSASLPasswordCheck(sAuthcId, sPassword, sAuthzId);
return HALTMODS;
}
};