[FFmpeg-trac] #9127(undetermined:new): ffmpeg unauthorized error with rtsp url

FFmpeg trac at avcodec.org
Sun Feb 28 20:36:48 EET 2021


#9127: ffmpeg unauthorized error with rtsp url
-------------------------------------+-------------------------------------
             Reporter:  surajketan   |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:
             Keywords:  rtsp         |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by taliho):

 The problem is that sha-256 overwrites the md5 option.. and doesn't look
 that we support sha-256 in authentication part.

 Could you try this patch to check that the analysis is correct?

 diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c
 index 4f79c78edc..ef82c01d36 100644
 --- a/libavformat/httpauth.c
 +++ b/libavformat/httpauth.c
 @@ -101,6 +101,10 @@ void ff_http_auth_handle_header(HTTPAuthState *state,
 const char *key,
                                 state);
          } else if (av_stristart(value, "Digest ", &p) &&
                     state->auth_type <= HTTP_AUTH_DIGEST) {
 +
 +            if (!strcmp(state->digest_params.algorithm, "MD5"))
 +                return;
 +
              state->auth_type = HTTP_AUTH_DIGEST;
              memset(&state->digest_params, 0, sizeof(DigestParams));
              state->realm[0] = 0;

--
Ticket URL: <https://trac.ffmpeg.org/ticket/9127#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list