mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2026-09-16 18:12:54 +00:00
[ACS-11995] fix codeql path and command injection (#1292)
This commit is contained in:
+4
@@ -120,6 +120,10 @@ public abstract class AbstractMetadataExtractsIT
|
||||
|
||||
private Map<String, Serializable> readExpectedMetadata(String filename, File actualMetadataFile) throws IOException
|
||||
{
|
||||
if (filename.contains("..") || filename.contains("/") || filename.contains("\\"))
|
||||
{
|
||||
throw new IllegalArgumentException("Invalid expected metadata filename: " + filename);
|
||||
}
|
||||
try (InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(filename))
|
||||
{
|
||||
if (inputStream == null)
|
||||
|
||||
Reference in New Issue
Block a user