sergehuber commented on code in PR #760:
URL: https://github.com/apache/unomi/pull/760#discussion_r3362974908
##########
graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/servlet/auth/GraphQLServletSecurityValidator.java:
##########
@@ -74,6 +96,10 @@ public boolean validate(String query, String operationName,
HttpServletRequest r
}
private boolean isPublicOperation(String query) {
+ if (query == null) {
+ return false;
+ }
+
final Document queryDoc = parser.parseDocument(query);
final Definition<?> def = queryDoc.getDefinitions().get(0);
Review Comment:
Fixed in commit 9eefd885: GraphQLServletSecurityValidator now guards against
an empty definitions list before accessing index 0, returning false for
malformed/empty documents rather than throwing.
--
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]