frankgh commented on code in PR #348:
URL: https://github.com/apache/cassandra-sidecar/pull/348#discussion_r3247459878
##########
server/src/main/java/org/apache/cassandra/sidecar/handlers/snapshots/ListSnapshotHandler.java:
##########
@@ -173,7 +173,7 @@ protected SnapshotRequestParam
extractParamsOrThrow(RoutingContext context)
return SnapshotRequestParam.builder()
.qualifiedTableName(qualifiedTableName(context))
- .snapshotName(context.pathParam("snapshot"))
+
.snapshotName(validator.validateSnapshotName(context.pathParam("snapshot")))
Review Comment:
I realized this might not be a real issue because we can't have `/` or `\0`
(null character) in the path parameter. I tried coming up with a test, but the
request fails before reaching the snapshot handler with a 404 (because the
route is incorrect). I think we should still do the validation here in case in
the future the snapshot name validation changes.
--
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]