Merge pull request #5631 from dataease/pr@dev@fixdatasource

fix: 校验数据库名称
This commit is contained in:
taojinlong 2023-07-12 10:15:15 +08:00 committed by GitHub
commit f7f411a183
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -796,7 +796,7 @@ public class JdbcProvider extends DefaultJdbcProvider {
break;
case sqlServer:
SqlServerConfiguration sqlServerConfiguration = new Gson().fromJson(datasource.getConfiguration(), SqlServerConfiguration.class);
if(!sqlServerConfiguration.getDataBase().matches("^[0-9a-zA-Z_-]{1,}$")){
if(!sqlServerConfiguration.getDataBase().matches("^[0-9a-zA-Z_.-]{1,}$")){
throw new Exception("Invalid database name");
}
break;