[
https://issues.apache.org/jira/browse/TINKERPOP-3081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17851895#comment-17851895
]
ASF GitHub Bot commented on TINKERPOP-3081:
-------------------------------------------
kenhuuu commented on code in PR #2622:
URL: https://github.com/apache/tinkerpop/pull/2622#discussion_r1625347826
##########
gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WebSocketAuthorizationHandler.java:
##########
@@ -68,11 +68,19 @@ public void channelRead(final ChannelHandlerContext ctx,
final Object msg) {
final Bytecode bytecode = (Bytecode)
requestMessage.getArgs().get(Tokens.ARGS_GREMLIN);
final Map<String, String> aliases = (Map<String,
String>) requestMessage.getArgs().get(Tokens.ARGS_ALIASES);
final Bytecode restrictedBytecode =
authorizer.authorize(user, bytecode, aliases);
- final RequestMessage restrictedMsg =
RequestMessage.build(Tokens.OPS_BYTECODE).
+ final RequestMessage.Builder restrictedMsgBuilder =
RequestMessage.build(Tokens.OPS_BYTECODE).
Review Comment:
I think you could clean this up a little by using the from()
(https://github.com/apache/tinkerpop/blob/3.6-dev/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/RequestMessage.java#L107)
to make a copy of the old RequestMessage and then just override the
ARGS_GREMLIN with restrictedBytecode.
> When using authentication, evaluationTimeout is ignored
> -------------------------------------------------------
>
> Key: TINKERPOP-3081
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3081
> Project: TinkerPop
> Issue Type: Bug
> Reporter: Lyndon Bauto
> Assignee: Lyndon Bauto
> Priority: Major
>
> Using g.with("evaluationTimeout").<whatever> ignored evaluationTimeout when
> authentication is enabled.
>
> Relevant discord thread:
> https://discord.com/channels/838910279550238720/1245462911728615629/1245462911728615629
--
This message was sent by Atlassian Jira
(v8.20.10#820010)