INN commit: branches/2.6/nnrpd (misc.c sasl.c)

INN Commit rra at isc.org
Sat Oct 8 20:53:39 UTC 2016


    Date: Saturday, October 8, 2016 @ 13:53:39
  Author: iulius
Revision: 10078

SASL mechanisms and compression algorithms are case-sensitive

Only upper case is allowed.

Modified:
  branches/2.6/nnrpd/misc.c
  branches/2.6/nnrpd/sasl.c

--------+
 misc.c |    5 +++--
 sasl.c |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

Modified: misc.c
===================================================================
--- misc.c	2016-10-08 20:52:51 UTC (rev 10077)
+++ misc.c	2016-10-08 20:53:39 UTC (rev 10078)
@@ -475,7 +475,8 @@
     for (; *p != '\0'; p++) {
         len++;
 
-        if (!isalnum((unsigned char) *p) && *p != '-' && *p != '_') {
+        if (!isupper((unsigned char) *p) && !isdigit((unsigned char) *p)
+            && *p != '-' && *p != '_') {
             return false;
         }
     }
@@ -500,7 +501,7 @@
     /* Check the argument. */
     if (ac > 1) {
         if (!IsValidAlgorithm(av[1])) {
-            Reply("%d Syntax error in compression algorithm\r\n",
+            Reply("%d Syntax error in compression algorithm name\r\n",
                   NNTP_ERR_SYNTAX);
             return;
         }

Modified: sasl.c
===================================================================
--- sasl.c	2016-10-08 20:52:51 UTC (rev 10077)
+++ sasl.c	2016-10-08 20:53:39 UTC (rev 10078)
@@ -106,7 +106,7 @@
     mech = av[2];
 
     if (!IsValidAlgorithm(mech)) {
-        Reply("%d Syntax error in mechanism\r\n", NNTP_ERR_SYNTAX);
+        Reply("%d Syntax error in mechanism name\r\n", NNTP_ERR_SYNTAX);
         return;
     }
 



More information about the inn-committers mailing list