zachjsh commented on code in PR #16141:
URL: https://github.com/apache/druid/pull/16141#discussion_r1529015194


##########
server/src/main/java/org/apache/druid/metadata/SqlSegmentsMetadataQuery.java:
##########
@@ -834,6 +869,20 @@ private static int computeNumChangedSegments(List<String> 
segmentIds, int[] segm
     return numChangedSegments;
   }
 
+  private static String getConditionForVersions(
+      final List<String> versions
+  )
+  {
+    if (CollectionUtils.isNullOrEmpty(versions)) {
+      return "";
+    }
+
+    final String versionsCsv = versions.stream()
+                                       .map(version -> "'" + version + "'")
+                                       .collect(Collectors.joining(","));
+    return StringUtils.format(" AND version IN (%s)", versionsCsv);

Review Comment:
   Are the versions validated in anyway? Can an attacker construct a versions 
payload which allows for sort of injection, or what would protect against this?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to