repo: ngircd action: commit revision: path_from: revision_from: b92a7627f3dc6b85310964d4b602bea2509dade6: path_to: revision_to:
commit b92a7627f3dc6b85310964d4b602bea2509dade6 Author: Alexander BartonDate: Tue Jul 22 13:22:54 2008 +0200 Don't allow empty channel names ("#") in strict RFC mode. This closes Bug #88. Patch proposed by Eric , but with wrong length comparision: please note that Channel_IsValidName() checks the name INCLUDING the prefix, so the test must be length<=1! diff --git a/src/ngircd/channel.c b/src/ngircd/channel.c
--- a/src/ngircd/channel.c
+++ b/src/ngircd/channel.c
@@ -500,6 +500,10 @@ Channel_IsValidName( const char *Name )
{
assert( Name != NULL );
+#ifdef STRICT_RFC
+ if (strlen(Name) <= 1)
+ return false;
+#endif
if (strchr("+#", Name[0]) == NULL)
return false;
if (strlen(Name) >= CHANNEL_NAME_LEN)
-----END OF PAGE-----