mirror of
https://github.com/dataease/dataease.git
synced 2026-05-20 19:48:18 +08:00
fix: 限制 mysql 非法参数
This commit is contained in:
@@ -20,6 +20,11 @@ public class Mysql extends DatasourceConfiguration {
|
||||
|
||||
public String getJdbc() {
|
||||
if(StringUtils.isNoneEmpty(getUrlType()) && !getUrlType().equalsIgnoreCase("hostName")){
|
||||
for (String illegalParameter : illegalParameters) {
|
||||
if (getJdbcUrl().toLowerCase().contains(illegalParameter.toLowerCase()) || URLDecoder.decode(getExtraParams()).contains(illegalParameter.toLowerCase())) {
|
||||
DEException.throwException("Illegal parameter: " + illegalParameter);
|
||||
}
|
||||
}
|
||||
return getJdbcUrl();
|
||||
}
|
||||
if (StringUtils.isEmpty(extraParams.trim())) {
|
||||
|
||||
Reference in New Issue
Block a user