]> andersk Git - moira.git/commitdiff
Don't allow control characters in string members of list.
authorzacheiss <zacheiss>
Fri, 24 Aug 2001 05:57:07 +0000 (05:57 +0000)
committerzacheiss <zacheiss>
Fri, 24 Aug 2001 05:57:07 +0000 (05:57 +0000)
clients/lib/member.c

index f2bc3eb065da9dded0b108e9bcbd83937ccc09c8..b47d452839027621353adfe45cbf79bfca2067c3 100644 (file)
@@ -15,6 +15,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <ctype.h>
 
 #include <krb.h>
 
@@ -24,7 +25,17 @@ static char default_realm[REALM_SZ];
 
 int mrcl_validate_string_member(char *str)
 {
-  char *p, *lname;
+  char *p, *lname, *ret;
+
+  for (ret = str; *ret; ret++)
+    {
+      if (iscntrl(*ret))
+       {
+         mrcl_set_message("STRING \"%s\" contains control characters, "
+                          "which are not allowed.", str);
+         return MRCL_REJECT;
+       }
+    }
 
   p = strchr(str, '@');
   if (p)
This page took 0.053248 seconds and 5 git commands to generate.