GraphQL failed-request events use the server's error message, which can contain variable values
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- C#
- Star
- 775
- Fork
- 262
- Merge trung bình
- 1 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 118
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của getsentry/sentry-dotnet
-
chore: remove stale IL3050/IL3053 workaround from the iOS sampleCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởState: Needs Discussion
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
getsentry/sentry-dotnet#6071 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Heap dumps: every SDK shutdown logs "Error waiting for GarbageCollectionMonitor task to complete"Có thể đã có người làm @pcbeingused33 đã nhận hôm nay. Đang mởState: Needs Discussion
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
getsentry/sentry-dotnet#6039 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
.NET Platform: Android Task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
getsentry/sentry-dotnet#6020 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Move the Blazor WebAssembly sample off the deprecated DevServerCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở.NET Framework: Blazor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
getsentry/sentry-dotnet#5906 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs MSBuild Needs Docs Update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
getsentry/sentry-dotnet#5691 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của getsentry/sentry-dotnet
Issue tương tự
-
In-car displays show 0 km/h and P while the AV drivesCó thể đã có người làm @bazilinskyy đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
bazilinskyy/coupled-sim#366 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
BaryoDev/umbraco-pwa#196 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
microsoft/fluentui-blazor#5688 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug flaky lsp-transport small
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày