uri: really count dots in verify_uri_segment()

This buggy implementation failed to allow "..." sequences, because the
dot count was always zero.  The usefulness of allowing "..." (or more
dots) is debatable, but since it's a valid file name, we allow it.
This commit is contained in:
Max Kellermann 2010-06-25 21:54:45 +02:00
parent 05703cf73b
commit cd21cfc115

View File

@ -52,8 +52,11 @@ verify_uri_segment(const char *p)
const char *q;
unsigned dots = 0;
while (*p == '.')
while (*p == '.') {
++p;
++dots;
}
if (dots <= 2 && (*p == 0 || *p == '/'))
return NULL;