37136861df
Fixes CVE-2022-23181
25 lines
1.6 KiB
Diff
25 lines
1.6 KiB
Diff
diff -up ./java/org/apache/jasper/compiler/JDTCompiler.java ./java/org/apache/jasper/compiler/JDTCompiler.java
|
|
index 2e361f2..277d8f4 100644
|
|
--- java/org/apache/jasper/compiler/JDTCompiler.java
|
|
+++ java/org/apache/jasper/compiler/JDTCompiler.java
|
|
@@ -310,7 +310,7 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
|
|
} else if(opt.equals("15")) {
|
|
settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_15);
|
|
} else if(opt.equals("16")) {
|
|
- settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_16);
|
|
+ settings.put(CompilerOptions.OPTION_Source, "16");
|
|
} else if(opt.equals("17")) {
|
|
// Constant not available in latest ECJ version that runs on
|
|
// Java 8.
|
|
@@ -377,8 +377,8 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
|
|
settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_15);
|
|
settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_15);
|
|
} else if(opt.equals("16")) {
|
|
- settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_16);
|
|
- settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_16);
|
|
+ settings.put(CompilerOptions.OPTION_TargetPlatform, "16");
|
|
+ settings.put(CompilerOptions.OPTION_Compliance, "16");
|
|
} else if(opt.equals("17")) {
|
|
// Constant not available in latest ECJ version that runs on
|
|
// Java 8.
|