mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-20 14:54:31 +01:00
Added warning about forcing untrusted contributions
This commit is contained in:
parent
94dd695355
commit
842c35be3e
@ -86,8 +86,12 @@ public class ContributionsIndexer {
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user