ChilliCream / ChilliCream/graphql-platform
Don't return server-oriented, implementation-leaking error messages for client errors
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 5.8k
- Forks
- 810
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 98
Description
Product
Hot Chocolate
Is your feature request related to a problem?
Consider for example this error:
Any client can trivially produce this error by e.g. supplying an invalid value for a GUID field, which results in this message:
"Unable to convert the value of the argument
idtoSystem.Guid. Check if the requested type is correct or register a custom type converter."
There are two problems with this:
- The message, with its mention of registering custom type converters, is oriented toward the server's developers, not clients
- The message, in printing the fully qualified type name, leaks implementation details. With custom types here, an attacker could get some information about the structure of the codebase, possibly making inferences allowing them to more effectively hack the system.
The solution you'd like
Messages that are oriented toward API clients and which do not leak implementation details.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the conversion error resource linked in src/HotChocolate/Core/src/Execution/Properties/Resources.resx, around line 202, and trace where it is used for invalid GUID arguments. Review the related client-visible error handling and define the wording so it is client-oriented without exposing fully qualified implementation types or server customization guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100