mirror of
https://github.com/dataease/dataease.git
synced 2026-06-12 16:31:11 +08:00
fix: 【漏洞】CalciteProvider.java SQL注入漏洞
This commit is contained in:
@@ -840,6 +840,8 @@ public class DatasourceServer implements DatasourceApi {
|
||||
public List<TableField> getTableField(Map<String, String> req) throws DEException {
|
||||
String tableName = req.get("tableName");
|
||||
String datasourceId = req.get("datasourceId");
|
||||
// check table name
|
||||
datasetCacheManage.validateTable(Long.valueOf(datasourceId), tableName);
|
||||
DatasetTableDTO datasetTableDTO = new DatasetTableDTO();
|
||||
datasetTableDTO.setDatasourceId(Long.valueOf(datasourceId));
|
||||
if (!getTables(datasetTableDTO).stream().map(DatasetTableDTO::getTableName).collect(Collectors.toList()).contains(tableName)) {
|
||||
|
||||
Reference in New Issue
Block a user