From f5393eff61f07305f8993ed129b3a12fbac06eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 8 Mar 2016 15:30:24 +0100 Subject: [PATCH] Remove code mentioning register_globals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was removed in PHP 5.4.0 so we really do not have to care anymore. Signed-off-by: Michal Čihař --- libraries/common.inc.php | 11 ----------- libraries/plugins/auth/AuthenticationHttp.php | 12 ++++-------- libraries/plugins/auth/AuthenticationSignon.php | 4 ++-- tbl_change.php | 2 -- 4 files changed, 6 insertions(+), 23 deletions(-) diff --git a/libraries/common.inc.php b/libraries/common.inc.php index e08264e5f5..5fe8da77ce 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -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'] diff --git a/libraries/plugins/auth/AuthenticationHttp.php b/libraries/plugins/auth/AuthenticationHttp.php index 8123bdc49f..e8a148554b 100644 --- a/libraries/plugins/auth/AuthenticationHttp.php +++ b/libraries/plugins/auth/AuthenticationHttp.php @@ -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'); diff --git a/libraries/plugins/auth/AuthenticationSignon.php b/libraries/plugins/auth/AuthenticationSignon.php index 9b30c8ecfa..0dd67283e2 100644 --- a/libraries/plugins/auth/AuthenticationSignon.php +++ b/libraries/plugins/auth/AuthenticationSignon.php @@ -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 */ diff --git a/tbl_change.php b/tbl_change.php index 40500b00ec..5d95a51e1f 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -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;