You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/06/30 17:25:10 UTC

[jira] [Commented] (TINKERPOP-1354) Include all static enum imports in request validation for bindings

    [ https://issues.apache.org/jira/browse/TINKERPOP-1354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15357505#comment-15357505 ] 

ASF GitHub Bot commented on TINKERPOP-1354:
-------------------------------------------

GitHub user spmallette opened a pull request:

    https://github.com/apache/tinkerpop/pull/354

    TINKERPOP-1354 Added more invalid binding keys to Gremlin Server validation

    https://issues.apache.org/jira/browse/TINKERPOP-1354
    
    These "invalid" keys are reserved terms for Gremlin Server as they are statically imported enums and shouldn't be used as binding keys. You get some less than easy to understand error messages if those keys are used. 
    
    I would have CTR'd but wanted to see if anyone had other suggestions for additional validations at play. Also, this change is "breaking" in the sense that users who were somehow successfully using some of these newly reserved keys on previous versions (not fully sure if that was even possible) will have to update their code. I don't think this is a massive problem for someone to fix, so while "breaking" it doesn't seem massively detrimental and shouldn't be widely problematic.
    
    Builds with `mvn clean install -DskipTests && mvn verify -pl gremlin-server -DskipIntegrationTests=false`
    
    VOTE +1

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-1354

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/354.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #354
    
----
commit c37c3016bd05b3caeb09084f5469c606c439bfe5
Author: Stephen Mallette <sp...@genoprime.com>
Date:   2016-06-30T17:07:44Z

    Added more invalid binding keys to Gremlin Server OpProcessor validation.
    
    These "invalid" keys are reserved terms for Gremlin Server as they are statically imported enums and shouldn't be used as binding keys. You get some less than easy to understand error messages if those keys are used.

----


> Include all static enum imports in request validation for bindings
> ------------------------------------------------------------------
>
>                 Key: TINKERPOP-1354
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1354
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.1.2-incubating
>            Reporter: stephen mallette
>            Assignee: stephen mallette
>            Priority: Minor
>              Labels: breaking
>             Fix For: 3.1.3, 3.2.1
>
>
> Gremlin Server validates the bindings of incoming requests and returns an error for any reserved terms. The list of reserved terms only includes {{T}} but should also include others like {{Order}} and {{Scope}} so that users don't inadvertently override them with a request binding. When that happens Gremlin Server throws a not so easy to understand error.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)