1
0
Fork 0

Fix missing validation of local auth file before loading it

pull/10757/head
Jordi Boggiano 2022-04-28 21:21:20 +02:00
parent b8b84c2c35
commit 732bdbde4b
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 1 additions and 0 deletions

View File

@ -331,6 +331,7 @@ class Factory
$localAuthFile = new JsonFile(dirname(realpath($composerFile)) . '/auth.json', null, $io);
if ($localAuthFile->exists()) {
$io->writeError('Loading config file ' . $localAuthFile->getPath(), true, IOInterface::DEBUG);
self::validateJsonSchema($io, $localAuthFile, JsonFile::AUTH_SCHEMA);
$config->merge(array('config' => $localAuthFile->read()), $localAuthFile->getPath());
$config->setAuthConfigSource(new JsonConfigSource($localAuthFile, true));
}