Commit 3004ef1b authored by Marton Balint's avatar Marton Balint

avformat/httpauth: do not decode plus sign to space in credentials

Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 8224f1e0
...@@ -255,7 +255,7 @@ char *ff_http_auth_create_response(HTTPAuthState *state, const char *auth, ...@@ -255,7 +255,7 @@ char *ff_http_auth_create_response(HTTPAuthState *state, const char *auth,
if (state->auth_type == HTTP_AUTH_BASIC) { if (state->auth_type == HTTP_AUTH_BASIC) {
int auth_b64_len, len; int auth_b64_len, len;
char *ptr, *decoded_auth = ff_urldecode(auth, 1); char *ptr, *decoded_auth = ff_urldecode(auth, 0);
if (!decoded_auth) if (!decoded_auth)
return NULL; return NULL;
...@@ -275,7 +275,7 @@ char *ff_http_auth_create_response(HTTPAuthState *state, const char *auth, ...@@ -275,7 +275,7 @@ char *ff_http_auth_create_response(HTTPAuthState *state, const char *auth,
av_strlcat(ptr, "\r\n", len - (ptr - authstr)); av_strlcat(ptr, "\r\n", len - (ptr - authstr));
av_free(decoded_auth); av_free(decoded_auth);
} else if (state->auth_type == HTTP_AUTH_DIGEST) { } else if (state->auth_type == HTTP_AUTH_DIGEST) {
char *username = ff_urldecode(auth, 1), *password; char *username = ff_urldecode(auth, 0), *password;
if (!username) if (!username)
return NULL; return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment