Re: clone from url with email address as username?(escaping @ symbol)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ben Bennett <benbennett@xxxxxxxxx> writes:

> Is it escaping the %40 when passed down? I am getting an error 401  ,
> and checking the server logs , it is passing the %40 to the server in
> the username.
> Running curl from command line , I can connect, but through git , the
> username is getting mangled or I have something screwed up.

OK, so it seems Git should be fixed to unescape this %40 somewhere,
most likely in http_auth_init in http.c, in addition to by fix below.
http://curl.haxx.se/libcurl/c/curl_easy_unescape.html might help. I've
consumed by Git time budget for now, so if anyone else can have a
look ...

>> --- a/http.c
>> +++ b/http.c
>> @@ -281,9 +281,10 @@ static void http_auth_init(const char *url)
>>         * "proto://<host>/..."?
>>         */
>>        cp += 3;
>> -       at = strchr(cp, '@');
>>        colon = strchr(cp, ':');
>>        slash = strchrnul(cp, '/');
>> +       for(at = slash-1; *at != '@' && *at != '/'; at--)
>> +               continue;
>>        if (!at || slash <= at)
>>                return; /* No credentials */
>>        if (!colon || at <= colon) {
>>

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]