Skip to content

Bump gqlparser dependency for ErrorPosf() fix #7699

@robmyersrobmyers

Description

@robmyersrobmyers

Description

From vektah/gqlparser#375

Open Policy Agent implements a pruneIrrelevantGraphQLASTNodes() func that removes position information from the GraphQL AST.

This causes issues on the ErrorPosf() path because that function assumes that the pos *ast.Position argument will not be nil.

The result is that it is easy to crash Open Policy Agent with bad input as you can see in this playground that results in runtime error: invalid memory address or nil pointer dereference.

Impacts:

  • OPA v1.5.1

Expected behavior

OPA doesn't crash when passed broken GraphQL schemas.

Additional context

I will submit a pull request with a test case for this that will fail until upstream merges a fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions