mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-11 07:53:55 +00:00
Properly parse urls that include protocol://
This commit is contained in:
parent
210d532526
commit
c91444055a
@ -581,7 +581,7 @@ int gitno_extract_url_parts(
|
|||||||
const char *url,
|
const char *url,
|
||||||
const char *default_port)
|
const char *default_port)
|
||||||
{
|
{
|
||||||
char *colon, *slash, *at, *end;
|
char *colon, *dblslash, *slash, *at, *end;
|
||||||
const char *start;
|
const char *start;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -589,6 +589,9 @@ int gitno_extract_url_parts(
|
|||||||
* ==> [user[:pass]@]hostname.tld[:port]/resource
|
* ==> [user[:pass]@]hostname.tld[:port]/resource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
dblslash = strstr(url, "://");
|
||||||
|
if (dblslash) url = dblslash+3;
|
||||||
|
|
||||||
colon = strchr(url, ':');
|
colon = strchr(url, ':');
|
||||||
slash = strchr(url, '/');
|
slash = strchr(url, '/');
|
||||||
at = strchr(url, '@');
|
at = strchr(url, '@');
|
||||||
|
Loading…
Reference in New Issue
Block a user