close bug 657
This commit is contained in:
parent
8b6063490d
commit
ab90b9f427
@ -1615,13 +1615,6 @@ BAD_REQUEST:
|
|||||||
*purl = ' ';
|
*purl = ' ';
|
||||||
count = sscanf(purl, " %[^ ] HTTP/%d.%*d", buf, &blank);
|
count = sscanf(purl, " %[^ ] HTTP/%d.%*d", buf, &blank);
|
||||||
|
|
||||||
test = decodeString(buf, 0);
|
|
||||||
if(test == NULL)
|
|
||||||
goto BAD_REQUEST;
|
|
||||||
if(test == (buf+1)) {
|
|
||||||
sendHeaders(HTTP_NOT_FOUND);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (count < 1 || buf[0] != '/') {
|
if (count < 1 || buf[0] != '/') {
|
||||||
/* Garbled request/URL */
|
/* Garbled request/URL */
|
||||||
goto BAD_REQUEST;
|
goto BAD_REQUEST;
|
||||||
@ -1639,6 +1632,13 @@ BAD_REQUEST:
|
|||||||
config->query = test;
|
config->query = test;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test = decodeString(url, 0);
|
||||||
|
if(test == NULL)
|
||||||
|
goto BAD_REQUEST;
|
||||||
|
if(test == (buf+1)) {
|
||||||
|
sendHeaders(HTTP_NOT_FOUND);
|
||||||
|
break;
|
||||||
|
}
|
||||||
/* algorithm stolen from libbb bb_simplify_path(),
|
/* algorithm stolen from libbb bb_simplify_path(),
|
||||||
but don`t strdup and reducing trailing slash and protect out root */
|
but don`t strdup and reducing trailing slash and protect out root */
|
||||||
purl = test = url;
|
purl = test = url;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user