aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2020-02-04 23:46:23 +0100
committerMarton Balint <cus@passwd.hu>2020-02-15 18:41:36 +0100
commit3004ef1b1b1bcd6bec4ad3509662ab1a4b644149 (patch)
tree6b6593b52b98ea4cb0d00010bee9714bdc075e38 /libavformat
parent8224f1e0ba65c064cf0fa2e11e4c688501b6eddd (diff)
downloadffmpeg-3004ef1b1b1bcd6bec4ad3509662ab1a4b644149.tar.gz
avformat/httpauth: do not decode plus sign to space in credentials
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/httpauth.c4
1 files changed, 2 insertions, 2 deletions
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;