Skip to content

Commit

Permalink
Remove allowDeny_forbidden global
Browse files Browse the repository at this point in the history
Fixes issue introduced by 2327dbf.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Mar 26, 2024
1 parent d54981f commit 1d83673
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion libraries/classes/Plugins/Auth/AuthenticationConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function showFailure($failure): void
<table class="table table-borderless text-start w-75 mx-auto">
<tr>
<td>';
if (isset($GLOBALS['allowDeny_forbidden']) && $GLOBALS['allowDeny_forbidden']) {
if ($failure === 'allow-denied') {
trigger_error(__('Access denied!'), E_USER_NOTICE);
} else {
// Check whether user has configured something
Expand Down
14 changes: 2 additions & 12 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,6 @@ parameters:
count: 1
path: libraries/classes/Config/FormDisplay.php

-
message: "#^Parameter \\#1 \\$path of method PhpMyAdmin\\\\Config\\\\ConfigFile\\:\\:set\\(\\) expects string, int\\|string given\\.$#"
count: 1
path: libraries/classes/Config/FormDisplay.php

-
message: "#^Parameter \\#1 \\$string of static method PhpMyAdmin\\\\Sanitize\\:\\:escapeJsString\\(\\) expects string, mixed given\\.$#"
count: 2
Expand Down Expand Up @@ -1316,7 +1311,7 @@ parameters:
path: libraries/classes/Controllers/Import/ImportController.php

-
message: "#^Parameter \\#2 \\$replace of function preg_replace expects array\\|string, float\\|int\\|string\\|string given\\.$#"
message: "#^Parameter \\#2 \\$replace of function preg_replace expects array\\|string, float\\|int\\|string given\\.$#"
count: 1
path: libraries/classes/Controllers/Import/ImportController.php

Expand Down Expand Up @@ -1550,11 +1545,6 @@ parameters:
count: 1
path: libraries/classes/Controllers/Table/RelationController.php

-
message: "#^Parameter \\#2 \\$callback of function uksort expects callable\\(int\\|string, int\\|string\\)\\: int, 'strnatcasecmp' given\\.$#"
count: 1
path: libraries/classes/Controllers/Table/RelationController.php

-
message: "#^Parameter \\#2 \\$callback of function usort expects callable\\(string\\|null, string\\|null\\)\\: int, 'strnatcasecmp' given\\.$#"
count: 1
Expand Down Expand Up @@ -2937,7 +2927,7 @@ parameters:

-
message: "#^Method PhpMyAdmin\\\\Dbal\\\\MysqliResult\\:\\:fetchAllKeyPair\\(\\) should return array\\<string, string\\|null\\> but returns array\\<int\\|string, mixed\\>\\.$#"
count: 2
count: 1
path: libraries/classes/Dbal/MysqliResult.php

-
Expand Down
1 change: 0 additions & 1 deletion test/classes/Plugins/Auth/AuthenticationConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public function testAuthFails(): void
{
$GLOBALS['errorHandler'] = new ErrorHandler();
$GLOBALS['cfg']['Servers'] = [1];
$GLOBALS['allowDeny_forbidden'] = false;

$dbi = $this->getMockBuilder(DatabaseInterface::class)
->disableOriginalConstructor()
Expand Down
1 change: 0 additions & 1 deletion test/classes/Plugins/Auth/AuthenticationCookieTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,6 @@ public function testAuthFailsActivity(): void
$GLOBALS['server'] = 2;
$_COOKIE['pmaAuth-2'] = 'pass';

$GLOBALS['allowDeny_forbidden'] = '';
$GLOBALS['cfg']['LoginCookieValidity'] = 10;

$this->mockResponse(
Expand Down

0 comments on commit 1d83673

Please sign in to comment.