Skip to content

RootQuery to ContentNode connection returns posts it shouldn't #1679

@jasonbahl

Description

@jasonbahl

The RootQueryToContentNode connection is returning posts of post_types that are not public.

For example, with the WPGatsby plugin active, the following query from a public user:

{
  contentNodes {
    nodes {
      __typename
    }
  }
}

Is returning nodes of the ActionMonitor Type, a non-public post_type.

The Model Layer for SURE needs to be fixed to ensure non-public posts are not being returned, even if an underlying query asks for them.

We should also optimize the connection queries to only ask for things we know the user can ask for.

Some context that might be helpful to resolving this:

Metadata

Metadata

Assignees

Labels

component: model layerRelating to the Model Layerhas: workaroundA temporary workaround has been providedneeds: discussionRequires a discussion to proceedobject type: postRelating to the Post Object Typesscope: securitySecuring against vulnerabilities and threatsstale?May need to be revalidated due to prolonged inactivitytype: bugIssue that causes incorrect or unexpected behavior

Type

Projects

Status

💬 In Discussion

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions