imbajin commented on code in PR #2987:
URL: https://github.com/apache/hugegraph/pull/2987#discussion_r3062128820


##########
hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinQueryAPI.java:
##########
@@ -43,7 +43,8 @@ public class GremlinQueryAPI extends API {
             "java.util.concurrent.TimeoutException",
             "groovy.lang.",
             "org.codehaus.",
-            "org.apache.hugegraph."
+            "org.apache.hugegraph.",
+            "org.apache.tinkerpop."

Review Comment:
   ‼️ This package-wide allowlist is too broad. `matchBadRequestException()` 
would now classify classes such as 
`org.apache.tinkerpop.gremlin.server.auth.AuthenticationException` and 
`org.apache.tinkerpop.gremlin.server.authz.AuthorizationException` as 400, even 
though they carry 401/403 semantics. 
   
   That changes the API contract for auth failures and hides 
security/server-side errors behind a generic bad request. Please whitelist only 
the concrete exception class(es) reproduced by #2986 instead of the whole 
`org.apache.tinkerpop.` namespace.



-- 
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