[FFmpeg-devel] [PATCH]Fix http authentication

Michael Niedermayer michaelni at gmx.at
Wed Feb 26 21:15:03 CET 2014


On Wed, Feb 26, 2014 at 10:01:41AM +0100, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch apparently fixes ticket #3417, I cannot really judge if it is 
> correct.
> 
> Please push / comment, Carl Eugen

>  httpauth.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 0b928e656acf2c8ed1556bdda6ae831149d15ddc  0001-Fix-http-authentication.patch
> From b1e0263d839ecab3403ac710da33c8d9a206d3fb Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <cehoyos at ag.or.at>
> Date: Wed, 26 Feb 2014 09:51:06 +0100
> Subject: [PATCH] Fix http authentication.
> 
> Add parenthesis around "MD5" in the request string as required by
> RFC 2069.
> 
> Fixes ticket #3417.
> 
> Reported and tested by Haarman
> Analyzed-by: Eugen-Andrei Gavriloaie
> ---
>  libavformat/httpauth.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c
> index 5ca48b9..3f90975 100644
> --- a/libavformat/httpauth.c
> +++ b/libavformat/httpauth.c
> @@ -225,7 +225,7 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username,
>      av_strlcatf(authstr, len, ",uri=\"%s\"",       uri);
>      av_strlcatf(authstr, len, ",response=\"%s\"",  response);
>      if (digest->algorithm[0])
> -        av_strlcatf(authstr, len, ",algorithm=%s",  digest->algorithm);
> +        av_strlcatf(authstr, len, ",algorithm=\"%s\"",  digest->algorithm);
>      if (digest->opaque[0])
>          av_strlcatf(authstr, len, ",opaque=\"%s\"", digest->opaque);
>      if (digest->qop[0]) {

LGTM

btw, "nc" also has no "" has someone cross checked that to the RFC ?

[...]


-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- 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/20140226/4453299d/attachment.asc>


More information about the ffmpeg-devel mailing list