Be even more picky about invalid URLs
This commit is contained in:
parent
7b093eea91
commit
c48afe3799
@ -1065,8 +1065,7 @@ uri_contains_forbidden_characters (const char *uri)
|
||||
{
|
||||
while (*uri)
|
||||
{
|
||||
/* This is not an exhaustive list, the full URI has segments that allow characters like "[]:" for example. */
|
||||
if (strchr ("`<> ${}\"+", *uri) != NULL || (*uri & 0x80) /* non-ascii */)
|
||||
if (!g_ascii_isalnum (*uri) && !strchr ("-._~:/?#[]@!$&'()*+,;=", *uri))
|
||||
return TRUE;
|
||||
uri++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user