forked from github/dataease
fix: 校验数据库名称
This commit is contained in:
parent
213b2b4d71
commit
00a3da756e
@ -781,7 +781,7 @@ public class JdbcProvider extends DefaultJdbcProvider {
|
||||
case StarRocks:
|
||||
MysqlConfiguration mysqlConfiguration = new Gson().fromJson(datasource.getConfiguration(), MysqlConfiguration.class);
|
||||
mysqlConfiguration.getJdbc();
|
||||
if(!mysqlConfiguration.getDataBase().matches("^[0-9a-zA-Z_]{1,}$")){
|
||||
if(!mysqlConfiguration.getDataBase().matches("^[0-9a-zA-Z_-]{1,}$")){
|
||||
throw new Exception("Invalid database name");
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user