mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-30 03:09:22 +02:00
TFS 1.5 protocol 12 support
This commit is contained in:
parent
9b6d8d93d8
commit
ee351e7ada
@ -154,7 +154,7 @@ if($_SERVER['HTTP_USER_AGENT'] == "Mozilla/5.0" && $config['ServerEngine'] === '
|
|||||||
$password = SHA1($client->password);
|
$password = SHA1($client->password);
|
||||||
$token = (isset($client->token)) ? sanitize($client->token) : false;
|
$token = (isset($client->token)) ? sanitize($client->token) : false;
|
||||||
|
|
||||||
$fields = '`id`, `premdays`';
|
$fields = '`id`, `premium_ends_at`';
|
||||||
if ($config['twoFactorAuthenticator']) $fields .= ', `secret`';
|
if ($config['twoFactorAuthenticator']) $fields .= ', `secret`';
|
||||||
|
|
||||||
$account = false;
|
$account = false;
|
||||||
@ -213,7 +213,8 @@ if($_SERVER['HTTP_USER_AGENT'] == "Mozilla/5.0" && $config['ServerEngine'] === '
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sessionKey = ($email !== false) ? $email."\n".$client->password : $username."\n".$client->password;
|
$sessionKey = ($email !== false) ? $email."\n".$client->password : $username."\n".$client->password;
|
||||||
if (isset($account['secret']) && strlen($account['secret']) > 5) $sessionKey .= "\n".$token."\n".floor(time() / 30);
|
$sessionKey .= (isset($account['secret']) && strlen($account['secret']) > 5) ? "\n".$token : "\n";
|
||||||
|
$sessionKey .= "\n".floor(time() / 30);
|
||||||
|
|
||||||
$response = array(
|
$response = array(
|
||||||
'session' => array(
|
'session' => array(
|
||||||
@ -226,8 +227,8 @@ if($_SERVER['HTTP_USER_AGENT'] == "Mozilla/5.0" && $config['ServerEngine'] === '
|
|||||||
'emailcoderequest' => false,
|
'emailcoderequest' => false,
|
||||||
'sessionkey' => $sessionKey,
|
'sessionkey' => $sessionKey,
|
||||||
'lastlogintime' => 0,
|
'lastlogintime' => 0,
|
||||||
'ispremium' => ($account['premdays'] > 0) ? true : false,
|
'ispremium' => ($account['premium_ends_at'] > time()) ? true : false,
|
||||||
'premiumuntil' => time() + ($account['premdays'] * 86400),
|
'premiumuntil' => $account['premium_ends_at'],
|
||||||
'status' => 'active'
|
'status' => 'active'
|
||||||
),
|
),
|
||||||
'playdata' => array(
|
'playdata' => array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user