Skip to content

Security issue - context should be copied for each request #8

Closed
@dpnova

Description

@dpnova

https://github.com/graphql-python/sanic-graphql/blob/master/sanic_graphql/graphqlview.py#L51

If you set context in the View ctor a class level attribute gets set. This is fine, except the first request is put into the object and never overwritten later. This ends up serving the first request object in the context of all subsequent requests.

I'm going to patch now. Just thought I'd drop this here to see if anyone has a good reason for request to not be overwritten in context every request. Or more appropriately, for the provided context to be copied each request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions