All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Ben Bennett <benbennett@gmail.com>
Cc: Sverre Rabbelier <srabbelier@gmail.com>, git@vger.kernel.org
Subject: Re: clone from url with email address as username?(escaping @ symbol)
Date: Tue, 29 Sep 2009 20:03:25 +0200	[thread overview]
Message-ID: <vpq1vlpr5le.fsf@bauges.imag.fr> (raw)
In-Reply-To: <970bc7c80909291051q5dff9209u650cee4f84d92fae@mail.gmail.com> (Ben Bennett's message of "Tue\, 29 Sep 2009 12\:51\:41 -0500")

Ben Bennett <benbennett@gmail.com> 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/

  reply	other threads:[~2009-09-29 18:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-29 14:20 clone from url with email address as username?(escaping @ symbol) Ben Bennett
2009-09-29 14:25 ` Sverre Rabbelier
2009-09-29 14:30   ` Matthieu Moy
2009-09-29 14:32     ` Sverre Rabbelier
2009-09-29 15:31       ` Ben Bennett
2009-09-29 16:59         ` Matthieu Moy
2009-09-29 17:07           ` Matthieu Moy
2009-09-29 17:48           ` Daniel Stenberg
2009-09-29 18:09             ` Matthieu Moy
2009-09-29 20:38               ` Daniel Stenberg
2009-09-29 20:47                 ` Matthieu Moy
2009-09-29 17:51           ` Ben Bennett
2009-09-29 18:03             ` Matthieu Moy [this message]
2009-09-29 18:12               ` Matthieu Moy
2009-09-29 18:55                 ` Ben Bennett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vpq1vlpr5le.fsf@bauges.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=benbennett@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=srabbelier@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.