1
0
Fork 0

Adjust exception message

pull/1609/head
Jordi Boggiano 2013-02-21 17:07:53 +01:00
parent b59489f6ae
commit 211b69b38b
2 changed files with 4 additions and 4 deletions

View File

@ -468,8 +468,8 @@ class ComposerRepository extends ArrayRepository implements StreamableRepository
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>');
throw new RepositorySecurityException('The contents of '.$filename.' do not match its signature');
// 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. 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);
$this->cache->write($cacheKey, $json);

View File

@ -3,7 +3,8 @@
/*
* 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
* file that was distributed with this source code.
@ -18,5 +19,4 @@ namespace Composer\Repository;
*/
class RepositorySecurityException extends \Exception
{
// nothing more, standard Exception
}