Fix missing validation of local auth file before loading it

main
Jordi Boggiano 2 years ago
parent b8b84c2c35
commit 732bdbde4b
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -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));
}

Loading…
Cancel
Save