commit 5e41063f1b0cd8f096ec925777bc4cf4ef6ba828 from: Omar Polo date: Mon Jul 04 08:15:39 2022 UTC bugfix: allow @ and : in paths gmid would disallow the '@' and ':' characters in paths (unless percent-encoded.) Issue reported by freezr. commit - df9b3790817d4d64fee06e046a479a67d4a91b13 commit + 5e41063f1b0cd8f096ec925777bc4cf4ef6ba828 blob - ae292d068d98fafc10dc7b221f260588029e1fc6 blob + f34b800bae813b3cf0b3f839acabeb9754ba63bb --- iri.c +++ iri.c @@ -352,6 +352,8 @@ parse_path(struct parser *p) while (unreserved(*p->iri) || sub_delimiters(*p->iri) + || *p->iri == '@' + || *p->iri == ':' || *p->iri == '/' || parse_pct_encoded(p) || valid_multibyte_utf8(p)) blob - 6595f92dc5ec0c201cab30c116bbdf6745e2ebaf blob + c6725b52741ac8604f0402272107b25157a022db --- regress/iri_test.c +++ regress/iri_test.c @@ -198,6 +198,10 @@ main(void) PASS, IRI("http", "a", "", "", "", ""), "avoid infinite loops (see v1.6.1)"); + TEST("gemini://example.com/@f:b!(z$&)/baz", + PASS, + IRI("gemini", "example.com", "", "@f:b!(z$&)/baz", "", ""), + "allow @, :, !, (), $ and & in paths"); /* query */ TEST("foo://example.com/foo/?gne",