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

fix(relay): set size limit for user report attachments #4482

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
**Bug Fixes**:

- Fix a bug where parsing large unsigned integers would fail incorrectly. ([#4472](https://github.com/getsentry/relay/pull/4472))
- Set size limit for UserReport attachments so it gets properly reported as too large. ([#4482](https://github.com/getsentry/relay/pull/4482))

**Internal**:

Expand Down
3 changes: 1 addition & 2 deletions relay-server/src/utils/sizes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn check_envelope_size_limits(config: &Config, envelope: &Envelope) -> Resul
event_size += item.len();
NO_LIMIT
}
ItemType::Attachment | ItemType::UnrealReport => {
ItemType::Attachment | ItemType::UnrealReport | ItemType::UserReport => {
attachments_size += item.len();
config.max_attachment_size()
}
Expand All @@ -59,7 +59,6 @@ pub fn check_envelope_size_limits(config: &Config, envelope: &Envelope) -> Resul
}
ItemType::Profile => config.max_profile_size(),
ItemType::CheckIn => config.max_check_in_size(),
ItemType::UserReport => NO_LIMIT,
ItemType::Statsd => config.max_statsd_size(),
ItemType::MetricBuckets => config.max_metric_buckets_size(),
ItemType::Log => config.max_log_size(),
Expand Down
Loading