URL userinfo parser does not follow RFC3986
Nolan Woods via curl-library <[email protected]> Mon, 20 Oct 2025 23:02:43 +0700
| Newsgroups | gmane.comp.web.curl.library |
|---|---|
| Message-ID | <[email protected]> |
Hi, I appreciate that 99.99% of use cases are "user:pass" for the userinfo portion of the URL, but RFC3986 allows for a much broader list of characters, and colons are not necessarily delimiters. https://www.rfc-editor.org/rfc/rfc3986#section-3.2.1 <https://www.rfc-editor.org/rfc/rfc3986#section-3.2.1> For example: myscheme://a:1=foo&a:[email protected]/ The CURL URL parser is useful on its own for parsing arbitrary URI. Especially when curl is imported for its more general use case in other aspects of the program. I propose that a CURLUPART_USERINFO CURLUPart be added such that curl_url_get/set returns the complete string rather than trying to parse the ':' assuming a specific scheme. https://github.com/curl/curl/blob/dbff3eec456d86386be4cebb89cbe4dfc21a06b6/include/curl/urlapi.h#L73 Thoughts? -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html