1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 08:32:56 +00:00

Merge pull request from GHSA-7c6p-848j-wh5h

* Fix usage of possibly compromised installed.php/InstalledVersions.php at runtime, refs GHSA-7c6p-848j-wh5h

* Fix InstalledVersionsTest regression
This commit is contained in:
Jordi Boggiano 2024-02-08 14:33:59 +01:00 committed by GitHub
parent 7442981364
commit 64e4eb356b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 237 additions and 44 deletions

View file

@ -49,7 +49,7 @@ class InstalledVersionsTest extends TestCase
$this->root = self::getUniqueTmpDirectory();
$dir = $this->root;
InstalledVersions::reload(require __DIR__.'/Repository/Fixtures/installed.php');
InstalledVersions::reload(require __DIR__.'/Repository/Fixtures/installed_relative.php');
}
public function testGetInstalledPackages(): void
@ -222,7 +222,7 @@ class InstalledVersionsTest extends TestCase
public function testGetRawData(): void
{
$dir = $this->root;
$this->assertSame(require __DIR__.'/Repository/Fixtures/installed.php', InstalledVersions::getRawData());
$this->assertSame(require __DIR__.'/Repository/Fixtures/installed_relative.php', InstalledVersions::getRawData());
}
/**