Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check authorization of returned type #2

Closed
joemcbride opened this issue Feb 2, 2018 · 0 comments
Closed

Check authorization of returned type #2

joemcbride opened this issue Feb 2, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@joemcbride
Copy link
Member

At present the validation rule doesn’t check the returned GraphType of the Field that is being request, only that the current Field itself is allowed. The returned GraphType may have different authorization policies applied to it.

CheckAuth(fieldAst, fieldDef, userContext, context, operationType);

I believe the fix is to add this additional line:

CheckAuth(fieldAst, fieldDef.ResolvedType, userContext, context, operationType); 

See graphql-dotnet/graphql-dotnet#502 (comment)

@joemcbride joemcbride added the bug Something isn't working label Feb 2, 2018
joemcbride added a commit that referenced this issue Jun 12, 2018
joemcbride added a commit that referenced this issue Jun 12, 2018
joemcbride added a commit that referenced this issue Jun 12, 2018
* Check ResolvedType for authorization policies

Fixes #2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant