PHP WebShell
Текущая директория: /var/www/bitcardoApp/middleware
Просмотр файла: require_trusted.php
<?php
// middleware/require_trusted.php
require_once __DIR__ . '/../config/bootstrap.php';
require_once __DIR__ . '/../lib/device.php';
if (empty($_SESSION['user_id'])) {
header('Location: /auth/login.php'); exit;
}
$userId = (int)$_SESSION['user_id'];
$otpOn = function_exists('is_enabled') ? is_enabled('otp_enabled', true) : true;
if ($otpOn && !device_is_trusted($conn, $userId)) {
header('Location: /auth/challenge.php'); exit;
}
Выполнить команду
Для локальной разработки. Не используйте в интернете!