From 18d04e8f806b6fa4241ed2246073c241252eb84c Mon Sep 17 00:00:00 2001 From: Mitchell Riley Date: Sun, 31 Dec 2023 13:47:18 -0500 Subject: [PATCH] Prevent 433 response for Nonutf8{User/Real}name (#244) Sending `NICK foo` after connectClient() causes an ERR_NICKNAMEINUSE response instead of the expected RPL_WELCOME. --- irctest/server_tests/utf8.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/irctest/server_tests/utf8.py b/irctest/server_tests/utf8.py index de30005b..83284535 100644 --- a/irctest/server_tests/utf8.py +++ b/irctest/server_tests/utf8.py @@ -54,15 +54,15 @@ def testNonutf8Realname(self): raise runner.IsupportTokenNotSupported("UTF8ONLY") self.addClient() - self.sendLine(2, "NICK foo") + self.sendLine(2, "NICK bar") self.clients[2].conn.sendall(b"USER username * * :i\xe8rc\xe9\r\n") d = self.clients[2].conn.recv(1024) - if b" FAIL " in d or b" 468 " in d: # ERR_INVALIDUSERNAME + if b"FAIL " in d or b"468 " in d: # ERR_INVALIDUSERNAME return # nothing more to test - self.assertIn(b" 001 ", d) + self.assertIn(b"001 ", d) - self.sendLine(2, "WHOIS foo") + self.sendLine(2, "WHOIS bar") self.getMessages(2) def testNonutf8Username(self): @@ -71,7 +71,7 @@ def testNonutf8Username(self): raise runner.IsupportTokenNotSupported("UTF8ONLY") self.addClient() - self.sendLine(2, "NICK foo") + self.sendLine(2, "NICK bar") self.sendLine(2, "USER 😊😊😊😊😊😊😊😊😊😊 * * :realname") m = self.getRegistrationMessage(2) if m.command in ("FAIL", "468"): # ERR_INVALIDUSERNAME @@ -80,7 +80,7 @@ def testNonutf8Username(self): m, command="001", ) - self.sendLine(2, "WHOIS foo") + self.sendLine(2, "WHOIS bar") self.getMessages(2)