From: Christian Grothoff Date: Mon, 16 Jul 2012 20:35:29 +0000 (+0000) Subject: -clarify name rules X-Git-Tag: initial-import-from-subversion-38251~12455 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c38e584f62406f3a7b067b9801ae61eec868e337;p=oweals%2Fgnunet.git -clarify name rules --- diff --git a/src/gns/gnunet-gns-fcfsd.c b/src/gns/gnunet-gns-fcfsd.c index b3d7a3242..07f3e9342 100644 --- a/src/gns/gnunet-gns-fcfsd.c +++ b/src/gns/gnunet-gns-fcfsd.c @@ -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,