Adjust exception message
parent
b59489f6ae
commit
211b69b38b
|
@ -468,8 +468,8 @@ class ComposerRepository extends ArrayRepository implements StreamableRepository
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->io->write('<warning>The contents of '.$filename.' do not match its signature, this is most likely due to a temporary glitch but could indicate a man-in-the-middle attack. Try running composer again and please report it if it still persists.</warning>');
|
// TODO use scarier wording once we know for sure it doesn't do false positives anymore
|
||||||
throw new RepositorySecurityException('The contents of '.$filename.' do not match its signature');
|
throw new RepositorySecurityException('The contents of '.$filename.' do not match its signature. This should indicate a man-in-the-middle attack. Try running composer again and report this if you think it is a mistake.');
|
||||||
}
|
}
|
||||||
$data = JsonFile::parseJson($json, $filename);
|
$data = JsonFile::parseJson($json, $filename);
|
||||||
$this->cache->write($cacheKey, $json);
|
$this->cache->write($cacheKey, $json);
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of Composer.
|
* This file is part of Composer.
|
||||||
*
|
*
|
||||||
* (c)
|
* (c) Nils Adermann <naderman@naderman.de>
|
||||||
|
* Jordi Boggiano <j.boggiano@seld.be>
|
||||||
*
|
*
|
||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
|
@ -18,5 +19,4 @@ namespace Composer\Repository;
|
||||||
*/
|
*/
|
||||||
class RepositorySecurityException extends \Exception
|
class RepositorySecurityException extends \Exception
|
||||||
{
|
{
|
||||||
// nothing more, standard Exception
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue