Shared security patch analysis results
AI Used: DEEPSEEK deepseek-chat--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/test/classes/ThemeTest.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/test/classes/ThemeTest.php@@ -61,7 +61,7 @@ public function testCheckImgPathNotExisted(): void { $this->object->setPath('path/to/nowhere');- $this->assertFalse($this->object->loadInfo());+ self::assertFalse($this->object->loadInfo()); } /**@@ -69,11 +69,8 @@ */ public function testCheckImgPathIncorrect(): void {- $this->object->setPath(ROOT_PATH . 'test/classes/_data/incorrect_theme');- $this->assertFalse(- $this->object->loadInfo(),- 'Theme name is not properly set'- );+ $this->object->setPath(TEST_PATH . 'test/classes/_data/incorrect_theme');+ self::assertFalse($this->object->loadInfo(), 'Theme name is not properly set'); } /**@@ -82,9 +79,9 @@ public function testCheckImgPathFull(): void { $this->object->setFsPath(TEST_PATH . 'test/classes/_data/gen_version_info/');- $this->assertTrue($this->object->loadInfo());- $this->assertEquals('Test Theme', $this->object->getName());- $this->assertEquals('5.1', $this->object->getVersion());+ self::assertTrue($this->object->loadInfo());+ self::assertSame('Test Theme', $this->object->getName());+ self::assertSame('5.1', $this->object->getVersion()); } /**@@ -94,17 +91,14 @@ { $this->object->setFsPath(ROOT_PATH . 'themes/original/'); $infofile = $this->object->getFsPath() . 'theme.json';- $this->assertTrue($this->object->loadInfo());-- $this->assertEquals(- filemtime($infofile),- $this->object->mtimeInfo- );+ self::assertTrue($this->object->loadInfo());++ self::assertSame(filemtime($infofile), $this->object->mtimeInfo); $this->object->setPath(ROOT_PATH . 'themes/original'); $this->object->mtimeInfo = (int) filemtime($infofile);- $this->assertTrue($this->object->loadInfo());- $this->assertEquals('Original', $this->object->getName());+ self::assertTrue($this->object->loadInfo());+ self::assertSame('Original', $this->object->getName()); } /**@@ -117,8 +111,8 @@ ThemeManager::getThemesFsDir() . 'original' . DIRECTORY_SEPARATOR, 'original' );- $this->assertNotNull($newTheme);- $this->assertInstanceOf(Theme::class, $newTheme);+ self::assertNotNull($newTheme);+ self::assertInstanceOf(Theme::class, $newTheme); } /**@@ -126,13 +120,11 @@ */ public function testLoadNonExistent(): void {- $this->assertNull(- Theme::load(- ThemeManager::getThemesDir() . 'nonexistent',- ThemeManager::getThemesFsDir() . 'nonexistent' . DIRECTORY_SEPARATOR,- 'nonexistent'- )- );+ self::assertNull(Theme::load(+ ThemeManager::getThemesDir() . 'nonexistent',+ ThemeManager::getThemesFsDir() . 'nonexistent' . DIRECTORY_SEPARATOR,+ 'nonexistent'+ )); } /**@@ -141,7 +133,7 @@ public function testCheckImgPathFallback(): void { $this->object->setPath('path/to/nowhere');- $this->assertTrue($this->object->checkImgPath());+ self::assertTrue($this->object->checkImgPath()); } /**@@ -150,7 +142,7 @@ public function testCheckImgPath(): void { $this->object->setPath(ROOT_PATH . 'themes/original');- $this->assertTrue($this->object->checkImgPath());+ self::assertTrue($this->object->checkImgPath()); } /**@@ -158,10 +150,10 @@ */ public function testGetSetPath(): void {- $this->assertEmpty($this->object->getPath());+ self::assertEmpty($this->object->getPath()); $this->object->setPath(ROOT_PATH . 'themes/original');- $this->assertEquals(ROOT_PATH . 'themes/original', $this->object->getPath());+ self::assertSame(ROOT_PATH . 'themes/original', $this->object->getPath()); } /**@@ -171,17 +163,13 @@ */ public function testGetSetCheckVersion(): void {- $this->assertEquals(- '0.0.0.0',- $this->object->getVersion(),- 'Version 0.0.0.0 by default'- );+ self::assertSame('0.0.0.0', $this->object->getVersion(), 'Version 0.0.0.0 by default'); $this->object->setVersion('1.2.3.4');- $this->assertEquals('1.2.3.4', $this->object->getVersion());-- $this->assertFalse($this->object->checkVersion('0.0.1.1'));- $this->assertTrue($this->object->checkVersion('2.0.1.1'));+ self::assertSame('1.2.3.4', $this->object->getVersion());++ self::assertFalse($this->object->checkVersion('0.0.1.1'));+ self::assertTrue($this->object->checkVersion('2.0.1.1')); } /**@@ -189,10 +177,10 @@ */ public function testGetSetName(): void {- $this->assertEmpty($this->object->getName(), 'Name is empty by default');+ self::assertEmpty($this->object->getName(), 'Name is empty by default'); $this->object->setName('New Theme Name');- $this->assertEquals('New Theme Name', $this->object->getName());+ self::assertSame('New Theme Name', $this->object->getName()); } /**@@ -200,10 +188,10 @@ */ public function testGetSetId(): void {- $this->assertEmpty($this->object->getId(), 'ID is empty by default');+ self::assertEmpty($this->object->getId(), 'ID is empty by default'); $this->object->setId('NewID');- $this->assertEquals('NewID', $this->object->getId());+ self::assertSame('NewID', $this->object->getId()); } /**@@ -211,13 +199,10 @@ */ public function testGetSetImgPath(): void {- $this->assertEmpty(- $this->object->getImgPath(),- 'ImgPath is empty by default'- );+ self::assertEmpty($this->object->getImgPath(), 'ImgPath is empty by default'); $this->object->setImgPath('/new/path');- $this->assertEquals('/new/path', $this->object->getImgPath());+ self::assertSame('/new/path', $this->object->getImgPath()); } /**@@ -231,10 +216,7 @@ */ public function testGetImgPath(?string $file, ?string $fallback, string $output): void {- $this->assertEquals(- $this->object->getImgPath($file, $fallback),- $output- );+ self::assertSame($this->object->getImgPath($file, $fallback), $output); } /**@@ -242,7 +224,7 @@ * * @return array */- public function providerForGetImgPath(): array+ public static function providerForGetImgPath(): array { return [ [
After analyzing the provided code diff, I don't find any security vulnerabilities being fixed. The changes appear to be primarily test improvements and code style updates. Here's the analysis: 1. Vulnerability Existed: no The changes are test improvements including: - Changing `$this->assert...` to `self::assert...` for consistency - Simplifying assertion statements - Changing `assertEquals` to `assertSame` for more strict comparisons - Updating path references (ROOT_PATH to TEST_PATH in one case) - Making a test data provider method static 2. Vulnerability Existed: no The changes in test methods (testCheckImgPathNotExisted, testCheckImgPathIncorrect, etc.) are all test code improvements without security implications. The modifications are focused on test assertion style and path handling, not security fixes. 3. Vulnerability Existed: no The change from `assertEquals` to `assertSame` in multiple test cases is a testing best practice improvement, not a security fix. The diff shows quality improvements to the test suite rather than security vulnerability fixes. The changes are focused on: - Test code consistency - More precise assertions - Path reference updates - Code style improvements - Test method organization No security vulnerabilities were identified in these changes. The modifications appear to be part of routine test suite maintenance and improvement.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/test/classes/EnvironmentTest.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/test/classes/EnvironmentTest.php@@ -18,9 +18,6 @@ */ public function testPhpVersion(): void {- $this->assertTrue(- version_compare('7.2.5', PHP_VERSION, '<='),- 'phpMyAdmin requires PHP 7.2.5 or above'- );+ self::assertTrue(version_compare('7.2.5', PHP_VERSION, '<='), 'phpMyAdmin requires PHP 7.2.5 or above'); } }
Based on the provided code diff, here's the analysis following the required format: Vulnerability Existed: no [No specific vulnerability] [test/classes/EnvironmentTest.php] [Lines 18-21] [Old Code] $this->assertTrue( version_compare('7.2.5', PHP_VERSION, '<='), 'phpMyAdmin requires PHP 7.2.5 or above' ); [Fixed Code] self::assertTrue(version_compare('7.2.5', PHP_VERSION, '<='), 'phpMyAdmin requires PHP 7.2.5 or above'); Additional Details: - This change appears to be a simple refactoring from instance method call (`$this->assertTrue`) to static method call (`self::assertTrue`). - The functionality remains exactly the same, just the calling style changed. - No security vulnerability is being fixed here - this is purely a code style/architecture improvement. - The test still checks for the same PHP version requirement (7.2.5 or above).
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/test/classes/Controllers/Sql/SetValuesControllerTest.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/test/classes/Controllers/Sql/SetValuesControllerTest.php@@ -48,10 +48,7 @@ $this->assertResponseWasNotSuccessfull();- $this->assertSame(- ['message' => 'Error in processing request'],- $this->getResponseJsonResult()- );+ self::assertSame(['message' => 'Error in processing request'], $this->getResponseJsonResult()); } public function testSuccess(): void@@ -98,18 +95,15 @@ $this->assertResponseWasSuccessfull();- $this->assertSame(- [- 'select' => '<select class="resize-vertical" size="5" multiple>' . "\n"- . ' <option value="<script>alert("ok")</script>">'- . '<script>alert("ok")</script></option>' . "\n"- . ' <option value="a&b">a&b</option>' . "\n"- . ' <option value="b&c" selected>b&c</option>' . "\n"- . ' <option value="vrai&amp">vrai&amp</option>' . "\n"- . ' <option value=""></option>' . "\n"- . ' </select>' . "\n",- ],- $this->getResponseJsonResult()- );+ self::assertSame([+ 'select' => '<select class="resize-vertical" size="5" multiple>' . "\n"+ . ' <option value="<script>alert("ok")</script>">'+ . '<script>alert("ok")</script></option>' . "\n"+ . ' <option value="a&b">a&b</option>' . "\n"+ . ' <option value="b&c" selected>b&c</option>' . "\n"+ . ' <option value="vrai&amp">vrai&amp</option>' . "\n"+ . ' <option value=""></option>' . "\n"+ . ' </select>' . "\n",+ ], $this->getResponseJsonResult()); } }
After analyzing the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be primarily code style/formatting improvements and test assertion method changes (from `$this->assertSame()` to `self::assertSame()`). The content being tested (including the XSS test case with script tags) remains properly escaped in both versions. Here's the structured response: Vulnerability Existed: no No security vulnerability found in the diff. The changes are test code formatting improvements and assertion method updates. The diff shows: 1. Changing assertion style from instance method (`$this->assertSame`) to static method (`self::assertSame`) 2. Reformatting the test assertion for better readability 3. The test case continues to properly check for HTML-escaped output (as seen in the script tag test case) No actual security fixes were made in this diff - the output escaping was already properly handled in the original version.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/libraries/classes/Gis/GisPoint.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/libraries/classes/Gis/GisPoint.php@@ -51,13 +51,14 @@ * @param string $spatial spatial data of a row * * @return array an array containing the min, max values for x and y coordinates+ * @psalm-return array{minX:float,minY:float,maxX:float,maxY:float} */ public function scaleRow($spatial) { // Trim to remove leading 'POINT(' and trailing ')' $point = mb_substr($spatial, 6, -1);- return $this->setMinMax($point, []);+ return $this->setMinMax($point, GisGeometry::EMPTY_EXTENT); } /**@@ -178,7 +179,7 @@ public function prepareRowAsSvg($spatial, $label, $point_color, array $scale_data) { $point_options = [- 'name' => $label,+ 'data-label' => $label, 'id' => $label . $this->getRandomId(), 'class' => 'point vector', 'fill' => 'white',
Analyzing the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential XSS Vulnerability] [libraries/classes/Gis/GisPoint.php] [Lines 178-182] [Old Code] 'name' => $label, [Fixed Code] 'data-label' => $label, Additional Details: The change from 'name' attribute to 'data-label' attribute could be related to preventing XSS if the $label variable contains user-controlled input. However, without seeing the full context of how this is used in HTML output, we can't be certain. 2. Vulnerability Existed: not sure [Potential Type Safety Issue] [libraries/classes/Gis/GisPoint.php] [Lines 51-58] [Old Code] return $this->setMinMax($point, []); [Fixed Code] return $this->setMinMax($point, GisGeometry::EMPTY_EXTENT); Additional Details: The change from an empty array to a defined constant might improve type safety and prevent potential undefined behavior, but it's not clear if this was fixing a security vulnerability or just improving code quality. Note: The diff also includes a Psalm annotation (@psalm-return) which is a code quality improvement rather than a security fix. The actual security implications of these changes would require more context about how these functions are used in the application.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/test/classes/Http/Factory/ServerRequestFactoryTest.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/test/classes/Http/Factory/ServerRequestFactoryTest.php@@ -39,7 +39,7 @@ ], ];- public function dataProviderPsr7Implementations(): array+ public static function dataProviderPsr7Implementations(): array { return self::IMPLEMENTATION_CLASSES; }@@ -47,7 +47,7 @@ /** * @phpstan-param class-string $className */- private function testOrSkip(string $className, string $humanName): void+ private function runOrSkip(string $className, string $humanName): void { if (! class_exists($className)) { $this->markTestSkipped($humanName . ' is missing');@@ -75,7 +75,7 @@ */ public function testPsr7ImplementationGet(string $className, string $humanName): void {- $this->testOrSkip($className, $humanName);+ $this->runOrSkip($className, $humanName); $_GET['foo'] = 'bar'; $_GET['blob'] = 'baz';@@ -85,35 +85,21 @@ $_SERVER['HTTP_HOST'] = 'phpmyadmin.local'; $request = ServerRequestFactory::createFromGlobals();- $this->assertSame(- 'GET',- $request->getMethod()- );- $this->assertSame(- 'http://phpmyadmin.local/test-page.php?foo=bar&blob=baz',- $request->getUri()->__toString()- );- $this->assertFalse(- $request->isPost()- );- $this->assertSame(- 'default',- $request->getParam('not-exists', 'default')- );- $this->assertSame(- 'bar',- $request->getParam('foo')- );- $this->assertSame(- 'baz',- $request->getParam('blob')- );- $this->assertSame([+ self::assertSame('GET', $request->getMethod());+ self::assertSame('http://phpmyadmin.local/test-page.php?foo=bar&blob=baz', $request->getUri()->__toString());+ self::assertFalse($request->isPost());+ self::assertSame('default', $request->getParam('not-exists', 'default'));+ self::assertSame('bar', $request->getParam('foo'));+ self::assertSame('baz', $request->getParam('blob'));+ self::assertSame([ 'foo' => 'bar', 'blob' => 'baz', ], $request->getQueryParams()); }+ /**+ * @requires PHPUnit < 10+ */ public function testCreateServerRequestFromGlobals(): void { $_GET['foo'] = 'bar';@@ -127,7 +113,7 @@ $_SERVER['HTTP_HOST'] = 'phpmyadmin.local'; $creator = $this->getMockBuilder(ServerRequestFactory::class)- ->setMethods(['getallheaders'])+ ->onlyMethods(['getallheaders']) ->getMock(); $creator@@ -143,48 +129,28 @@ $request = new ServerRequest($serverRequest);- $this->assertSame(- ['application/x-www-form-urlencoded'],- $request->getHeader('Content-Type')- );- $this->assertSame(- 'POST',- $request->getMethod()- );- $this->assertSame(- 'http://phpmyadmin.local/test-page.php?foo=bar&blob=baz',- $request->getUri()->__toString()- );- $this->assertTrue(- $request->isPost()- );- $this->assertSame(- 'default',- $request->getParam('not-exists', 'default')- );- $this->assertSame(- 'bar',- $request->getParam('foo')- );- $this->assertSame(- 'baz',- $request->getParam('blob')- );- $this->assertSame([+ self::assertSame(['application/x-www-form-urlencoded'], $request->getHeader('Content-Type'));+ self::assertSame('POST', $request->getMethod());+ self::assertSame('http://phpmyadmin.local/test-page.php?foo=bar&blob=baz', $request->getUri()->__toString());+ self::assertTrue($request->isPost());+ self::assertSame('default', $request->getParam('not-exists', 'default'));+ self::assertSame('bar', $request->getParam('foo'));+ self::assertSame('baz', $request->getParam('blob'));+ self::assertSame([ 'foo' => 'bar', 'blob' => 'baz', ], $request->getQueryParams());- $this->assertSame([+ self::assertSame([ 'input1' => 'value1', 'input2' => 'value2', 'input3' => '', ], $request->getParsedBody());- $this->assertNull($request->getParsedBodyParam('foo'));- $this->assertSame('value1', $request->getParsedBodyParam('input1'));- $this->assertSame('value2', $request->getParsedBodyParam('input2'));- $this->assertSame('', $request->getParsedBodyParam('input3', 'default'));+ self::assertNull($request->getParsedBodyParam('foo'));+ self::assertSame('value1', $request->getParsedBodyParam('input1'));+ self::assertSame('value2', $request->getParsedBodyParam('input2'));+ self::assertSame('', $request->getParsedBodyParam('input3', 'default')); } /**@@ -194,14 +160,14 @@ */ public function testPsr7ImplementationCreateServerRequestFactory(string $className, string $humanName): void {- $this->testOrSkip($className, $humanName);+ $this->runOrSkip($className, $humanName); $serverRequestFactory = new $className();- $this->assertInstanceOf(ServerRequestFactoryInterface::class, $serverRequestFactory);+ self::assertInstanceOf(ServerRequestFactoryInterface::class, $serverRequestFactory); $factory = new ServerRequestFactory( $serverRequestFactory );- $this->assertInstanceOf(ServerRequestFactory::class, $factory);+ self::assertInstanceOf(ServerRequestFactory::class, $factory); } }
After analyzing the provided code diff, I don't find any security vulnerabilities being fixed. The changes appear to be primarily test code improvements and modernization. Here's the analysis: 1. Vulnerability Existed: no Test Code Modernization test/classes/Http/Factory/ServerRequestFactoryTest.php [Various lines] The changes include: - Making a data provider method static - Renaming a test helper method from testOrSkip to runOrSkip - Updating test assertions to use self::assert* instead of $this->assert* - Changing setMethods to onlyMethods for PHPUnit mock - Adding PHPUnit version requirement annotation 2. Vulnerability Existed: no Test Code Refactoring test/classes/Http/Factory/ServerRequestFactoryTest.php [Various lines] The changes include: - Consolidating multiple assertions into more compact forms - No security-related changes in the test scenarios - The test cases still verify the same functionality The diff shows test code improvements rather than security fixes. The test cases continue to verify the same server request handling functionality, just with more modern PHPUnit practices.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/test/classes/Navigation/Nodes/NodeEventTest.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/test/classes/Navigation/Nodes/NodeEventTest.php@@ -27,19 +27,16 @@ public function testConstructor(): void { $parent = NodeFactory::getInstance('NodeEvent');- $this->assertIsArray($parent->links);- $this->assertEquals(- [- 'text' => [- 'route' => '/database/events',- 'params' => ['edit_item' => 1, 'db' => null, 'item_name' => null],- ],- 'icon' => [- 'route' => '/database/events',- 'params' => ['export_item' => 1, 'db' => null, 'item_name' => null],- ],+ self::assertIsArray($parent->links);+ self::assertSame([+ 'text' => [+ 'route' => '/database/events',+ 'params' => ['edit_item' => 1, 'db' => null, 'item_name' => null], ],- $parent->links- );+ 'icon' => [+ 'route' => '/database/events',+ 'params' => ['export_item' => 1, 'db' => null, 'item_name' => null],+ ],+ ], $parent->links); } }
After analyzing the provided code diff, here's my assessment: 1. Vulnerability Existed: no This appears to be a test file modification that changes the assertion style from `assertEquals` to `assertSame` and reformats the array comparison. There are no security-related changes in this diff. The changes are: - Changed `$this->assertIsArray` to `self::assertIsArray` - Changed `$this->assertEquals` to `self::assertSame` - Reformatted the array comparison for better readability These changes are related to test code quality improvements rather than security fixes. The functionality being tested remains the same, only the testing approach has been modified to use stricter comparison (`assertSame` instead of `assertEquals`) which is a best practice but not security-related.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/libraries/classes/ErrorHandler.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/libraries/classes/ErrorHandler.php@@ -13,7 +13,6 @@ use function defined; use function error_reporting; use function get_class;-use function headers_sent; use function htmlspecialchars; use function set_error_handler; use function set_exception_handler;@@ -28,7 +27,6 @@ use const E_NOTICE; use const E_PARSE; use const E_RECOVERABLE_ERROR;-use const E_STRICT; use const E_USER_DEPRECATED; use const E_USER_ERROR; use const E_USER_NOTICE;@@ -235,8 +233,13 @@ { $config = $GLOBALS['config'] ?? null; $this->hideLocation = ! $config instanceof Config || $config->get('environment') !== 'development';+ $message = get_class($exception);+ if (! ($exception instanceof \Error) || ! $this->hideLocation) {+ $message .= ': ' . $exception->getMessage();+ }+ $this->addError(- get_class($exception) . ': ' . $exception->getMessage(),+ $message, (int) $exception->getCode(), $exception->getFile(), $exception->getLine()@@ -282,7 +285,7 @@ } switch ($error->getNumber()) {- case E_STRICT:+ case 2048: // E_STRICT case E_DEPRECATED: case E_NOTICE: case E_WARNING:@@ -307,7 +310,7 @@ // FATAL error, display it and exit $this->dispFatalError($error); if (! defined('TESTSUITE')) {- exit;+ exit; // @codeCoverageIgnore } } }@@ -333,12 +336,16 @@ */ protected function dispFatalError(Error $error): void {- if (! headers_sent()) {- $this->dispPageStart($error);- }-- echo $error->getDisplay();- $this->dispPageEnd();+ $response = ResponseRenderer::getInstance();+ if (! $response->headersSent()) {+ $response->disable();+ $response->addHTML('<html><head><title>');+ $response->addHTML($error->getTitle());+ $response->addHTML('</title></head>' . "\n");+ }++ $response->addHTML($error->getDisplay());+ $response->addHTML('</body></html>'); if (! defined('TESTSUITE')) { exit; }@@ -367,32 +374,6 @@ } return $retval;- }-- /**- * display HTML header- *- * @param Error $error the error- */- protected function dispPageStart(?Error $error = null): void- {- ResponseRenderer::getInstance()->disable();- echo '<html><head><title>';- if ($error) {- echo $error->getTitle();- } else {- echo 'phpMyAdmin error reporting page';- }-- echo '</title></head>';- }-- /**- * display HTML footer- */- protected function dispPageEnd(): void- {- echo '</body></html>'; } /**
Here's the analysis of the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential Information Leak] [libraries/classes/ErrorHandler.php] [Lines 235-243] [Old Code] $this->addError( get_class($exception) . ': ' . $exception->getMessage(), (int) $exception->getCode(), $exception->getFile(), $exception->getLine() ); [Fixed Code] $message = get_class($exception); if (! ($exception instanceof \Error) || ! $this->hideLocation) { $message .= ': ' . $exception->getMessage(); } $this->addError( $message, (int) $exception->getCode(), $exception->getFile(), $exception->getLine() ); 2. Vulnerability Existed: not sure [Error Handling Improvement] [libraries/classes/ErrorHandler.php] [Lines 282-283] [Old Code] case E_STRICT: [Fixed Code] case 2048: // E_STRICT 3. Vulnerability Existed: not sure [Potential XSS Protection] [libraries/classes/ErrorHandler.php] [Lines 333-346] [Old Code] if (! headers_sent()) { $this->dispPageStart($error); } echo $error->getDisplay(); $this->dispPageEnd(); [Fixed Code] $response = ResponseRenderer::getInstance(); if (! $response->headersSent()) { $response->disable(); $response->addHTML('<html><head><title>'); $response->addHTML($error->getTitle()); $response->addHTML('</title></head>' . "\n"); } $response->addHTML($error->getDisplay()); $response->addHTML('</body></html>'); Note: While these changes appear to be security-related improvements, I cannot definitively confirm they fix specific vulnerabilities without more context. The changes include: 1. More controlled error message display (potentially preventing information leaks) 2. Hardcoded error constant value (E_STRICT) which might be more reliable 3. Using ResponseRenderer for output (which likely provides better XSS protection than direct echo)
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/libraries/classes/Plugins/Transformations/Abs/ExternalTransformationsPlugin.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/libraries/classes/Plugins/Transformations/Abs/ExternalTransformationsPlugin.php@@ -17,7 +17,6 @@ use function fgets; use function fwrite; use function htmlspecialchars;-use function is_resource; use function proc_close; use function proc_open; use function sprintf;@@ -140,7 +139,7 @@ ], ]; $process = proc_open($program . ' ' . $options[1], $descriptorspec, $pipes);- if (is_resource($process)) {+ if ($process !== false) { fwrite($pipes[0], $buffer); fclose($pipes[0]);
Here's the analysis following your requested format: Vulnerability Existed: not sure Potential Process Handling Vulnerability [File] [Lines 140] [Old Code] if (is_resource($process)) { [Fixed Code] if ($process !== false) { Additional Details: The change replaces `is_resource()` check with a direct comparison to `false`. While this isn't a clear security vulnerability, it could be related to more robust process handling. The original code might have had edge cases where `is_resource()` could return true for invalid resources, while the new version explicitly checks for failure (false return value). This could prevent potential issues with malformed process handles, though it's not clearly a security fix. Note: There isn't enough context to identify a specific named vulnerability, but the change does appear to make the process handling more robust. The modification could be related to preventing edge cases where invalid process resources might cause issues, but this is speculative.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/test/classes/Config/Settings/TransformationsTest.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/test/classes/Config/Settings/TransformationsTest.php@@ -50,7 +50,7 @@ $settings = new Transformations($actualValues); foreach (array_keys($expectedValues) as $key) {- $this->assertSame($expected[$key], $settings->$key);+ self::assertSame($expected[$key], $settings->$key); } }@@ -60,7 +60,7 @@ * @return mixed[][][][] * @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][] */- public function providerForTestConstructor(): array+ public static function providerForTestConstructor(): array { return [ 'null values' => [
I'll analyze the provided code diff for security fixes following the required format. 1. First change analysis: Vulnerability Existed: no [No Vulnerability] [test/classes/Config/Settings/TransformationsTest.php] [Lines 50] Old Code: $this->assertSame($expected[$key], $settings->$key); Fixed Code: self::assertSame($expected[$key], $settings->$key); Additional Details: This appears to be a test code improvement changing instance assertion to static assertion, not a security fix. 2. Second change analysis: Vulnerability Existed: no [No Vulnerability] [test/classes/Config/Settings/TransformationsTest.php] [Lines 60] Old Code: public function providerForTestConstructor(): array Fixed Code: public static function providerForTestConstructor(): array Additional Details: This change makes a test data provider method static, which is a code quality improvement rather than a security fix. No security vulnerabilities were found in the provided diff. The changes appear to be test code improvements rather than security fixes.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/test/classes/ConfigStorage/RelationTest.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/test/classes/ConfigStorage/RelationTest.php@@ -7,8 +7,10 @@ use PhpMyAdmin\ConfigStorage\Relation; use PhpMyAdmin\ConfigStorage\RelationParameters; use PhpMyAdmin\DatabaseInterface;+use PhpMyAdmin\RecentFavoriteTable; use PhpMyAdmin\Tests\AbstractTestCase; use PhpMyAdmin\Tests\Stubs\DummyResult;+use ReflectionClass; use function implode;@@ -49,24 +51,16 @@ $this->dummyDbi->addSelectDb('phpmyadmin'); $db = 'information_schema'; $table = 'CHARACTER_SETS';- $this->assertEquals(- 'DESCRIPTION',- $this->relation->getDisplayField($db, $table)- );+ self::assertSame('DESCRIPTION', $this->relation->getDisplayField($db, $table)); $this->assertAllSelectsConsumed(); $db = 'information_schema'; $table = 'TABLES';- $this->assertEquals(- 'TABLE_COMMENT',- $this->relation->getDisplayField($db, $table)- );+ self::assertSame('TABLE_COMMENT', $this->relation->getDisplayField($db, $table)); $db = 'information_schema'; $table = 'PMA';- $this->assertFalse(- $this->relation->getDisplayField($db, $table)- );+ self::assertFalse($this->relation->getDisplayField($db, $table)); } /**@@ -99,20 +93,14 @@ $this->relation->dbi = $GLOBALS['dbi']; $db = 'information_schema';- $this->assertEquals(- [''],- $this->relation->getComments($db)- );+ self::assertSame([''], $this->relation->getComments($db)); $db = 'information_schema'; $table = 'TABLES';- $this->assertEquals(- [- 'field1' => 'Comment1',- 'field2' => 'Comment1',- ],- $this->relation->getComments($db, $table)- );+ self::assertSame([+ 'field1' => 'Comment1',+ 'field2' => 'Comment1',+ ], $this->relation->getComments($db, $table)); } /**@@ -142,16 +130,16 @@ // Case 1 $actual = $this->relation->tryUpgradeTransformations();- $this->assertFalse($actual);+ self::assertFalse($actual); // Case 2 $actual = $this->relation->tryUpgradeTransformations();- $this->assertTrue($actual);+ self::assertTrue($actual); } public function testSearchColumnInForeignersError(): void {- $this->assertFalse($this->relation->searchColumnInForeigners([], 'id'));+ self::assertFalse($this->relation->searchColumnInForeigners([], 'id')); } /**@@ -194,7 +182,7 @@ $expected['on_delete'] = 'CASCADE'; $expected['on_update'] = 'CASCADE';- $this->assertEquals($expected, $foreigner);+ self::assertEquals($expected, $foreigner); } public function testFixPmaTablesNothingWorks(): void@@ -267,16 +255,16 @@ $this->relation->fixPmaTables('db_pma', false);- $this->assertArrayHasKey($GLOBALS['server'], $_SESSION['relation'], 'The cache is expected to be filled');+ self::assertArrayHasKey($GLOBALS['server'], $_SESSION['relation'], 'The cache is expected to be filled'); /** @psalm-suppress EmptyArrayAccess */- $this->assertIsArray($_SESSION['relation'][$GLOBALS['server']]);+ self::assertIsArray($_SESSION['relation'][$GLOBALS['server']]); $relationParameters = RelationParameters::fromArray([ 'db' => 'db_pma', 'userconfigwork' => true, 'userconfig' => 'pma__userconfig', ]);- $this->assertSame($relationParameters->toArray(), $_SESSION['relation'][$GLOBALS['server']]);+ self::assertSame($relationParameters->toArray(), $_SESSION['relation'][$GLOBALS['server']]); $this->assertAllQueriesConsumed(); $this->assertAllSelectsConsumed();@@ -541,23 +529,23 @@ [] );- $this->assertSame('', $GLOBALS['cfg']['Server']['pmadb']);+ self::assertSame('', $GLOBALS['cfg']['Server']['pmadb']); $_SESSION['relation'] = []; $this->relation->fixPmaTables('db_pma', true);- $this->assertArrayNotHasKey('message', $GLOBALS);- $this->assertArrayHasKey($GLOBALS['server'], $_SESSION['relation'], 'The cache is expected to be filled');+ self::assertArrayNotHasKey('message', $GLOBALS);+ self::assertArrayHasKey($GLOBALS['server'], $_SESSION['relation'], 'The cache is expected to be filled'); /** @psalm-suppress EmptyArrayAccess */- $this->assertIsArray($_SESSION['relation'][$GLOBALS['server']]);- $this->assertSame('db_pma', $GLOBALS['cfg']['Server']['pmadb']);+ self::assertIsArray($_SESSION['relation'][$GLOBALS['server']]);+ self::assertSame('db_pma', $GLOBALS['cfg']['Server']['pmadb']); $relationParameters = RelationParameters::fromArray([ 'db' => 'db_pma', 'userconfigwork' => true, 'userconfig' => 'pma__userconfig', ]);- $this->assertSame($relationParameters->toArray(), $_SESSION['relation'][$GLOBALS['server']]);+ self::assertSame($relationParameters->toArray(), $_SESSION['relation'][$GLOBALS['server']]); $this->assertAllQueriesConsumed(); $this->assertAllSelectsConsumed();@@ -826,25 +814,25 @@ [] );- $this->assertSame('db_pma', $GLOBALS['cfg']['Server']['pmadb']);+ self::assertSame('db_pma', $GLOBALS['cfg']['Server']['pmadb']); $_SESSION['relation'] = []; $this->dummyDbi->addSelectDb('db_pma'); $this->dummyDbi->addSelectDb('db_pma'); $this->relation->fixPmaTables('db_pma', true);- $this->assertArrayNotHasKey('message', $GLOBALS);- $this->assertArrayHasKey($GLOBALS['server'], $_SESSION['relation'], 'The cache is expected to be filled');+ self::assertArrayNotHasKey('message', $GLOBALS);+ self::assertArrayHasKey($GLOBALS['server'], $_SESSION['relation'], 'The cache is expected to be filled'); /** @psalm-suppress EmptyArrayAccess */- $this->assertIsArray($_SESSION['relation'][$GLOBALS['server']]);- $this->assertSame('db_pma', $GLOBALS['cfg']['Server']['pmadb']);+ self::assertIsArray($_SESSION['relation'][$GLOBALS['server']]);+ self::assertSame('db_pma', $GLOBALS['cfg']['Server']['pmadb']); $relationParameters = RelationParameters::fromArray([ 'db' => 'db_pma', 'userconfigwork' => true, 'userconfig' => 'pma__userconfig', ]);- $this->assertSame($relationParameters->toArray(), $_SESSION['relation'][$GLOBALS['server']]);+ self::assertSame($relationParameters->toArray(), $_SESSION['relation'][$GLOBALS['server']]); $this->assertAllQueriesConsumed(); $this->assertAllSelectsConsumed();@@ -905,17 +893,17 @@ ); $this->dummyDbi->addSelectDb('db_pma');- $this->assertSame('', $GLOBALS['cfg']['Server']['pmadb']);+ self::assertSame('', $GLOBALS['cfg']['Server']['pmadb']); $_SESSION['relation'] = []; $this->relation->fixPmaTables('db_pma', true);- $this->assertArrayHasKey('message', $GLOBALS);- $this->assertSame('MYSQL_ERROR', $GLOBALS['message']);- $this->assertSame('', $GLOBALS['cfg']['Server']['pmadb']);-- $this->assertSame([], $_SESSION['relation']);+ self::assertArrayHasKey('message', $GLOBALS);+ self::assertSame('MYSQL_ERROR', $GLOBALS['message']);+ self::assertSame('', $GLOBALS['cfg']['Server']['pmadb']);++ self::assertSame([], $_SESSION['relation']); $this->assertAllQueriesConsumed(); $this->assertAllErrorCodesConsumed();@@ -939,13 +927,11 @@ ); $this->dummyDbi->addSelectDb('phpmyadmin');- $this->assertArrayNotHasKey('errno', $GLOBALS);-- $this->assertTrue(- $this->relation->createPmaDatabase('phpmyadmin')- );-- $this->assertArrayNotHasKey('message', $GLOBALS);+ self::assertArrayNotHasKey('errno', $GLOBALS);++ self::assertTrue($this->relation->createPmaDatabase('phpmyadmin'));++ self::assertArrayNotHasKey('message', $GLOBALS); $this->assertAllQueriesConsumed(); $this->assertAllErrorCodesConsumed();@@ -963,17 +949,12 @@ $GLOBALS['errno'] = 1044;// ER_DBACCESS_DENIED_ERROR- $this->assertFalse(- $this->relation->createPmaDatabase('phpmyadmin')- );-- $this->assertArrayHasKey('message', $GLOBALS);- $this->assertSame(- 'You do not have necessary privileges to create a database named'- . ' \'phpmyadmin\'. You may go to \'Operations\' tab of any'- . ' database to set up the phpMyAdmin configuration storage there.',- $GLOBALS['message']- );+ self::assertFalse($this->relation->createPmaDatabase('phpmyadmin'));++ self::assertArrayHasKey('message', $GLOBALS);+ self::assertSame('You do not have necessary privileges to create a database named'+ . ' \'phpmyadmin\'. You may go to \'Operations\' tab of any'+ . ' database to set up the phpMyAdmin configuration storage there.', $GLOBALS['message']); $this->assertAllQueriesConsumed(); $this->assertAllErrorCodesConsumed();@@ -990,12 +971,10 @@ $GLOBALS['errno'] = 1040;- $this->assertFalse(- $this->relation->createPmaDatabase('pma_1040')- );-- $this->assertArrayHasKey('message', $GLOBALS);- $this->assertSame('Too many connections', $GLOBALS['message']);+ self::assertFalse($this->relation->createPmaDatabase('pma_1040'));++ self::assertArrayHasKey('message', $GLOBALS);+ self::assertSame('Too many connections', $GLOBALS['message']); $this->assertAllQueriesConsumed(); $this->assertAllErrorCodesConsumed();@@ -1393,10 +1372,7 @@ ]), ];- $this->assertSame(- $data,- $this->relation->getDefaultPmaTableNames([])- );+ self::assertSame($data, $this->relation->getDefaultPmaTableNames([])); $data['pma__export_templates'] = implode("\n", [ '',@@ -1420,7 +1396,7 @@ ' DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;', ]);- $this->assertSame(+ self::assertSame( $data, $this->relation->getDefaultPmaTableNames(['pma__export_templates' => 'db_exporttemplates_pma']) );@@ -1464,15 +1440,15 @@ $relation = new Relation($this->dbi); $relation->initRelationParamsCache();- $this->assertArrayHasKey($GLOBALS['server'], $_SESSION['relation'], 'The cache is expected to be filled');+ self::assertArrayHasKey($GLOBALS['server'], $_SESSION['relation'], 'The cache is expected to be filled'); /** @psalm-suppress EmptyArrayAccess */- $this->assertIsArray($_SESSION['relation'][$GLOBALS['server']]);+ self::assertIsArray($_SESSION['relation'][$GLOBALS['server']]); // Should all be false for server = 0 $relationParameters = RelationParameters::fromArray([]);- $this->assertSame($relationParameters->toArray(), $_SESSION['relation'][$GLOBALS['server']]);-- $this->assertEquals([+ self::assertSame($relationParameters->toArray(), $_SESSION['relation'][$GLOBALS['server']]);++ self::assertSame([ 'userconfig' => 'pma__userconfig', 'pmadb' => false,// This is the expected value for server = 0 ], $GLOBALS['cfg']['Server']);@@ -1540,9 +1516,9 @@ $relation->initRelationParamsCache(); $this->assertAllSelectsConsumed();- $this->assertArrayHasKey($GLOBALS['server'], $_SESSION['relation'], 'The cache is expected to be filled');+ self::assertArrayHasKey($GLOBALS['server'], $_SESSION['relation'], 'The cache is expected to be filled'); /** @psalm-suppress EmptyArrayAccess */- $this->assertIsArray($_SESSION['relation'][$GLOBALS['server']]);+ self::assertIsArray($_SESSION['relation'][$GLOBALS['server']]); // Should all be false for server = 0 $relationParameters = RelationParameters::fromArray([@@ -1550,9 +1526,9 @@ 'userconfigwork' => true, 'userconfig' => 'pma__userconfig', ]);- $this->assertSame($relationParameters->toArray(), $_SESSION['relation'][$GLOBALS['server']]);-- $this->assertSame([+ self::assertSame($relationParameters->toArray(), $_SESSION['relation'][$GLOBALS['server']]);++ self::assertSame([ 'user' => '', 'pmadb' => 'phpmyadmin', 'bookmarktable' => '',@@ -1634,18 +1610,18 @@ $relation->initRelationParamsCache(); $this->assertAllSelectsConsumed();- $this->assertArrayHasKey($GLOBALS['server'], $_SESSION['relation'], 'The cache is expected to be filled');+ self::assertArrayHasKey($GLOBALS['server'], $_SESSION['relation'], 'The cache is expected to be filled'); /** @psalm-suppress EmptyArrayAccess */- $this->assertIsArray($_SESSION['relation'][$GLOBALS['server']]);+ self::assertIsArray($_SESSION['relation'][$GLOBALS['server']]); $relationParameters = RelationParameters::fromArray([ 'db' => 'phpmyadmin', 'userconfigwork' => false, 'userconfig' => 'pma__userconfig', ]);- $this->assertSame($relationParameters->toArray(), $_SESSION['relation'][$GLOBALS['server']]);-- $this->assertSame([+ self::assertSame($relationParameters->toArray(), $_SESSION['relation'][$GLOBALS['server']]);++ self::assertSame([ 'user' => '', 'pmadb' => 'phpmyadmin', 'bookmarktable' => '',@@ -1739,12 +1715,8 @@ $relation = new Relation($this->dbi); $relation->initRelationParamsCache();- $this->assertArrayHasKey(- 'relation',- $_SESSION,- 'The cache is expected to be filled because the custom override'- . 'was undertood (pma__userconfig vs pma__userconfig_custom)'- );+ self::assertArrayHasKey('relation', $_SESSION, 'The cache is expected to be filled because the custom override'+ . 'was understood (pma__userconfig vs pma__userconfig_custom)'); $this->assertAllQueriesConsumed(); $this->assertAllSelectsConsumed();@@ -1779,9 +1751,9 @@ 'userconfigwork' => true, 'userconfig' => 'pma__userconfig_custom', ]);- $this->assertSame($relationParameters->toArray(), $relationData->toArray());-- $this->assertSame([+ self::assertSame($relationParameters->toArray(), $relationData->toArray());++ self::assertSame([ 'user' => '', 'pmadb' => 'PMA-storage', 'bookmarktable' => '',@@ -1808,6 +1780,380 @@ $this->assertAllQueriesConsumed(); }+ public function testInitRelationParamsDisabledTracking(): void+ {+ parent::setGlobalDbi();++ $GLOBALS['db'] = '';+ $GLOBALS['server'] = 1;+ $GLOBALS['cfg']['Server'] = [];+ $GLOBALS['cfg']['Server']['user'] = '';+ $GLOBALS['cfg']['Server']['pmadb'] = 'PMA-storage';+ $GLOBALS['cfg']['Server']['bookmarktable'] = '';+ $GLOBALS['cfg']['Server']['relation'] = '';+ $GLOBALS['cfg']['Server']['table_info'] = '';+ $GLOBALS['cfg']['Server']['table_coords'] = '';+ $GLOBALS['cfg']['Server']['column_info'] = '';+ $GLOBALS['cfg']['Server']['pdf_pages'] = '';+ $GLOBALS['cfg']['Server']['history'] = '';+ $GLOBALS['cfg']['Server']['recent'] = '';+ $GLOBALS['cfg']['Server']['favorite'] = '';+ $GLOBALS['cfg']['Server']['table_uiprefs'] = '';+ $GLOBALS['cfg']['Server']['tracking'] = false;+ $GLOBALS['cfg']['Server']['userconfig'] = '';+ $GLOBALS['cfg']['Server']['users'] = '';+ $GLOBALS['cfg']['Server']['usergroups'] = '';+ $GLOBALS['cfg']['Server']['navigationhiding'] = '';+ $GLOBALS['cfg']['Server']['savedsearches'] = '';+ $GLOBALS['cfg']['Server']['central_columns'] = '';+ $GLOBALS['cfg']['Server']['designer_settings'] = '';+ $GLOBALS['cfg']['Server']['export_templates'] = '';++ $this->dummyDbi->removeDefaultResults();+ $this->dummyDbi->addResult(+ 'SHOW TABLES FROM `PMA-storage`;',+ [+ ['pma__tracking'],+ ],+ ['Tables_in_PMA-storage']+ );++ $_SESSION['relation'] = [];++ $relation = new Relation($this->dbi);+ $relation->initRelationParamsCache();++ self::assertArrayHasKey('relation', $_SESSION, 'The cache is expected to be filled because the custom override'+ . 'was understood');++ $this->assertAllQueriesConsumed();+ $this->assertAllSelectsConsumed();++ $this->dummyDbi->addResult(+ 'SHOW TABLES FROM `PMA-storage`',+ [+ [+ 'pma__userconfig_custom',+ 'pma__usergroups',+ ],+ ],+ ['Tables_in_PMA-storage']+ );++ $this->dummyDbi->addSelectDb('PMA-storage');+ /** @psalm-suppress EmptyArrayAccess */+ unset($_SESSION['relation'][$GLOBALS['server']]);+ $relationData = $relation->getRelationParameters();+ $this->assertAllSelectsConsumed();++ $relationParameters = RelationParameters::fromArray([+ 'db' => 'PMA-storage',+ 'trackingwork' => false,+ 'tracking' => false,+ ]);+ self::assertSame($relationParameters->toArray(), $relationData->toArray());+ self::assertNull($relationParameters->trackingFeature, 'The feature should not be enabled');++ self::assertSame([+ 'user' => '',+ 'pmadb' => 'PMA-storage',+ 'bookmarktable' => '',+ 'relation' => '',+ 'table_info' => '',+ 'table_coords' => '',+ 'column_info' => '',+ 'pdf_pages' => '',+ 'history' => '',+ 'recent' => '',+ 'favorite' => '',+ 'table_uiprefs' => '',+ 'tracking' => false,+ 'userconfig' => '',+ 'users' => '',+ 'usergroups' => '',+ 'navigationhiding' => '',+ 'savedsearches' => '',+ 'central_columns' => '',+ 'designer_settings' => '',+ 'export_templates' => '',+ ], $GLOBALS['cfg']['Server']);++ $this->assertAllQueriesConsumed();+ }++ public function testInitRelationParamsDisabledTrackingOthersExist(): void+ {+ parent::setGlobalDbi();++ $GLOBALS['db'] = '';+ $GLOBALS['server'] = 1;+ $GLOBALS['cfg']['Server'] = [];+ $GLOBALS['cfg']['Server']['user'] = '';+ $GLOBALS['cfg']['Server']['pmadb'] = 'PMA-storage';+ $GLOBALS['cfg']['Server']['bookmarktable'] = '';+ $GLOBALS['cfg']['Server']['relation'] = '';+ $GLOBALS['cfg']['Server']['table_info'] = '';+ $GLOBALS['cfg']['Server']['table_coords'] = '';+ $GLOBALS['cfg']['Server']['column_info'] = '';+ $GLOBALS['cfg']['Server']['pdf_pages'] = '';+ $GLOBALS['cfg']['Server']['history'] = '';+ $GLOBALS['cfg']['Server']['recent'] = '';+ $GLOBALS['cfg']['Server']['favorite'] = 'pma__favorite_custom';+ $GLOBALS['cfg']['Server']['table_uiprefs'] = '';+ $GLOBALS['cfg']['Server']['tracking'] = false;+ $GLOBALS['cfg']['Server']['userconfig'] = '';+ $GLOBALS['cfg']['Server']['users'] = '';+ $GLOBALS['cfg']['Server']['usergroups'] = '';+ $GLOBALS['cfg']['Server']['navigationhiding'] = '';+ $GLOBALS['cfg']['Server']['savedsearches'] = '';+ $GLOBALS['cfg']['Server']['central_columns'] = '';+ $GLOBALS['cfg']['Server']['designer_settings'] = '';+ $GLOBALS['cfg']['Server']['export_templates'] = '';++ $this->dummyDbi->removeDefaultResults();+ $this->dummyDbi->addSelectDb('PMA-storage');+ $this->dummyDbi->addResult(+ 'SHOW TABLES FROM `PMA-storage`;',+ [+ ['pma__favorite_custom'],+ ],+ ['Tables_in_PMA-storage']+ );++ $this->dummyDbi->addResult(+ 'SHOW TABLES FROM `PMA-storage`',+ [+ ['pma__favorite_custom'],+ ],+ ['Tables_in_PMA-storage']+ );++ $this->dummyDbi->addResult(+ 'SELECT NULL FROM `pma__favorite_custom` LIMIT 0',+ [+ ['NULL'],+ ],+ ['NULL']+ );++ $_SESSION['relation'] = [];+ $_SESSION['tmpval'] = [];+ $recentFavoriteTableInstances = (new ReflectionClass(RecentFavoriteTable::class))->getProperty('instances');+ $recentFavoriteTableInstances->setAccessible(true);+ $recentFavoriteTableInstances->setValue(null, []);++ $relation = new Relation($this->dbi);+ $relation->initRelationParamsCache();++ self::assertArrayHasKey('relation', $_SESSION, 'The cache is expected to be filled because the custom override'+ . 'was understood');++ $this->assertAllQueriesConsumed();+ $this->assertAllSelectsConsumed();++ $this->dummyDbi->addSelectDb('PMA-storage');++ $this->dummyDbi->addResult(+ 'SHOW TABLES FROM `PMA-storage`',+ [+ ['pma__favorite_custom'],+ ],+ ['Tables_in_PMA-storage']+ );++ $this->dummyDbi->addResult(+ 'SELECT NULL FROM `pma__favorite_custom` LIMIT 0',+ [+ ['NULL'],+ ],+ ['NULL']+ );++ /** @psalm-suppress EmptyArrayAccess */+ unset($_SESSION['relation'][$GLOBALS['server']]);+ $relationData = $relation->getRelationParameters();+ $this->assertAllSelectsConsumed();++ $relationParameters = RelationParameters::fromArray([+ 'db' => 'PMA-storage',+ 'trackingwork' => false,+ 'tracking' => false,+ 'favorite' => 'pma__favorite_custom',+ 'favoritework' => true,+ ]);+ self::assertSame($relationParameters->toArray(), $relationData->toArray());+ self::assertNull($relationParameters->trackingFeature, 'The feature should not be enabled');++ self::assertSame([+ 'user' => '',+ 'pmadb' => 'PMA-storage',+ 'bookmarktable' => '',+ 'relation' => '',+ 'table_info' => '',+ 'table_coords' => '',+ 'column_info' => '',+ 'pdf_pages' => '',+ 'history' => '',+ 'recent' => '',+ 'favorite' => 'pma__favorite_custom',+ 'table_uiprefs' => '',+ 'tracking' => false,+ 'userconfig' => '',+ 'users' => '',+ 'usergroups' => '',+ 'navigationhiding' => '',+ 'savedsearches' => '',+ 'central_columns' => '',+ 'designer_settings' => '',+ 'export_templates' => '',+ ], $GLOBALS['cfg']['Server']);++ $this->assertAllQueriesConsumed();+ }++ public function testArePmadbTablesDefinedAndArePmadbTablesAllDisabled(): void+ {+ parent::setGlobalDbi();++ $GLOBALS['cfg']['Server']['bookmarktable'] = '';+ $GLOBALS['cfg']['Server']['relation'] = '';+ $GLOBALS['cfg']['Server']['table_info'] = '';+ $GLOBALS['cfg']['Server']['table_coords'] = '';+ $GLOBALS['cfg']['Server']['column_info'] = '';+ $GLOBALS['cfg']['Server']['pdf_pages'] = '';+ $GLOBALS['cfg']['Server']['history'] = '';+ $GLOBALS['cfg']['Server']['recent'] = '';+ $GLOBALS['cfg']['Server']['favorite'] = '';+ $GLOBALS['cfg']['Server']['table_uiprefs'] = '';+ $GLOBALS['cfg']['Server']['tracking'] = '';+ $GLOBALS['cfg']['Server']['userconfig'] = '';+ $GLOBALS['cfg']['Server']['users'] = '';+ $GLOBALS['cfg']['Server']['usergroups'] = '';+ $GLOBALS['cfg']['Server']['navigationhiding'] = '';+ $GLOBALS['cfg']['Server']['savedsearches'] = '';+ $GLOBALS['cfg']['Server']['central_columns'] = '';+ $GLOBALS['cfg']['Server']['designer_settings'] = '';+ $GLOBALS['cfg']['Server']['export_templates'] = '';++ self::assertFalse($this->relation->arePmadbTablesDefined());+ self::assertFalse($this->relation->arePmadbTablesAllDisabled());++ $GLOBALS['cfg']['Server']['bookmarktable'] = '';+ $GLOBALS['cfg']['Server']['relation'] = '';+ $GLOBALS['cfg']['Server']['table_info'] = '';+ $GLOBALS['cfg']['Server']['table_coords'] = '';+ $GLOBALS['cfg']['Server']['column_info'] = '';+ $GLOBALS['cfg']['Server']['pdf_pages'] = '';+ $GLOBALS['cfg']['Server']['history'] = '';+ $GLOBALS['cfg']['Server']['recent'] = '';+ $GLOBALS['cfg']['Server']['favorite'] = 'pma__favorite_custom';+ $GLOBALS['cfg']['Server']['table_uiprefs'] = '';+ $GLOBALS['cfg']['Server']['tracking'] = false;+ $GLOBALS['cfg']['Server']['userconfig'] = '';+ $GLOBALS['cfg']['Server']['users'] = '';+ $GLOBALS['cfg']['Server']['usergroups'] = '';+ $GLOBALS['cfg']['Server']['navigationhiding'] = '';+ $GLOBALS['cfg']['Server']['savedsearches'] = '';+ $GLOBALS['cfg']['Server']['central_columns'] = '';+ $GLOBALS['cfg']['Server']['designer_settings'] = '';+ $GLOBALS['cfg']['Server']['export_templates'] = '';++ self::assertFalse($this->relation->arePmadbTablesDefined());+ self::assertFalse($this->relation->arePmadbTablesAllDisabled());++ $GLOBALS['cfg']['Server']['bookmarktable'] = 'pma__bookmark';+ $GLOBALS['cfg']['Server']['relation'] = 'pma__relation';+ $GLOBALS['cfg']['Server']['table_info'] = 'pma__table_info';+ $GLOBALS['cfg']['Server']['table_coords'] = 'pma__table_coords';+ $GLOBALS['cfg']['Server']['pdf_pages'] = 'pma__pdf_pages';+ $GLOBALS['cfg']['Server']['column_info'] = 'pma__column_info';+ $GLOBALS['cfg']['Server']['history'] = 'pma__history';+ $GLOBALS['cfg']['Server']['table_uiprefs'] = 'pma__table_uiprefs';+ $GLOBALS['cfg']['Server']['tracking'] = 'pma__tracking';+ $GLOBALS['cfg']['Server']['userconfig'] = 'pma__userconfig';+ $GLOBALS['cfg']['Server']['recent'] = 'pma__recent';+ $GLOBALS['cfg']['Server']['favorite'] = 'pma__favorite';+ $GLOBALS['cfg']['Server']['users'] = 'pma__users';+ $GLOBALS['cfg']['Server']['usergroups'] = 'pma__usergroups';+ $GLOBALS['cfg']['Server']['navigationhiding'] = 'pma__navigationhiding';+ $GLOBALS['cfg']['Server']['savedsearches'] = 'pma__savedsearches';+ $GLOBALS['cfg']['Server']['central_columns'] = 'pma__central_columns';+ $GLOBALS['cfg']['Server']['designer_settings'] = 'pma__designer_settings';+ $GLOBALS['cfg']['Server']['export_templates'] = 'pma__export_templates';++ self::assertTrue($this->relation->arePmadbTablesDefined());+ self::assertFalse($this->relation->arePmadbTablesAllDisabled());++ $GLOBALS['cfg']['Server']['bookmarktable'] = 'pma__bookmark';+ $GLOBALS['cfg']['Server']['relation'] = 'pma__relation';+ $GLOBALS['cfg']['Server']['table_info'] = 'pma__table_info';+ $GLOBALS['cfg']['Server']['table_coords'] = 'pma__table_coords';+ $GLOBALS['cfg']['Server']['pdf_pages'] = 'pma__pdf_pages';+ $GLOBALS['cfg']['Server']['column_info'] = 'pma__column_info';+ $GLOBALS['cfg']['Server']['history'] = 'custom_name';+ $GLOBALS['cfg']['Server']['table_uiprefs'] = 'pma__table_uiprefs';+ $GLOBALS['cfg']['Server']['tracking'] = 'pma__tracking';+ $GLOBALS['cfg']['Server']['userconfig'] = 'pma__userconfig';+ $GLOBALS['cfg']['Server']['recent'] = 'pma__recent';+ $GLOBALS['cfg']['Server']['favorite'] = 'pma__favorite';+ $GLOBALS['cfg']['Server']['users'] = 'pma__users';+ $GLOBALS['cfg']['Server']['usergroups'] = 'pma__usergroups';+ $GLOBALS['cfg']['Server']['navigationhiding'] = 'pma__navigationhiding';+ $GLOBALS['cfg']['Server']['savedsearches'] = 'pma__savedsearches';+ $GLOBALS['cfg']['Server']['central_columns'] = 'pma__central_columns';+ $GLOBALS['cfg']['Server']['designer_settings'] = 'pma__designer_settings';+ $GLOBALS['cfg']['Server']['export_templates'] = 'pma__export_templates';++ self::assertTrue($this->relation->arePmadbTablesDefined());+ self::assertFalse($this->relation->arePmadbTablesAllDisabled());++ $GLOBALS['cfg']['Server']['bookmarktable'] = 'pma__bookmark';+ $GLOBALS['cfg']['Server']['relation'] = 'pma__relation';+ $GLOBALS['cfg']['Server']['table_info'] = 'pma__table_info';+ $GLOBALS['cfg']['Server']['table_coords'] = 'pma__table_coords';+ $GLOBALS['cfg']['Server']['pdf_pages'] = 'pma__pdf_pages';+ $GLOBALS['cfg']['Server']['column_info'] = 'pma__column_info';+ $GLOBALS['cfg']['Server']['history'] = 'pma__history';+ $GLOBALS['cfg']['Server']['table_uiprefs'] = 'pma__table_uiprefs';+ $GLOBALS['cfg']['Server']['tracking'] = 'pma__tracking';+ $GLOBALS['cfg']['Server']['userconfig'] = '';+ $GLOBALS['cfg']['Server']['recent'] = 'pma__recent';+ $GLOBALS['cfg']['Server']['favorite'] = 'pma__favorite';+ $GLOBALS['cfg']['Server']['users'] = 'pma__users';+ $GLOBALS['cfg']['Server']['usergroups'] = 'pma__usergroups';+ $GLOBALS['cfg']['Server']['navigationhiding'] = 'pma__navigationhiding';+ $GLOBALS['cfg']['Server']['savedsearches'] = 'pma__savedsearches';+ $GLOBALS['cfg']['Server']['central_columns'] = 'pma__central_columns';+ $GLOBALS['cfg']['Server']['designer_settings'] = 'pma__designer_settings';+ $GLOBALS['cfg']['Server']['export_templates'] = 'pma__export_templates';++ self::assertFalse($this->relation->arePmadbTablesDefined());+ self::assertFalse($this->relation->arePmadbTablesAllDisabled());++ $GLOBALS['cfg']['Server']['bookmarktable'] = false; //'pma__bookmark';+ $GLOBALS['cfg']['Server']['relation'] = false; //'pma__relation';+ $GLOBALS['cfg']['Server']['table_info'] = false; //'pma__table_info';+ $GLOBALS['cfg']['Server']['table_coords'] = false; //'pma__table_coords';+ $GLOBALS['cfg']['Server']['pdf_pages'] = false; //'pma__pdf_pages';+ $GLOBALS['cfg']['Server']['column_info'] = false; //'pma__column_info';+ $GLOBALS['cfg']['Server']['history'] = false; //'pma__history';+ $GLOBALS['cfg']['Server']['table_uiprefs'] = false; //'pma__table_uiprefs';+ $GLOBALS['cfg']['Server']['tracking'] = false; //'pma__tracking';+ $GLOBALS['cfg']['Server']['userconfig'] = false; //'pma__userconfig';+ $GLOBALS['cfg']['Server']['recent'] = false; //'pma__recent';+ $GLOBALS['cfg']['Server']['favorite'] = false; //'pma__favorite';+ $GLOBALS['cfg']['Server']['users'] = false; //'pma__users';+ $GLOBALS['cfg']['Server']['usergroups'] = false; //'pma__usergroups';+ $GLOBALS['cfg']['Server']['navigationhiding'] = false; //'pma__navigationhiding';+ $GLOBALS['cfg']['Server']['savedsearches'] = false; //'pma__savedsearches';+ $GLOBALS['cfg']['Server']['central_columns'] = false; //'pma__central_columns';+ $GLOBALS['cfg']['Server']['designer_settings'] = false; //'pma__designer_settings';+ $GLOBALS['cfg']['Server']['export_templates'] = false; //'pma__export_templates';++ self::assertFalse($this->relation->arePmadbTablesDefined());+ self::assertTrue($this->relation->arePmadbTablesAllDisabled());+ }+ /** * @param array<string, bool|string> $params * @param string[] $queries@@ -1833,7 +2179,7 @@ * @return array<int, array<int, array<int|string, bool|string>>> * @psalm-return list<array{array<string, bool|string>, string[]}> */- public function providerForTestRenameTable(): array+ public static function providerForTestRenameTable(): array { // phpcs:disable Generic.Files.LineLength.TooLong return [
After analyzing the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be primarily test-related improvements and code quality enhancements. Here's my analysis: 1. Vulnerability Existed: no The changes are mostly test assertions being updated from assertEquals() to assertSame() and similar test improvements. 2. Vulnerability Existed: no The changes include adding new test cases and imports (RecentFavoriteTable, ReflectionClass) but no security fixes. 3. Vulnerability Existed: no The modifications involve test method improvements and better handling of test assertions, not security patches. The diff shows: - Changing assertEquals() to assertSame() for more strict comparisons - Adding new test cases for relation parameters - Improving test coverage for various scenarios - Code style improvements - Better test isolation and cleanup No security vulnerabilities or their fixes are evident in this diff. The changes are focused on test quality and reliability rather than addressing security issues.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/test/classes/Controllers/Table/Structure/SaveControllerTest.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/test/classes/Controllers/Table/Structure/SaveControllerTest.php@@ -41,8 +41,6 @@ $this->createStub(StructureController::class) );- $this->assertFalse(- $method->invokeArgs($ctrl, [[]])- );+ self::assertFalse($method->invokeArgs($ctrl, [[]])); } }
Based on the provided diff, I'll analyze it for security vulnerabilities: Vulnerability Existed: no [No specific vulnerability] [test/classes/Controllers/Table/Structure/SaveControllerTest.php] [Lines 41-43] [Old Code] $this->assertFalse( $method->invokeArgs($ctrl, [[]]) ); [Fixed Code] self::assertFalse($method->invokeArgs($ctrl, [[]])); Explanation: The change appears to be a simple refactoring of test code, switching from instance method assertion ($this->assertFalse) to static method assertion (self::assertFalse). This doesn't indicate any security vulnerability fix, but rather a code style or test framework usage improvement. The actual test logic and parameters remain unchanged.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/test/classes/Controllers/Server/Status/ProcessesControllerTest.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/test/classes/Controllers/Server/Status/ProcessesControllerTest.php@@ -53,27 +53,24 @@ $this->assertAllSelectsConsumed(); $html = $response->getHTMLResult();- $this->assertStringContainsString(- 'Note: Enabling the auto refresh here might cause '- . 'heavy traffic between the web server and the MySQL server.',- $html- );+ self::assertStringContainsString('Note: Enabling the auto refresh here might cause '+ . 'heavy traffic between the web server and the MySQL server.', $html); // Test tab links- $this->assertStringContainsString('<div class="tabLinks row">', $html);- $this->assertStringContainsString('<a id="toggleRefresh" href="#">', $html);- $this->assertStringContainsString('play', $html);- $this->assertStringContainsString('Start auto refresh', $html);- $this->assertStringContainsString('<select id="id_refreshRate"', $html);- $this->assertStringContainsString('<option value="5" selected>', $html);- $this->assertStringContainsString('5 seconds', $html);+ self::assertStringContainsString('<div class="tabLinks row">', $html);+ self::assertStringContainsString('<a id="toggleRefresh" href="#">', $html);+ self::assertStringContainsString('play', $html);+ self::assertStringContainsString('Start auto refresh', $html);+ self::assertStringContainsString('<select id="id_refreshRate"', $html);+ self::assertStringContainsString('<option value="5" selected>', $html);+ self::assertStringContainsString('5 seconds', $html);- $this->assertStringContainsString(+ self::assertStringContainsString( '<table id="tableprocesslist" class="table table-striped table-hover sortable w-auto">', $html );- $this->assertStringContainsString('<th>Processes</th>', $html);- $this->assertStringContainsString('Show full queries', $html);- $this->assertStringContainsString('index.php?route=/server/status/processes', $html);+ self::assertStringContainsString('<th>Processes</th>', $html);+ self::assertStringContainsString('Show full queries', $html);+ self::assertStringContainsString('index.php?route=/server/status/processes', $html); $_POST['full'] = '1'; $_POST['column_name'] = 'Database';@@ -85,9 +82,9 @@ $this->assertAllSelectsConsumed(); $html = $response->getHTMLResult();- $this->assertStringContainsString('Truncate shown queries', $html);- $this->assertStringContainsString('Database', $html);- $this->assertStringContainsString('DESC', $html);+ self::assertStringContainsString('Truncate shown queries', $html);+ self::assertStringContainsString('Database', $html);+ self::assertStringContainsString('DESC', $html); $_POST['column_name'] = 'Host'; $_POST['order_by_field'] = 'Host';@@ -98,7 +95,7 @@ $this->assertAllSelectsConsumed(); $html = $response->getHTMLResult();- $this->assertStringContainsString('Host', $html);- $this->assertStringContainsString('ASC', $html);+ self::assertStringContainsString('Host', $html);+ self::assertStringContainsString('ASC', $html); } }
After analyzing the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be primarily stylistic and test assertion improvements, changing from `$this->assert...` to `self::assert...` style assertions. Here's the analysis following your requested format: Vulnerability Existed: no No security vulnerability found in test/classes/Controllers/Server/Status/ProcessesControllerTest.php [No old code showing security issues] [No fixed code showing security fixes] The changes are: 1. Changed assertion style from instance method ($this->assert) to static method (self::assert) 2. Minor formatting changes to string concatenation 3. No changes to actual functionality or security-related code These changes appear to be test code improvements rather than security fixes. The test continues to verify the same functionality, just with slightly different syntax.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/libraries/classes/Gis/GisVisualization.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/libraries/classes/Gis/GisVisualization.php@@ -16,7 +16,9 @@ use function array_merge; use function base64_encode; use function count;+use function htmlspecialchars; use function intval;+use function is_finite; use function is_numeric; use function is_string; use function mb_strlen;@@ -543,12 +545,7 @@ */ private function scaleDataSet(array $data) {- $min_max = [- 'maxX' => 0.0,- 'maxY' => 0.0,- 'minX' => 0.0,- 'minY' => 0.0,- ];+ $min_max = GisGeometry::EMPTY_EXTENT; $border = 15; // effective width and height of the plot $plot_width = $this->settings['width'] - 2 * $border;@@ -577,26 +574,33 @@ // Update minimum/maximum values for x and y coordinates. $c_maxX = (float) $scale_data['maxX'];- if ($min_max['maxX'] === 0.0 || $c_maxX > $min_max['maxX']) {+ if ($c_maxX > $min_max['maxX']) { $min_max['maxX'] = $c_maxX; } $c_minX = (float) $scale_data['minX'];- if ($min_max['minX'] === 0.0 || $c_minX < $min_max['minX']) {+ if ($c_minX < $min_max['minX']) { $min_max['minX'] = $c_minX; } $c_maxY = (float) $scale_data['maxY'];- if ($min_max['maxY'] === 0.0 || $c_maxY > $min_max['maxY']) {+ if ($c_maxY > $min_max['maxY']) { $min_max['maxY'] = $c_maxY; } $c_minY = (float) $scale_data['minY'];- if ($min_max['minY'] !== 0.0 && $c_minY >= $min_max['minY']) {+ if ($c_minY >= $min_max['minY']) { continue; } $min_max['minY'] = $c_minY;+ }++ if (! is_finite($min_max['minX']) || ! is_finite($min_max['minY'])) {+ $min_max['maxX'] = 0.0;+ $min_max['maxY'] = 0.0;+ $min_max['minX'] = 0.0;+ $min_max['minY'] = 0.0; } // scale the visualization@@ -671,7 +675,7 @@ if ($format === 'svg') { $results .= $gis_obj->prepareRowAsSvg( $row[$this->settings['spatialColumn']],- $label,+ htmlspecialchars($label), $this->settings['colors'][$index], $scale_data );
Analyzing the provided code diff, I can identify two security-related fixes: 1. Vulnerability Existed: yes Cross-Site Scripting (XSS) [libraries/classes/Gis/GisVisualization.php] [Lines 671-675] [Old Code] $results .= $gis_obj->prepareRowAsSvg( $row[$this->settings['spatialColumn']], $label, $this->settings['colors'][$index], $scale_data ); [Fixed Code] $results .= $gis_obj->prepareRowAsSvg( $row[$this->settings['spatialColumn']], htmlspecialchars($label), $this->settings['colors'][$index], $scale_data ); The fix adds htmlspecialchars() to sanitize the $label variable before outputting it in SVG format, preventing potential XSS attacks. 2. Vulnerability Existed: yes Invalid Numeric Input Handling [libraries/classes/Gis/GisVisualization.php] [Lines 543-596] [Old Code] $min_max = [ 'maxX' => 0.0, 'maxY' => 0.0, 'minX' => 0.0, 'minY' => 0.0, ]; ... // No validation for finite numbers [Fixed Code] $min_max = GisGeometry::EMPTY_EXTENT; ... if (! is_finite($min_max['minX']) || ! is_finite($min_max['minY'])) { $min_max['maxX'] = 0.0; $min_max['maxY'] = 0.0; $min_max['minX'] = 0.0; $min_max['minY'] = 0.0; } The fix adds validation using is_finite() to prevent potential issues with non-finite numeric values that could lead to unexpected behavior or security vulnerabilities in the GIS visualization. Note: The diff also shows the addition of htmlspecialchars and is_finite to the use statements at the top of the file, which are related to these security fixes.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/test/classes/Setup/IndexTest.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/test/classes/Setup/IndexTest.php@@ -35,35 +35,29 @@ SetupIndex::messagesBegin();- $this->assertEquals(+ self::assertSame([ [ [- [- 0 => 'foo',- 'fresh' => false,- 'active' => false,- ],- [- 0 => 'bar',- 'fresh' => false,- 'active' => false,- ],+ 0 => 'foo',+ 'fresh' => false,+ 'active' => false,+ ],+ [+ 0 => 'bar',+ 'fresh' => false,+ 'active' => false, ], ],- $_SESSION['messages']- );+ ], $_SESSION['messages']); // case 2 unset($_SESSION['messages']); SetupIndex::messagesBegin();- $this->assertEquals(- [- 'error' => [],- 'notice' => [],- ],- $_SESSION['messages']- );+ self::assertSame([+ 'error' => [],+ 'notice' => [],+ ], $_SESSION['messages']); } /**@@ -73,15 +67,12 @@ { SetupIndex::messagesSet('type', '123', 'testTitle', 'msg');- $this->assertEquals(- [- 'fresh' => true,- 'active' => true,- 'title' => 'testTitle',- 'message' => 'msg',- ],- $_SESSION['messages']['type']['123']- );+ self::assertSame([+ 'fresh' => true,+ 'active' => true,+ 'title' => 'testTitle',+ 'message' => 'msg',+ ], $_SESSION['messages']['type']['123']); } /**@@ -104,17 +95,14 @@ SetupIndex::messagesEnd();- $this->assertEquals(+ self::assertEquals([ [- [- '1' => [- 'msg' => 'bar',- 'active' => 1,- ],+ '1' => [+ 'msg' => 'bar',+ 'active' => 1, ], ],- $_SESSION['messages']- );+ ], $_SESSION['messages']); } /**@@ -154,6 +142,6 @@ ], ];- $this->assertEquals($expected, SetupIndex::messagesShowHtml());+ self::assertSame($expected, SetupIndex::messagesShowHtml()); } }
After analyzing the provided code diff, I don't see any security-related fixes. The changes appear to be primarily test code improvements, changing `assertEquals` to `assertSame` and restructuring array assertions for better clarity and strict comparison. Here's the structured response: Vulnerability Existed: no No security vulnerability found File: test/classes/Setup/IndexTest.php The changes are test code improvements without security implications The changes are focused on: 1. Using `assertSame` instead of `assertEquals` for more strict comparisons 2. Simplifying array structures in test assertions 3. Improving code formatting These changes don't address any security vulnerabilities but rather improve test reliability and maintainability.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/test/classes/ImportTest.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/test/classes/ImportTest.php@@ -41,35 +41,35 @@ $maximum_time = 0; $timeout_passed = false;- $this->assertFalse($this->import->checkTimeout());+ self::assertFalse($this->import->checkTimeout()); //Reinit values. $timestamp = time(); $maximum_time = 0; $timeout_passed = true;- $this->assertFalse($this->import->checkTimeout());+ self::assertFalse($this->import->checkTimeout()); //Reinit values. $timestamp = time(); $maximum_time = 30; $timeout_passed = true;- $this->assertTrue($this->import->checkTimeout());+ self::assertTrue($this->import->checkTimeout()); //Reinit values. $timestamp = time() - 15; $maximum_time = 30; $timeout_passed = false;- $this->assertFalse($this->import->checkTimeout());+ self::assertFalse($this->import->checkTimeout()); //Reinit values. $timestamp = time() - 60; $maximum_time = 30; $timeout_passed = false;- $this->assertTrue($this->import->checkTimeout());+ self::assertTrue($this->import->checkTimeout()); } /**@@ -77,61 +77,40 @@ */ public function testLookForUse(): void {- $this->assertEquals(- [- null,- null,- ],- $this->import->lookForUse(null, null, null)- );-- $this->assertEquals(- [- 'myDb',- null,- ],- $this->import->lookForUse(null, 'myDb', null)- );-- $this->assertEquals(- [- 'myDb',- true,- ],- $this->import->lookForUse(null, 'myDb', true)- );-- $this->assertEquals(- [- 'myDb',- true,- ],- $this->import->lookForUse('select 1 from myTable', 'myDb', true)- );-- $this->assertEquals(- [- 'anotherDb',- true,- ],- $this->import->lookForUse('use anotherDb', 'myDb', false)- );-- $this->assertEquals(- [- 'anotherDb',- true,- ],- $this->import->lookForUse('use anotherDb', 'myDb', true)- );-- $this->assertEquals(- [- 'anotherDb',- true,- ],- $this->import->lookForUse('use `anotherDb`;', 'myDb', true)- );+ self::assertSame([+ null,+ null,+ ], $this->import->lookForUse(null, null, null));++ self::assertSame([+ 'myDb',+ null,+ ], $this->import->lookForUse(null, 'myDb', null));++ self::assertSame([+ 'myDb',+ true,+ ], $this->import->lookForUse(null, 'myDb', true));++ self::assertSame([+ 'myDb',+ true,+ ], $this->import->lookForUse('select 1 from myTable', 'myDb', true));++ self::assertSame([+ 'anotherDb',+ true,+ ], $this->import->lookForUse('use anotherDb', 'myDb', false));++ self::assertSame([+ 'anotherDb',+ true,+ ], $this->import->lookForUse('use anotherDb', 'myDb', true));++ self::assertSame([+ 'anotherDb',+ true,+ ], $this->import->lookForUse('use `anotherDb`;', 'myDb', true)); } /**@@ -144,7 +123,7 @@ */ public function testGetColumnAlphaName(string $expected, int $num): void {- $this->assertEquals($expected, $this->import->getColumnAlphaName($num));+ self::assertSame($expected, $this->import->getColumnAlphaName($num)); } /**@@ -152,7 +131,7 @@ * * @return array */- public function provGetColumnAlphaName(): array+ public static function provGetColumnAlphaName(): array { return [ [@@ -192,7 +171,7 @@ */ public function testGetColumnNumberFromName(int $expected, string $name): void {- $this->assertEquals($expected, $this->import->getColumnNumberFromName($name));+ self::assertSame($expected, $this->import->getColumnNumberFromName($name)); } /**@@ -200,7 +179,7 @@ * * @return array */- public function provGetColumnNumberFromName(): array+ public static function provGetColumnNumberFromName(): array { return [ [@@ -240,7 +219,7 @@ */ public function testGetDecimalPrecision(int $expected, string $size): void {- $this->assertEquals($expected, $this->import->getDecimalPrecision($size));+ self::assertSame($expected, $this->import->getDecimalPrecision($size)); } /**@@ -248,7 +227,7 @@ * * @return array */- public function provGetDecimalPrecision(): array+ public static function provGetDecimalPrecision(): array { return [ [@@ -280,7 +259,7 @@ */ public function testGetDecimalScale(int $expected, string $size): void {- $this->assertEquals($expected, $this->import->getDecimalScale($size));+ self::assertSame($expected, $this->import->getDecimalScale($size)); } /**@@ -288,7 +267,7 @@ * * @return array */- public function provGetDecimalScale(): array+ public static function provGetDecimalScale(): array { return [ [@@ -320,7 +299,7 @@ */ public function testGetDecimalSize(array $expected, string $cell): void {- $this->assertEquals($expected, $this->import->getDecimalSize($cell));+ self::assertSame($expected, $this->import->getDecimalSize($cell)); } /**@@ -328,7 +307,7 @@ * * @return array */- public function provGetDecimalSize(): array+ public static function provGetDecimalSize(): array { return [ [@@ -379,7 +358,7 @@ */ public function testDetectType(int $expected, ?int $type, ?string $cell): void {- $this->assertEquals($expected, $this->import->detectType($type, $cell));+ self::assertSame($expected, $this->import->detectType($type, $cell)); } /**@@ -387,7 +366,7 @@ * * @return array */- public function provDetectType(): array+ public static function provDetectType(): array { $data = [ [@@ -485,7 +464,7 @@ $sqlQuery = 'UPDATE `table_1` AS t1, `table_2` t2 SET `table_1`.`id` = `table_2`.`id` WHERE 1';- $this->assertTrue($this->import->checkIfRollbackPossible($sqlQuery));+ self::assertTrue($this->import->checkIfRollbackPossible($sqlQuery)); } /**@@ -493,7 +472,7 @@ * * @return array[] */- public function providerContentWithByteOrderMarks(): array+ public static function providerContentWithByteOrderMarks(): array { return [ [@@ -541,7 +520,7 @@ */ public function testSkipByteOrderMarksFromContents(string $input, string $cleanContents): void {- $this->assertEquals($cleanContents, $this->import->skipByteOrderMarksFromContents($input));+ self::assertSame($cleanContents, $this->import->skipByteOrderMarksFromContents($input)); } /**@@ -557,39 +536,39 @@ $this->import->runQuery($query, $full, $sqlData);- $this->assertSame([], $sqlData);- $this->assertSame([+ self::assertSame([], $sqlData);+ self::assertSame([ 'sql' => 'SELECT 1;', 'full' => 'SELECT 1;', ], $GLOBALS['import_run_buffer']);- $this->assertNull($GLOBALS['sql_query']);- $this->assertNull($GLOBALS['complete_query']);- $this->assertNull($GLOBALS['display_query']);+ self::assertNull($GLOBALS['sql_query']);+ self::assertNull($GLOBALS['complete_query']);+ self::assertNull($GLOBALS['display_query']); $query = 'SELECT 2'; $full = 'SELECT 2'; $this->import->runQuery($query, $full, $sqlData);- $this->assertSame([+ self::assertSame([ 'valid_sql' => ['SELECT 1;'], 'valid_full' => ['SELECT 1;'], 'valid_queries' => 1, ], $sqlData);- $this->assertSame([+ self::assertSame([ 'sql' => 'SELECT 2;', 'full' => 'SELECT 2;', ], $GLOBALS['import_run_buffer']);- $this->assertSame('SELECT 1;', $GLOBALS['sql_query']);- $this->assertSame('SELECT 1;', $GLOBALS['complete_query']);- $this->assertSame('SELECT 1;', $GLOBALS['display_query']);+ self::assertSame('SELECT 1;', $GLOBALS['sql_query']);+ self::assertSame('SELECT 1;', $GLOBALS['complete_query']);+ self::assertSame('SELECT 1;', $GLOBALS['display_query']); $query = ''; $full = ''; $this->import->runQuery($query, $full, $sqlData);- $this->assertSame([+ self::assertSame([ 'valid_sql' => [ 'SELECT 1;', 'SELECT 2;',@@ -601,9 +580,9 @@ 'valid_queries' => 2, ], $sqlData);- $this->assertArrayNotHasKey('import_run_buffer', $GLOBALS);- $this->assertSame('SELECT 2;', $GLOBALS['sql_query']);- $this->assertSame('SELECT 1;SELECT 2;', $GLOBALS['complete_query']);- $this->assertSame('SELECT 1;SELECT 2;', $GLOBALS['display_query']);+ self::assertArrayNotHasKey('import_run_buffer', $GLOBALS);+ self::assertSame('SELECT 2;', $GLOBALS['sql_query']);+ self::assertSame('SELECT 1;SELECT 2;', $GLOBALS['complete_query']);+ self::assertSame('SELECT 1;SELECT 2;', $GLOBALS['display_query']); } }
After analyzing the provided code diff, I can identify that this is primarily a test file modification with no apparent security fixes. The changes are mainly related to test assertions and method visibility changes (from instance methods to static methods in test providers). Here's the analysis: 1. Vulnerability Existed: no No security vulnerability found [File] test/classes/ImportTest.php [Lines] Various [Old Code] Various test assertions using $this->assertEquals() [Fixed Code] Changed to self::assertSame() and self::assertFalse()/self::assertTrue() 2. Vulnerability Existed: no No security vulnerability found [File] test/classes/ImportTest.php [Lines] Various [Old Code] Non-static test provider methods [Fixed Code] Changed test provider methods to static The changes appear to be: 1. Updating test assertions to use more strict comparison (assertSame instead of assertEquals) 2. Making test provider methods static (best practice) 3. Some code formatting improvements in test cases These changes are related to test quality improvements rather than security fixes. No actual security vulnerabilities were addressed in this diff.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/libraries/classes/Controllers/Import/ImportController.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/libraries/classes/Controllers/Import/ImportController.php@@ -530,7 +530,7 @@ // Convert the file's charset if necessary if (Encoding::isSupported() && isset($charset_of_file)) {- if ($charset_of_file !== 'utf-8') {+ if ($charset_of_file !== 'utf-8' && in_array($charset_of_file, Encoding::listEncodings(), true)) { $charset_conversion = true; } } elseif (isset($charset_of_file) && $charset_of_file !== 'utf-8') {
Here's the analysis of the provided code diff: Vulnerability Existed: yes Improper Input Validation [File] libraries/classes/Controllers/Import/ImportController.php [Lines] 530 [Old Code] if ($charset_of_file !== 'utf-8') { [Fixed Code] if ($charset_of_file !== 'utf-8' && in_array($charset_of_file, Encoding::listEncodings(), true)) { Additional Details: The vulnerability appears to be related to improper validation of character encoding input. The original code only checked if the charset wasn't 'utf-8' but didn't verify if the provided charset was actually a valid/supported encoding. The fix adds a check using Encoding::listEncodings() to ensure the charset is valid before proceeding with conversion. This could prevent potential encoding-related security issues or crashes when processing files with unsupported character encodings.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/test/classes/Charsets/CharsetTest.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/test/classes/Charsets/CharsetTest.php@@ -23,10 +23,10 @@ $charset = Charset::fromServer($serverCharset);- $this->assertInstanceOf(Charset::class, $charset);- $this->assertSame('utf8', $charset->getName());- $this->assertSame('utf8_general_ci', $charset->getDefaultCollation());- $this->assertSame('UTF-8 Unicode', $charset->getDescription());- $this->assertSame(3, $charset->getMaxLength());+ self::assertInstanceOf(Charset::class, $charset);+ self::assertSame('utf8', $charset->getName());+ self::assertSame('utf8_general_ci', $charset->getDefaultCollation());+ self::assertSame('UTF-8 Unicode', $charset->getDescription());+ self::assertSame(3, $charset->getMaxLength()); } }
Based on the provided code diff, this appears to be a test file modification where the assertions were updated from `$this->assert...` to `self::assert...`. This change doesn't appear to be related to any security fixes but rather a code style or test framework usage improvement. Here's the analysis following your requested format: Vulnerability Existed: no [No security vulnerability found] [test/classes/Charsets/CharsetTest.php] [Lines 23-27] [Old Code] $this->assertInstanceOf(Charset::class, $charset); $this->assertSame('utf8', $charset->getName()); $this->assertSame('utf8_general_ci', $charset->getDefaultCollation()); $this->assertSame('UTF-8 Unicode', $charset->getDescription()); $this->assertSame(3, $charset->getMaxLength()); [Fixed Code] self::assertInstanceOf(Charset::class, $charset); self::assertSame('utf8', $charset->getName()); self::assertSame('utf8_general_ci', $charset->getDefaultCollation()); self::assertSame('UTF-8 Unicode', $charset->getDescription()); self::assertSame(3, $charset->getMaxLength()); The changes are purely stylistic/structural (changing instance method calls to static calls) and don't indicate any security fixes or vulnerabilities being addressed.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/test/classes/Navigation/Nodes/NodeProcedureContainerTest.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/test/classes/Navigation/Nodes/NodeProcedureContainerTest.php@@ -27,14 +27,11 @@ public function testConstructor(): void { $parent = NodeFactory::getInstance('NodeProcedureContainer');- $this->assertIsArray($parent->links);- $this->assertEquals(- [- 'text' => ['route' => '/database/routines', 'params' => ['type' => 'PROCEDURE', 'db' => null]],- 'icon' => ['route' => '/database/routines', 'params' => ['type' => 'PROCEDURE', 'db' => null]],- ],- $parent->links- );- $this->assertEquals('procedures', $parent->realName);+ self::assertIsArray($parent->links);+ self::assertSame([+ 'text' => ['route' => '/database/routines', 'params' => ['type' => 'PROCEDURE', 'db' => null]],+ 'icon' => ['route' => '/database/routines', 'params' => ['type' => 'PROCEDURE', 'db' => null]],+ ], $parent->links);+ self::assertSame('procedures', $parent->realName); } }
After analyzing the provided code diff, I don't find any security-related changes. The modifications appear to be test code improvements rather than security fixes. Here's the analysis: 1. Vulnerability Existed: no Test Code Improvement [test/classes/Navigation/Nodes/NodeProcedureContainerTest.php] [Lines 27-38] [Old Code] $this->assertIsArray($parent->links); $this->assertEquals( [ 'text' => ['route' => '/database/routines', 'params' => ['type' => 'PROCEDURE', 'db' => null]], 'icon' => ['route' => '/database/routines', 'params' => ['type' => 'PROCEDURE', 'db' => null]], ], $parent->links ); $this->assertEquals('procedures', $parent->realName); [Fixed Code] self::assertIsArray($parent->links); self::assertSame([ 'text' => ['route' => '/database/routines', 'params' => ['type' => 'PROCEDURE', 'db' => null]], 'icon' => ['route' => '/database/routines', 'params' => ['type' => 'PROCEDURE', 'db' => null]], ], $parent->links); self::assertSame('procedures', $parent->realName); The changes are: 1. Changed from $this->assert* to self::assert* (common test framework style change) 2. Changed assertEquals to assertSame (more strict comparison) 3. Formatting changes (array declaration style) No security vulnerabilities were addressed in this diff. The changes are purely related to test code quality and style.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/test/classes/Config/Settings/SchemaTest.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/test/classes/Config/Settings/SchemaTest.php@@ -59,7 +59,7 @@ $settings = new Schema($actualValues); foreach (array_keys($expectedValues) as $key) {- $this->assertSame($expected[$key], $settings->$key);+ self::assertSame($expected[$key], $settings->$key); } }@@ -69,7 +69,7 @@ * @return mixed[][][][] * @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][] */- public function providerForTestConstructor(): array+ public static function providerForTestConstructor(): array { return [ 'null values' => [
Analyzing the provided code diff for security fixes: 1. First Change: Vulnerability Existed: no Test Method Assertion Change [File] [Lines 59-59] [Old Code] $this->assertSame($expected[$key], $settings->$key); [Fixed Code] self::assertSame($expected[$key], $settings->$key); Details: This change simply modifies how the test assertion is called (instance method vs static method call). No security implications. 2. Second Change: Vulnerability Existed: no Test Data Provider Method Change [File] [Lines 69-69] [Old Code] public function providerForTestConstructor(): array [Fixed Code] public static function providerForTestConstructor(): array Details: This changes a test data provider method to be static instead of instance method. This is a test code optimization with no security impact. No security vulnerabilities were found in the provided diff. The changes appear to be test code improvements rather than security fixes.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.
--- /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_1/phpmyadmin-RELEASE_5_2_1/libraries/classes/Plugins/Export/ExportJson.php+++ /root/PatchLeaks-main/products/phpmyadmin_downloads/RELEASE_5_2_2/phpmyadmin-RELEASE_5_2_2/libraries/classes/Plugins/Export/ExportJson.php@@ -224,15 +224,15 @@ /** * Export to JSON *- * @phpstan-param array{- * string: array{- * 'tables': array{- * string: array{- * 'columns': array{string: string}- * }- * }- * }- * }|array|null $aliases+ * @phpstan-param array<+ * string,+ * array{+ * tables: array<+ * string,+ * array{columns: array<string, string>}+ * >+ * }+ * >|null $aliases */ protected function doExportForQuery( DatabaseInterface $dbi,
Based on the provided diff content, I don't see any security fixes - this appears to be purely a documentation/type hinting improvement. Here's the analysis: Vulnerability Existed: no No security vulnerability found [File] libraries/classes/Plugins/Export/ExportJson.php [Lines] 224-238 [Old Code] @phpstan-param array{ string: array{ 'tables': array{ string: array{ 'columns': array{string: string} } } } }|array|null $aliases [Fixed Code] @phpstan-param array< string, array{ tables: array< string, array{columns: array<string, string>} > } >|null $aliases The changes are: 1. Improved PHPStan type hint formatting using angle brackets instead of nested curly braces 2. Made the type definition more precise by removing the alternative `array` type 3. Better formatting for readability These changes don't indicate any security fixes, just documentation improvements for static analysis.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the check tables feature. A crafted table or database name could be used for XSS.
An issue was discovered in phpMyAdmin 5.x before 5.2.2. An XSS vulnerability has been discovered for the Insert tab.