diff mbox series

[FFmpeg-devel,09/12] avformat/httpauth: do not decode plus sign to space in credentials

Message ID 20200208211823.31345-9-cus@passwd.hu
State Accepted
Headers show
Series [FFmpeg-devel,01/12] avformat/tests/url: make format more readable
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Marton Balint Feb. 8, 2020, 9:18 p.m. UTC
Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavformat/httpauth.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c
index 54d0322c6a..4f79c78edc 100644
--- a/libavformat/httpauth.c
+++ b/libavformat/httpauth.c
@@ -255,7 +255,7 @@  char *ff_http_auth_create_response(HTTPAuthState *state, const char *auth,
 
     if (state->auth_type == HTTP_AUTH_BASIC) {
         int auth_b64_len, len;
-        char *ptr, *decoded_auth = ff_urldecode(auth, 1);
+        char *ptr, *decoded_auth = ff_urldecode(auth, 0);
 
         if (!decoded_auth)
             return NULL;
@@ -275,7 +275,7 @@  char *ff_http_auth_create_response(HTTPAuthState *state, const char *auth,
         av_strlcat(ptr, "\r\n", len - (ptr - authstr));
         av_free(decoded_auth);
     } else if (state->auth_type == HTTP_AUTH_DIGEST) {
-        char *username = ff_urldecode(auth, 1), *password;
+        char *username = ff_urldecode(auth, 0), *password;
 
         if (!username)
             return NULL;