doomiwork 3.7.2 → 3.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/controller.js +4 -4
- package/package.json +1 -1
- package/utilities/requestparser.js +5 -5
package/core/controller.js
CHANGED
|
@@ -80,10 +80,10 @@ class controller {
|
|
|
80
80
|
result = await instance.afterCRUD(result,actionType,datakey,url,req,res)
|
|
81
81
|
|
|
82
82
|
//CJJ add
|
|
83
|
-
if (req.query.exportexcel === 'true' && result.buffer && result.successed) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
83
|
+
// if (req.query.exportexcel === 'true' && result.buffer && result.successed) {
|
|
84
|
+
// res.attachment('export.xlsx');
|
|
85
|
+
// return res.end(result.buffer);
|
|
86
|
+
// }
|
|
87
87
|
return res.json(result)
|
|
88
88
|
})
|
|
89
89
|
}
|
package/package.json
CHANGED
|
@@ -66,7 +66,7 @@ class RequestParser {
|
|
|
66
66
|
keyValue = '1=0'
|
|
67
67
|
}
|
|
68
68
|
} else { ////数组形式的参数,目前框架不支持,统一认为为sql注入攻击,全部忽略
|
|
69
|
-
console.log(`参数非法==>类型${typeof (keyValue)}:${matchValue} = ${keyValue}`)
|
|
69
|
+
// console.log(`参数非法==>类型${typeof (keyValue)}:${matchValue} = ${keyValue}`)
|
|
70
70
|
parseKeyWordIsNull = true;
|
|
71
71
|
keyValue = ''
|
|
72
72
|
}
|
|
@@ -161,10 +161,10 @@ class RequestParser {
|
|
|
161
161
|
req.footerMapping = req.dataConfig.list.footer;
|
|
162
162
|
/**解析查询条件 */
|
|
163
163
|
req.searchCondition = this.getSearchCondition({ request: req, refer: req.dataConfig.list.search });
|
|
164
|
-
/**排序方式 *///
|
|
165
|
-
req.sort = req.dataConfig.list.sort;
|
|
166
|
-
/**来自req请求参数中的过滤条件 */
|
|
167
|
-
let clientFilter =
|
|
164
|
+
/**排序方式 *///
|
|
165
|
+
req.sort = req.sort || req.dataConfig.list.sort;
|
|
166
|
+
/**来自req请求参数中的过滤条件 */
|
|
167
|
+
let clientFilter = this.checkSqlInjection(this.parseAndReplaceSql(req,req.query.clientFilter),false);
|
|
168
168
|
|
|
169
169
|
let listsql = '';
|
|
170
170
|
///是否有列表尾部的统计SQL
|