Fix sending server passwords with spaces in them

Fix #1928
Fix #1899
This commit is contained in:
Alexey Sokolov
2025-03-16 21:31:34 +00:00
parent 29104e81a2
commit ce47e7ea3d
2 changed files with 18 additions and 1 deletions

View File

@@ -964,5 +964,22 @@ TEST_F(ZNCTest, SaslAuthAbort) {
client.ReadUntil(":irc.znc.in 906 foo :SASL authentication aborted");
}
TEST_F(ZNCTest, SpacedServerPassword) {
auto znc = Run();
auto ircd = ConnectIRCd();
auto client = LoginClient();
client.Write("znc delserver 127.0.0.1");
client.Write("znc addserver 127.0.0.1 6667 a b");
client.Write("znc jump");
auto ircd2 = ConnectIRCd();
ircd2.ReadUntil("PASS :a b");
client.Write("znc delserver 127.0.0.1");
client.Write("znc addserver 127.0.0.1 6667 a");
client.Write("znc jump");
auto ircd3 = ConnectIRCd();
// No :
ircd3.ReadUntil("PASS a");
}
} // namespace
} // namespace znc_inttest