mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
fix:【漏洞】修复 H2 JDBC RCE Bypass
This commit is contained in:
@@ -9,6 +9,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@@ -18,7 +19,7 @@ public class H2 extends DatasourceConfiguration {
|
||||
|
||||
public String getJdbc() {
|
||||
for (String illegalParameter : getH2IllegalParameters()) {
|
||||
if (jdbc.toUpperCase().replace("\\", "").contains(illegalParameter)) {
|
||||
if (jdbc.toUpperCase(Locale.ENGLISH).replace("\\", "").contains(illegalParameter)) {
|
||||
DEException.throwException("Has illegal parameter: " + jdbc);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user