Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Oct 29, 2024
1 parent cd7934a commit 82dc3aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion objects/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3148,12 +3148,13 @@ function decryptString($string)
return encrypt_decrypt($string, 'decrypt');
}

function getToken($timeout = 0, $salt = "")
function getToken($timeout = 0, $salt = "", $videos_id = 0)
{
global $global;
$obj = new stdClass();
$obj->salt = $global['salt'] . $salt;
$obj->timezone = date_default_timezone_get();
$obj->videos_id = $videos_id;

if (!empty($timeout)) {
$obj->time = time();
Expand Down Expand Up @@ -3186,6 +3187,11 @@ function verifyToken($token, $salt = "")
_error_log("verifyToken salt fail");
return false;
}
if(!empty($obj->videos_id) && $obj->videos_id != getVideos_id()){
_error_log("This is not to this videos ID");
return false;
}

$old_timezone = date_default_timezone_get();
date_default_timezone_set($obj->timezone);
$time = time();
Expand Down

0 comments on commit 82dc3aa

Please sign in to comment.