summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-21 21:14:53 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-21 21:14:53 +0000
commit0baef3051c3d85c36f1a4a287ff65d59e8dd1a59 (patch)
treee30b12c2c3b39f4d651ce95353101453176ee99e
parent4648c98fa1b221d8c9dff5dcae030d33ac12982f (diff)
Enforce 64 char dns limits
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3277 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_chghost.cpp5
-rw-r--r--src/modules/m_sethost.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index 9d60d929c..0dd250f18 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -37,6 +37,11 @@ class cmd_chghost : public command_t
void Handle(char **parameters, int pcnt, userrec *user)
{
+ if (strlen(parameters[1]) > 64)
+ {
+ WriteServ(user->fd,"NOTICE %s :*** CHGHOST: Host too long",user->nick);
+ return;
+ }
for (unsigned int x = 0; x < strlen(parameters[1]); x++)
{
if (((tolower(parameters[1][x]) < 'a') || (tolower(parameters[1][x]) > 'z')) && (parameters[1][x] != '.'))
diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp
index 149795696..7bc01e118 100644
--- a/src/modules/m_sethost.cpp
+++ b/src/modules/m_sethost.cpp
@@ -37,6 +37,11 @@ class cmd_sethost : public command_t
void Handle (char **parameters, int pcnt, userrec *user)
{
+ if (strlen(parameters[0]) > 64)
+ {
+ WriteServ(user->fd,"NOTICE %s :*** SETHOST: Host too long",user->nick);
+ return;
+ }
for (unsigned int x = 0; x < strlen(parameters[0]); x++)
{
if (((tolower(parameters[0][x]) < 'a') || (tolower(parameters[0][x]) > 'z')) && (parameters[0][x] != '.'))