curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder Daniel himself.

URL userinfo parser does not follow RFC3986

From: Nolan Woods via curl-library <curl-library_at_lists.haxx.se>
Date: Mon, 20 Oct 2025 23:02:43 +0700

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:2=bar_at_some.url/

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
Received on 2025-10-20