Remove code mentioning register_globals

This was removed in PHP 5.4.0 so we really do not have to care anymore.

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2016-03-08 15:30:24 +01:00
parent b995e59953
commit f5393eff61
4 changed files with 6 additions and 23 deletions

View File

@ -982,17 +982,6 @@ if (count($_REQUEST) > 1000) {
PMA_fatalError(__('possible exploit'));
}
/**
* Check for numeric keys
* (if register_globals is on, numeric key can be found in $GLOBALS)
*/
foreach ($GLOBALS as $key => $dummy) {
if (is_numeric($key)) {
PMA_fatalError(__('numeric key detected'));
}
}
unset($dummy);
// here, the function does not exist with this configuration:
// $cfg['ServerDefault'] = 0;
$GLOBALS['is_superuser']

View File

@ -115,10 +115,8 @@ class AuthenticationHttp extends AuthenticationPlugin
/**
* Gets advanced authentication settings
*
* @global string $PHP_AUTH_USER the username if register_globals is
* on
* @global string $PHP_AUTH_PW the password if register_globals is
* on
* @global string $PHP_AUTH_USER the username
* @global string $PHP_AUTH_PW the password
*
* @return boolean whether we get authentication settings or not
*/
@ -130,8 +128,7 @@ class AuthenticationHttp extends AuthenticationPlugin
return false;
}
// Grabs the $PHP_AUTH_USER variable whatever are the values of the
// 'register_globals' and the 'variables_order' directives
// Grabs the $PHP_AUTH_USER variable
if (empty($PHP_AUTH_USER)) {
if (PMA_getenv('PHP_AUTH_USER')) {
$PHP_AUTH_USER = PMA_getenv('PHP_AUTH_USER');
@ -154,8 +151,7 @@ class AuthenticationHttp extends AuthenticationPlugin
$PHP_AUTH_USER = PMA_getenv('Authorization');
}
}
// Grabs the $PHP_AUTH_PW variable whatever are the values of the
// 'register_globals' and the 'variables_order' directives
// Grabs the $PHP_AUTH_PW variable
if (empty($PHP_AUTH_PW)) {
if (PMA_getenv('PHP_AUTH_PW')) {
$PHP_AUTH_PW = PMA_getenv('PHP_AUTH_PW');

View File

@ -47,8 +47,8 @@ class AuthenticationSignon extends AuthenticationPlugin
/**
* Gets advanced authentication settings
*
* @global string $PHP_AUTH_USER the username if register_globals is on
* @global string $PHP_AUTH_PW the password if register_globals is on
* @global string $PHP_AUTH_USER the username
* @global string $PHP_AUTH_PW the password
*
* @return boolean whether we get authentication settings or not
*/

View File

@ -3,8 +3,6 @@
/**
* Displays form for editing and inserting new table rows
*
* register_globals_save (mark this file save for disabling register globals)
*
* @package PhpMyAdmin
*/
use PMA\libraries\config\PageSettings;