uawdijnntqw1x1x1
IP : 18.218.102.138
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
.
/
b24.axolotl.ru
/
public_html
/
bitrix
/
modules
/
mobile
/
lib
/
auth.php
/
/
<?php namespace Bitrix\Mobile; use Bitrix\Main\Authentication\ApplicationPasswordTable; use Bitrix\Main\EventManager; use Bitrix\Main\Loader; class Auth { public static function setNotAuthorizedHeaders() { header("HTTP/1.0 401 Not Authorized"); header('WWW-Authenticate: Basic realm="Bitrix24"'); header("Content-Type: application/x-javascript"); header("BX-Authorize: " . bitrix_sessid()); } public static function getNotAuthorizedResponse() { return [ "status" => "failed", "bitrix_sessid" => bitrix_sessid() ]; } public static function getOneTimeAuthHash(int $userId = null) { $path = '/mobile/'; if (!$userId) { global $USER; $userId = $USER->getId(); } $siteId = \CSite::GetDefSite(); $hash = \CUser::GetHitAuthHash($path, $userId, $siteId); if ($hash) { return $hash; } else { return \CUser::AddHitAuthHash($path, $userId, $siteId); } } public static function removeOneTimeAuthHash($hash = null) { if(!empty($hash)) { global $DB; global $USER; $userId = $USER->getId(); if ($userId > 0) { $hash = $DB->ForSql($hash); $where = "URL = '/mobile/' AND USER_ID=${userId} AND HASH='${hash}'"; /** @var \CDBResult $dbResult */ $dbResult = $DB->Query("DELETE FROM b_user_hit_auth WHERE ${where}"); if ($dbResult->result && $dbResult->AffectedRowsCount()) { $handlers = EventManager::getInstance()->findEventHandlers('mobile', 'oneTimeHashRemoved'); foreach ($handlers as $handler) { ExecuteModuleEventEx($handler, array($userId, $hash)); } return true; } } } return false; } }
/var/www/axolotl/data/www/./b24.axolotl.ru/public_html/bitrix/modules/mobile/lib/auth.php