added 5.0 changelog
This commit is contained in:
@@ -43,9 +43,8 @@ export function createStream(obj) {
|
||||
export function verifyStream(ip, id, hmac, exp) {
|
||||
try {
|
||||
let streamInfo = streamCache.get(id);
|
||||
if (!streamInfo) {
|
||||
return { error: 'this stream token does not exist', status: 400 };
|
||||
}
|
||||
if (!streamInfo) return { error: 'this stream token does not exist', status: 400 };
|
||||
|
||||
let ghmac = sha256(`${id},${streamInfo.service},${ip},${exp}`, salt);
|
||||
if (String(hmac) === ghmac && String(exp) === String(streamInfo.exp) && ghmac === String(streamInfo.hmac)
|
||||
&& String(ip) === streamInfo.ip && Number(exp) > Math.floor(new Date().getTime())) {
|
||||
|
||||
Reference in New Issue
Block a user