GraphQL failed-request events use the server's error message, which can contain variable values
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
Línea de trabajo
Start with src/Sentry/SentryGraphQLHttpFailedRequestHandler.cs, especially errorsElement[0].GetProperty("message") in DoEnsureSuccessfulResponse, and compare the three options described in the issue with sentry-java's behavior. Decide how the message should avoid exposing variable values while accounting for the IncomingResponseBody setting and title changes; done means the chosen behavior is implemented and covered by tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
SentryGraphQLHttpFailedRequestHandler uses the server's errors[0].message as the exception message. Many GraphQL servers include the values of bad variables in that message, for example graphql-js's Variable "$id" got invalid value .... No DataCollection option covers the message, so variable values can reach Sentry even with DataCollection.GraphQL.Variables = false or SendDefaultPii = false.
This isn't a regression. The handler has always done this, and #5934 keeps it. It came up in the automated review of #5934.
sentry-java doesn't have this problem. Its Apollo interceptors build the message from the operation (GraphQL Request failed, name: ..., type: ...), and the server's response is attached only as the response body, gated by httpBodies.incomingResponse.
Options
Each of these changes what users see, which is why none of them is in #5934:
- Remove the echoed variable values from the message. Not reliable: the message is free text from the server, and a short value such as
1would match unrelated text. - Use the server's message only when
IncomingResponseBodyis on. The message is part of the response body, so this is arguably the right gate. But withoutConfigureDataCollectionthat gate followsSendDefaultPii, so users with it off would get a generic message instead of the one they get today. - Build the message as sentry-java does, from the operation name and type. This changes the message for everyone.
The message becomes the issue title in Sentry, so the last two options change titles. Grouping wouldn't change when the request body can be read, since the fingerprint is the operation name, operation type and status code.
Where
src/Sentry/SentryGraphQLHttpFailedRequestHandler.cs:errorsElement[0].GetProperty("message")inDoEnsureSuccessfulResponse.
Related: #5420, #5432
- Lenguaje dominante
- C#
- Estrellas
- 775
- Forks
- 262
- Merge medio
- 1 d 16 h
- PR fusionados (30 d)
- 118
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de getsentry/sentry-dotnet
-
chore: remove stale IL3050/IL3053 workaround from the iOS samplePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. AbiertoState: Needs Discussion
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
getsentry/sentry-dotnet#6071 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Heap dumps: every SDK shutdown logs "Error waiting for GarbageCollectionMonitor task to complete"Posiblemente ocupada @pcbeingused33 la tomó hoy. AbiertoState: Needs Discussion
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
getsentry/sentry-dotnet#6039 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
.NET Platform: Android Task
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
getsentry/sentry-dotnet#6020 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Move the Blazor WebAssembly sample off the deprecated DevServerPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto.NET Framework: Blazor
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
getsentry/sentry-dotnet#5906 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Docs MSBuild Needs Docs Update
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
getsentry/sentry-dotnet#5691 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de getsentry/sentry-dotnet
Issues similares
-
In-car displays show 0 km/h and P while the AV drivesPosiblemente ocupada @bazilinskyy la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
bazilinskyy/coupled-sim#366 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
BaryoDev/umbraco-pwa#196 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
microsoft/fluentui-blazor#5688 ·
Los mantenedores suelen responder en 1 día
-
bug flaky lsp-transport small
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día