[FFmpeg-devel] [PATCH] Allow use of @ character in username and passwords embedded in URLs

Michael Niedermayer michaelni at gmx.at
Fri Nov 16 17:18:43 CET 2012


On Fri, Nov 16, 2012 at 03:58:53PM +0000, Gavin Kinsey wrote:
> On Friday 16 November 2012 12:56:00 Michael Niedermayer wrote:
> > On Thu, Nov 15, 2012 at 11:00:08AM +0000, Gavin Kinsey wrote:
> > >  utils.c |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > 4a332f378c2b3ebfb479499b4cf253f099a273df 
> > > 0001-Allow-use-of-character-in-username-and-passwords-emb.patch From
> > > bbecafc18e07fdbe109ffe6ded8b7fb7e1f9fade Mon Sep 17 00:00:00 2001
> > > From: Gavin Kinsey <gkinsey at ad-holdings.co.uk>
> > > Date: Thu, 15 Nov 2012 10:56:47 +0000
> > > Subject: [PATCH] Allow use of @ character in username and passwords
> > > embedded in URLs
> > > 
> > > ---
> > > 
> > >  libavformat/utils.c |    2 +-
> > >  1 files changed, 1 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/libavformat/utils.c b/libavformat/utils.c
> > > index 4072ac8..8a07f17 100644
> > > --- a/libavformat/utils.c
> > > +++ b/libavformat/utils.c
> > > @@ -3620,7 +3620,7 @@ void av_url_split(char *proto, int proto_size,
> > > 
> > >      /* the rest is hostname, use that to parse auth/port */
> > >      if (ls != p) {
> > >      
> > >          /* authorization (user[:pass]@hostname) */
> > > 
> > > -        if ((at = strchr(p, '@')) && at < ls) {
> > > +        if ((at = strrchr(p, '@')) && at < ls) {
> > > 
> > >              av_strlcpy(authorization, p,
> > 
> > wont this break when @ is in the path ? or server name ?
> 
> Yes.  But in the actual URL the @ can be encoded using the %nn convention.  
> The same isn't true for the ffmpeg parse.  Not ideal but writing a full 
> escape handling patch was more than I have time to do at the moment.

well, thats no excuse to search the path for the @ and accept that
before one in the un/pw


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There seems to be only one solution to NIH syndrom, ... a shooting squad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121116/c839e128/attachment.asc>


More information about the ffmpeg-devel mailing list