[FFmpeg-devel] [FFmpeg-cvslog] Fix http authentication.

Clément Bœsch u at pkh.me
Thu Feb 27 20:30:00 CET 2014


On Thu, Feb 27, 2014 at 08:25:52PM +0100, Carl Eugen Hoyos wrote:
> ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Wed Feb 26 09:51:06 2014 +0100| [3ba056017f978ba69ea933c593f0e616b3632261] | committer: Carl Eugen Hoyos
> 
> Fix http authentication.
> 
> Add parenthesis around "MD5" in the request string as required by
> RFC 2069.
> 

Sorry to raise that now but RFC 2069 is obsoleted by RFC 2617:
http://tools.ietf.org/html/rfc2617

And the BNF in that RFC says:
      algorithm         = "algorithm" "=" ( "MD5" | "MD5-sess" |
                           token )

The quotes should not be present AFAICT.

> Fixes ticket #3417.
> 
> Reported and tested by Haarman
> Analyzed-by: Eugen-Andrei Gavriloaie
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3ba056017f978ba69ea933c593f0e616b3632261
> ---
> 
>  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]) {
> 

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140227/c45ec1d7/attachment.asc>


More information about the ffmpeg-devel mailing list