summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes1
-rw-r--r--src/core/ns_saset.c6
-rw-r--r--src/core/ns_set.c6
-rw-r--r--version.log6
4 files changed, 18 insertions, 1 deletions
diff --git a/Changes b/Changes
index 70d79f031..2bd562fbe 100644
--- a/Changes
+++ b/Changes
@@ -17,6 +17,7 @@ Anope Version S V N
03/03 F We now send out UNKLINE on hybrid when /os akill del is issued. [#656]
03/14 F /os modunload dosnt clear moduleData before calling AnopeFini. [ #00]
03/18 F DefCon's AKILL will now honor the server's sync flag. [#643]
+03/18 F Password length checking in some cases was out. [ #00]
Anope Version 1.7.18
--------------------
diff --git a/src/core/ns_saset.c b/src/core/ns_saset.c
index c521c15b8..f4bffeb17 100644
--- a/src/core/ns_saset.c
+++ b/src/core/ns_saset.c
@@ -231,6 +231,12 @@ int do_saset_password(User * u, NickCore * nc, char *param)
return MOD_CONT;
}
+ if (len > PASSMAX) {
+ len = PASSMAX;
+ param[len] = 0;
+ notice_lang(s_NickServ, u, PASSWORD_TRUNCATED, PASSMAX);
+ }
+
if (nc->pass)
free(nc->pass);
diff --git a/src/core/ns_set.c b/src/core/ns_set.c
index ad493b104..70cadd94f 100644
--- a/src/core/ns_set.c
+++ b/src/core/ns_set.c
@@ -210,6 +210,12 @@ int do_set_password(User * u, NickCore * nc, char *param)
return MOD_CONT;
}
+ if (len > PASSMAX) {
+ len = PASSMAX;
+ param[len] = 0;
+ notice_lang(s_NickServ, u, PASSWORD_TRUNCATED, PASSMAX);
+ }
+
if (nc->pass)
free(nc->pass);
diff --git a/version.log b/version.log
index 6a04fbc32..dc20da26e 100644
--- a/version.log
+++ b/version.log
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="18"
VERSION_EXTRA="-svn"
-VERSION_BUILD="1235"
+VERSION_BUILD="1236"
# $Log$
#
+# BUILD : 1.7.18 (1236)
+# BUGS :
+# NOTES : Applied Rob's password length patch
+#
# BUILD : 1.7.18 (1235)
# BUGS : 643
# NOTES : Defcon's AKILL will now honor the server's sync flag