1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

rtmpproto: Fix limelight authentication with abbreviated app names

When streaming to limelight, the app name is either a full
"appname/subaccount" or "appname/_definst_". In the latter case,
the app name can be simplified into simply "appname", but the
authentication hashing assumes the /_definst_ still to be present.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2013-08-15 13:17:15 +03:00
parent cb8f70c96e
commit 6454c44f9f

View File

@ -1612,6 +1612,8 @@ static int do_llnw_auth(RTMPContext *rt, const char *user, const char *nonce)
av_md5_update(md5, method, strlen(method));
av_md5_update(md5, ":/", 2);
av_md5_update(md5, rt->app, strlen(rt->app));
if (!strchr(rt->app, '/'))
av_md5_update(md5, "/_definst_", strlen("/_definst_"));
av_md5_final(md5, hash);
ff_data_to_hex(hashstr2, hash, 16, 1);
hashstr2[32] = '\0';