Server IP : 85.214.239.14 / Your IP : 18.220.85.96 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/cwd/proc/2/root/proc/2/cwd/proc/self/root/var/www/wordpress/phpMyAdmin/ |
Upload File : |
<?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * User preferences management page * * @package PhpMyAdmin */ declare(strict_types=1); use PhpMyAdmin\Message; use PhpMyAdmin\Relation; use PhpMyAdmin\Template; use PhpMyAdmin\TwoFactor; use PhpMyAdmin\UserPreferencesHeader; if (! defined('ROOT_PATH')) { define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR); } /** * Gets some core libraries and displays a top message if required */ require_once ROOT_PATH . 'libraries/common.inc.php'; /** @var Template $template */ $template = $containerBuilder->get('template'); /** @var Relation $relation */ $relation = $containerBuilder->get('relation'); echo UserPreferencesHeader::getContent($template, $relation); $two_factor = new TwoFactor($GLOBALS['cfg']['Server']['user']); if (isset($_POST['2fa_remove'])) { if (! $two_factor->check(true)) { echo $template->render('preferences/two_factor/confirm', [ 'form' => $two_factor->render(), ]); exit; } else { $two_factor->configure(''); Message::rawNotice(__('Two-factor authentication has been removed.'))->display(); } } elseif (isset($_POST['2fa_configure'])) { if (! $two_factor->configure($_POST['2fa_configure'])) { echo $template->render('preferences/two_factor/configure', [ 'form' => $two_factor->setup(), 'configure' => $_POST['2fa_configure'], ]); exit; } else { Message::rawNotice(__('Two-factor authentication has been configured.'))->display(); } } $backend = $two_factor->backend; echo $template->render('preferences/two_factor/main', [ 'enabled' => $two_factor->writable, 'num_backends' => count($two_factor->available), 'backend_id' => $backend::$id, 'backend_name' => $backend::getName(), 'backend_description' => $backend::getDescription(), 'backends' => $two_factor->getAllBackends(), 'missing' => $two_factor->getMissingDeps(), ]);