Skip to content

Commit

Permalink
Added warning about forcing untrusted contributions
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Aug 20, 2019
1 parent 94dd695 commit 842c35b
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,12 @@ public void parseIndex() throws Exception {
File defaultIndexFile = getIndexFile(Constants.DEFAULT_INDEX_FILE_NAME);
if (defaultIndexFile.exists()) {
// Check main index signature
if (!PreferencesData.areInsecurePackagesAllowed() && !signatureVerifier.isSigned(defaultIndexFile)) {
throw new SignatureVerificationFailedException(Constants.DEFAULT_INDEX_FILE_NAME);
if (!signatureVerifier.isSigned(defaultIndexFile)) {
if (PreferencesData.areInsecurePackagesAllowed()) {
System.err.println(format(tr("Warning: forced trusting untrusted contributions")));
} else {
throw new SignatureVerificationFailedException(Constants.DEFAULT_INDEX_FILE_NAME);
}
}

mergeContributions(defaultIndexFile);
Expand Down

0 comments on commit 842c35b

Please sign in to comment.