mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 20:33:41 +00:00
Clarify parsing issues and errors
This commit is contained in:
parent
7e0359084e
commit
56c1cda28a
@ -674,7 +674,8 @@ int gitno_extract_url_parts(
|
|||||||
* ==> [user[:pass]@]hostname.tld[:port]/resource
|
* ==> [user[:pass]@]hostname.tld[:port]/resource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Check for user and maybe password */
|
/* Check for user and maybe password. Note that this deviates from RFC-1738
|
||||||
|
* in that it allows non-encoded colons in the password field. */
|
||||||
at = strchr(url, '@');
|
at = strchr(url, '@');
|
||||||
if (at) {
|
if (at) {
|
||||||
colon = strchr(url, ':');
|
colon = strchr(url, ':');
|
||||||
@ -695,7 +696,7 @@ int gitno_extract_url_parts(
|
|||||||
colon = strchr(url, ':');
|
colon = strchr(url, ':');
|
||||||
if (!slash ||
|
if (!slash ||
|
||||||
(colon && (slash < colon))) {
|
(colon && (slash < colon))) {
|
||||||
giterr_set(GITERR_NET, "Malformed URL");
|
giterr_set(GITERR_NET, "Malformed URL: %s", url);
|
||||||
return GIT_EINVALIDSPEC;
|
return GIT_EINVALIDSPEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user