Commit cd21cfc1 authored by Max Kellermann's avatar Max Kellermann

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.
parent 05703cf7
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment