You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by GitBox <gi...@apache.org> on 2022/10/13 07:18:51 UTC
[GitHub] [incubator-linkis] Alexkun commented on a diff in pull request #3631: fix sql-injection risk in linkis-data-source-manager and linkis-metadataquery
Alexkun commented on code in PR #3631:
URL: https://github.com/apache/incubator-linkis/pull/3631#discussion_r994248800
##########
linkis-public-enhancements/linkis-datasource/linkis-metadata-query/server/src/main/java/org/apache/linkis/metadata/query/server/restful/MetadataCoreRestful.java:
##########
@@ -57,6 +59,10 @@ public Message getDatabases(
if (StringUtils.isBlank(system)) {
return Message.error("'system' is missing[缺少系统名]");
}
+ if (!MetadataUtils.nameRegexPattern.matcher(dataSourceId).matches()) {
+ return Message.error("'dataSourceId' is irregular[数据源错误]");
Review Comment:
use 'invalid' instead of 'irregular'
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org