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

Shouldn't it hide more information by default? #716

Open
Minishlink opened this issue Oct 9, 2024 · 1 comment · May be fixed by #717
Open

Shouldn't it hide more information by default? #716

Minishlink opened this issue Oct 9, 2024 · 1 comment · May be fixed by #717
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Minishlink
Copy link

Minishlink commented Oct 9, 2024

Hello,

When a query reaches the max cost / max depth, etc, currently graphql-armor throws with a current cost / depth and the limit

Query Cost limit of X exceeded, found Y.

It might be better if by default it just said Query Cost limit exceeded (or better a more generic message by default like Query validation error or something specified by the user). An attacker may still find the limit by trial and error, but it will take him some time, especially if one tweaks the cost parameters from the defaults.
graphql-armor would provide an option "exposeLimits" that could be used if developers want, for example in a local setup.

What do you think about this?

Current workaround is to reformat the error afterwards, but it is a bit dicey

@nullswan
Copy link
Member

nullswan commented Oct 9, 2024

Hi @Minishlink,

Thank you for your suggestion.

We agree that implementing a more generic error message and adding an exposeLimits option would improve graphql-armor's flexibility and security.

In case someone wants to propose these changes, we'll accept and merge these changes as soon as they are ready.

@nullswan nullswan added enhancement New feature or request good first issue Good for newcomers labels Oct 9, 2024
@nullswan nullswan linked a pull request Oct 11, 2024 that will close this issue
@nullswan nullswan linked a pull request Oct 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants