Skip to content

Commit 842c35b

Browse files
committed
Added warning about forcing untrusted contributions
1 parent 94dd695 commit 842c35b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,12 @@ public void parseIndex() throws Exception {
8686
File defaultIndexFile = getIndexFile(Constants.DEFAULT_INDEX_FILE_NAME);
8787
if (defaultIndexFile.exists()) {
8888
// Check main index signature
89-
if (!PreferencesData.areInsecurePackagesAllowed() && !signatureVerifier.isSigned(defaultIndexFile)) {
90-
throw new SignatureVerificationFailedException(Constants.DEFAULT_INDEX_FILE_NAME);
89+
if (!signatureVerifier.isSigned(defaultIndexFile)) {
90+
if (PreferencesData.areInsecurePackagesAllowed()) {
91+
System.err.println(format(tr("Warning: forced trusting untrusted contributions")));
92+
} else {
93+
throw new SignatureVerificationFailedException(Constants.DEFAULT_INDEX_FILE_NAME);
94+
}
9195
}
9296

9397
mergeContributions(defaultIndexFile);

0 commit comments

Comments
 (0)