reject . in labels
authorChristian Grothoff <christian@grothoff.org>
Fri, 26 Apr 2019 14:34:13 +0000 (16:34 +0200)
committerChristian Grothoff <christian@grothoff.org>
Fri, 26 Apr 2019 14:34:13 +0000 (16:34 +0200)
src/namestore/gnunet-namestore.c

index 470716f43afc6e779081ca4a9d76f7ffbf21fe75..34bbf011191070ffcf4eb0218394f64b5c1817f6 100644 (file)
@@ -986,6 +986,17 @@ identity_cb (void *cls,
   struct GNUNET_GNSRECORD_Data rd;
 
   el = NULL;
+  if ( (NULL != name) &&
+       (0 != strchr (name, '.')) )
+  {
+    fprintf (stderr,
+            _("Label `%s' contains `.' which is not allowed\n"),
+            name);
+    GNUNET_SCHEDULER_shutdown ();
+    ret = -1;
+    return;
+  }
+    
   if (NULL == ego)
   {
     if (NULL != ego_name)