From 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 27 Jul 2020 10:05:23 +0200 Subject: Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my familly --- .../classes/Plugins/Auth/AuthenticationConfig.php | 172 --------------------- 1 file changed, 172 deletions(-) delete mode 100644 srcs/phpmyadmin/libraries/classes/Plugins/Auth/AuthenticationConfig.php (limited to 'srcs/phpmyadmin/libraries/classes/Plugins/Auth/AuthenticationConfig.php') diff --git a/srcs/phpmyadmin/libraries/classes/Plugins/Auth/AuthenticationConfig.php b/srcs/phpmyadmin/libraries/classes/Plugins/Auth/AuthenticationConfig.php deleted file mode 100644 index 7ebd1ae..0000000 --- a/srcs/phpmyadmin/libraries/classes/Plugins/Auth/AuthenticationConfig.php +++ /dev/null @@ -1,172 +0,0 @@ -isAjax()) { - $response->setRequestStatus(false); - // reload_flag removes the token parameter from the URL and reloads - $response->addJSON('reload_flag', '1'); - if (defined('TESTSUITE')) { - return true; - } else { - exit; - } - } - - return true; - } - - /** - * Gets authentication credentials - * - * @return boolean always true - */ - public function readCredentials() - { - if ($GLOBALS['token_provided'] && $GLOBALS['token_mismatch']) { - return false; - } - - $this->user = $GLOBALS['cfg']['Server']['user']; - $this->password = $GLOBALS['cfg']['Server']['password']; - - return true; - } - - /** - * User is not allowed to login to MySQL -> authentication failed - * - * @param string $failure String describing why authentication has failed - * - * @return void - */ - public function showFailure($failure) - { - parent::showFailure($failure); - $conn_error = $GLOBALS['dbi']->getError(); - if (! $conn_error) { - $conn_error = __('Cannot connect: invalid settings.'); - } - - /* HTML header */ - $response = Response::getInstance(); - $response->getFooter() - ->setMinimal(); - $header = $response->getHeader(); - $header->setBodyId('loginform'); - $header->setTitle(__('Access denied!')); - $header->disableMenuAndConsole(); - echo '

-
-

'; - echo sprintf(__('Welcome to %s'), ' phpMyAdmin '); - echo '

-
-
- - - - - - - ' , "\n"; - if (count($GLOBALS['cfg']['Servers']) > 1) { - // offer a chance to login to other servers if the current one failed - echo '' , "\n"; - echo ' ' , "\n"; - echo '' , "\n"; - } - echo '
'; - if (isset($GLOBALS['allowDeny_forbidden']) - && $GLOBALS['allowDeny_forbidden'] - ) { - trigger_error(__('Access denied!'), E_USER_NOTICE); - } else { - // Check whether user has configured something - if ($GLOBALS['PMA_Config']->source_mtime == 0) { - echo '

' , sprintf( - __( - 'You probably did not create a configuration file.' - . ' You might want to use the %1$ssetup script%2$s to' - . ' create one.' - ), - '', - '' - ) , '

' , "\n"; - } elseif (! isset($GLOBALS['errno']) - || (isset($GLOBALS['errno']) && $GLOBALS['errno'] != 2002) - && $GLOBALS['errno'] != 2003 - ) { - // if we display the "Server not responding" error, do not confuse - // users by telling them they have a settings problem - // (note: it's true that they could have a badly typed host name, - // but anyway the current message tells that the server - // rejected the connection, which is not really what happened) - // 2002 is the error given by mysqli - // 2003 is the error given by mysql - trigger_error( - __( - 'phpMyAdmin tried to connect to the MySQL server, and the' - . ' server rejected the connection. You should check the' - . ' host, username and password in your configuration and' - . ' make sure that they correspond to the information given' - . ' by the administrator of the MySQL server.' - ), - E_USER_WARNING - ); - } - echo Util::mysqlDie( - $conn_error, - '', - true, - '', - false - ); - } - $GLOBALS['error_handler']->dispUserErrors(); - echo '
' , "\n"; - echo '' - , __('Retry to connect') - , '' , "\n"; - echo '
' , "\n"; - echo Select::render(true, true); - echo '
' , "\n"; - if (! defined('TESTSUITE')) { - exit; - } - } -} -- cgit