Skip to content

Conversation

@Shane32
Copy link
Member

@Shane32 Shane32 commented Jan 10, 2023

This targets bump but once PR #254 is merged, I can update it to target master. Or it can be merged into bump.

This fixes the security flaw where nested fragments are not processed for authentication when there are multiple operations in the document.

It should also run faster than the previous implementation, and reduces the complexity of the implementation.

@Shane32 Shane32 requested a review from sungam3r January 10, 2023 19:35
@Shane32 Shane32 self-assigned this Jan 10, 2023
@Shane32 Shane32 changed the base branch from master to bump January 10, 2023 19:35
@github-actions github-actions bot added documentation test Pull request that adds new or changes existing tests labels Jan 10, 2023
Comment on lines +51 to +52
if ((node is GraphQLOperationDefinition astType && astType == context.Operation) ||
(node is GraphQLFragmentDefinition fragment && (context.GetRecursivelyReferencedFragments(context.Operation)?.Contains(fragment) ?? false)))

Check notice

Code scanning / CodeQL

Complex condition

Complex condition: too many logical operations in this expression.
@Shane32 Shane32 changed the title Fix security flaw Fix security flaw with nested fragments Jan 10, 2023
@sungam3r
Copy link
Member

Looks like a huge simplification.

@Shane32
Copy link
Member Author

Shane32 commented Jan 10, 2023

@sungam3r merge here or merge your pr - either way. I will be busy until late tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation test Pull request that adds new or changes existing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants