RTMP auth fixes: opaque is now returned urlencoded, challenge now actually works -_-
This commit is contained in:
parent
d8f67e84b7
commit
b62747c402
1 changed files with 4 additions and 4 deletions
|
@ -1489,20 +1489,20 @@ namespace Mist{
|
||||||
std::string hash_one = Encodings::Base64::encode(std::string(md5buffer, 16));
|
std::string hash_one = Encodings::Base64::encode(std::string(md5buffer, 16));
|
||||||
if (authOpaque.size()){
|
if (authOpaque.size()){
|
||||||
to_hash = hash_one + authOpaque + "00000000";
|
to_hash = hash_one + authOpaque + "00000000";
|
||||||
}else if (authOpaque.size()){
|
}else if (authChallenge.size()){
|
||||||
to_hash = hash_one + authChallenge + "00000000";
|
to_hash = hash_one + authChallenge + "00000000";
|
||||||
}
|
}
|
||||||
Secure::md5bin(to_hash.data(), to_hash.size(), md5buffer);
|
Secure::md5bin(to_hash.data(), to_hash.size(), md5buffer);
|
||||||
std::string hash_two = Encodings::Base64::encode(std::string(md5buffer, 16));
|
std::string hash_two = Encodings::Base64::encode(std::string(md5buffer, 16));
|
||||||
std::string authStr = "?authmod=adobe&user=" + Encodings::URL::encode(pushUrl.user) +
|
std::string authStr = "?authmod=adobe&user=" + Encodings::URL::encode(pushUrl.user, "/:=@[]") +
|
||||||
"&challenge=00000000&response=" + hash_two;
|
"&challenge=00000000&response=" + hash_two;
|
||||||
if (authOpaque.size()){authStr += "&opaque=" + authOpaque;}
|
if (authOpaque.size()){authStr += "&opaque=" + Encodings::URL::encode(authOpaque, "/:=@[]");}
|
||||||
startPushOut(authStr.c_str());
|
startPushOut(authStr.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
INFO_MSG("Adobe auth: sending credentials phase 1");
|
INFO_MSG("Adobe auth: sending credentials phase 1");
|
||||||
authAttempts++;
|
authAttempts++;
|
||||||
std::string authStr = "?authmod=adobe&user=" + Encodings::URL::encode(pushUrl.user);
|
std::string authStr = "?authmod=adobe&user=" + Encodings::URL::encode(pushUrl.user, "/:=@[]");
|
||||||
startPushOut(authStr.c_str());
|
startPushOut(authStr.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue