-clarify name rules
authorChristian Grothoff <christian@grothoff.org>
Mon, 16 Jul 2012 20:35:29 +0000 (20:35 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 16 Jul 2012 20:35:29 +0000 (20:35 +0000)
src/gns/gnunet-gns-fcfsd.c

index b3d7a3242b61445097529ca34d92712b89c8d07b..07f3e93421b1b6f3289b6618f195f95d4f49c17a 100644 (file)
@@ -544,6 +544,22 @@ create_response (void *cls,
       switch (request->phase)
        {
        case RP_START:
+         if (NULL != strchr (request->domain_name, (int) '.'))
+         {
+           GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                       _("Domain name must not contain `.'\n"));
+           request->phase = RP_FAIL;
+           return fill_s_reply ("Domain name must not contain `.', sorry.",
+                                request, connection);
+         }
+         if (NULL != strchr (request->domain_name, (int) '+'))
+         {
+           GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                       _("Domain name must not contain `+'\n"));
+           request->phase = RP_FAIL;
+           return fill_s_reply ("Domain name must not contain `+', sorry.",
+                                request, connection);
+         }
          request->phase = RP_LOOKUP;
          request->qe = GNUNET_NAMESTORE_lookup_record (ns,
                                                        &fcfsd_zone,