]> jfr.im git - irc/quakenet/newserv.git/commitdiff
CHANSERV: block chars < 32 and chars > 127, as users have trouble authing with the...
authorChris Porter <redacted>
Sun, 7 Sep 2014 22:06:22 +0000 (23:06 +0100)
committerChris Porter <redacted>
Sun, 7 Sep 2014 22:06:22 +0000 (23:06 +0100)
--HG--
branch : chanserv-live

chanserv/authlib.c
chanserv/chanserv_messages.h

index 09733b614f3df843b5d494214b0d0d6cc8a76fc4..6ff0d386c4894a57e4c512c144ab2d50ab2eb9e8 100644 (file)
@@ -140,6 +140,8 @@ int csa_checkpasswordquality(char *password) {
       cntdigits++;
     if(islower(password[i]) || isupper(password[i]))
       cntletters++;
+    if(password[i] < 32 || password[i] > 127)
+      return QM_PWINVALID;
   }
 
   if( cntweak > 3 || !cntdigits || !cntletters)
index 4cab18630a44f6c0de6488df1f2f6c726661ac58..9a4d545d2416e996d96a78f0e89f314385a2fd78 100644 (file)
@@ -249,6 +249,7 @@ BeginMessages() {
   msg(QM_INACTIVEACCOUNT,"This account has not yet been activated.",""),
   msg(QM_PWTOLONG, "Sorry, but new password is too long (maximum length 10 chars)", ""),
   msg(QM_TOOMANYCHANNELS, "User is known on too many channels.", ""),
+  msg(QM_PWINVALID, "Password contains invalid characters.", ""),
 } 
 EndMessages()
 #endif