mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-22 12:11:55 +00:00
GP-3852: Preventing installation of extension source directories
This commit is contained in:
parent
0f34531943
commit
0f7300aac0
@ -513,9 +513,13 @@ public class ExtensionUtils {
|
||||
}
|
||||
|
||||
if (file.isDirectory() && file.canRead()) {
|
||||
File[] files = file.listFiles(f -> f.getName().equals(PROPERTIES_FILE_NAME));
|
||||
if (files != null && files.length == 1) {
|
||||
return tryToLoadExtensionFromProperties(files[0]);
|
||||
File propertyFile = new File(file, PROPERTIES_FILE_NAME);
|
||||
if (propertyFile.isFile()) {
|
||||
if (new File(file, "build.gradle").isFile()) {
|
||||
log.error("Extension source directories are not valid extensions");
|
||||
return null;
|
||||
}
|
||||
return tryToLoadExtensionFromProperties(propertyFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user