X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fdirplex.c;h=52313cc594dd5c6a8b3825742d9368b3eac3155d;hb=1604c0967129b4b348f3c6150f5a2c87f780e404;hp=402d6543d13e1050430c2ac0a78d80162cd199ea;hpb=147c2b51fe166f5734ebded4729ca831fc19123e;p=ashd.git diff --git a/src/dirplex.c b/src/dirplex.c index 402d654..52313cc 100644 --- a/src/dirplex.c +++ b/src/dirplex.c @@ -494,6 +494,12 @@ static void serve(struct hthead *req, int fd) } else { *(p2++) = 0; } + if((tmp = unquoteurl(p)) == NULL) { + simpleerror(fd, 400, "Bad Request", "The requested URL contains an invalid escape sequence."); + goto fail; + } + strcpy(p, tmp); + free(tmp); if(!*p) { if(p2 == NULL) {