We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd47385 commit a88d302Copy full SHA for a88d302
src/main/java/de/codeshield/log4jshell/Log4JProcessDetector.java
@@ -34,8 +34,14 @@ public static void main(String[] args) throws IOException {
34
// analyze each output
35
// search for the "-classpath" parameter
36
for (String outputLine : lines) {
37
- final String searchStr = "-classpath";
38
- final int i = StringUtils.indexOf(outputLine, searchStr);
+ String searchStr = "-classpath";
+ int i = StringUtils.indexOf(outputLine, searchStr);
39
+ if (i == -1) {
40
+ // check if someone used -cp
41
+ searchStr = "-cp";
42
+ i = StringUtils.indexOf(outputLine, searchStr);
43
+ }
44
+
45
if (i > 0) {
46
String cpArgs = outputLine.substring(i + searchStr.length() + 1);
47
0 commit comments