]> code.citadel.org Git - citadel.git/blobdiff - webcit/paramhandling.c
URL-Parsing: abort on error.
[citadel.git] / webcit / paramhandling.c
index a2dcca2f368f9efe1d0e8629c9b19cc58f5764ec..5c87c578c822886bfb953702bfe9880fb01ae22e 100644 (file)
@@ -51,17 +51,17 @@ void ParseURLParams(StrBuf *url)
                }
                keylen = aptr - up - 1; /* -1 -> '=' */
                if(keylen > sizeof(u->url_key)) {
-                       syslog(1, "URLkey to long! [%s]", up);
-                       continue;
+                       syslog(1, "invalid url_key");
+                       return;
                }
 
                u = (urlcontent *) malloc(sizeof(urlcontent));
                memcpy(u->url_key, up, keylen);
                u->url_key[keylen] = '\0';
                if (keylen < 0) {
-                       syslog(1, "URLkey to long! [%s]", up);
+                       syslog(1, "invalid url_key");
                        free(u);
-                       continue;
+                       return;
                }
                
                if (strncmp(u->url_key, "__", 2) != 0)
@@ -371,7 +371,7 @@ void PutBstr(const char *key, long keylen, StrBuf *Value)
        urlcontent *u;
 
        if(keylen > sizeof(u->url_key)) {
-               syslog(1, "URLkey to long! [%s]", key);
+               syslog(1, "invalid url_key");
                FreeStrBuf(&Value);
                return;
        }