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(pii): Early return if no text left #1957

Merged
merged 2 commits into from
Mar 21, 2023
Merged

fix(pii): Early return if no text left #1957

merged 2 commits into from
Mar 21, 2023

Conversation

jjbayer
Copy link
Member

@jjbayer jjbayer commented Mar 21, 2023

If a list of chunks consists only of replacements, the following debug assertion at the end of apply_replacement_chunks might fail (see test):

debug_assert!(replacement_chunks.is_empty());

Add an early return to prevent this failure.

This popped up in a test case in #1951.

#skip-changelog

@jjbayer jjbayer requested a review from mdtro March 21, 2023 13:20
@jjbayer jjbayer marked this pull request as ready for review March 21, 2023 13:20
@jjbayer jjbayer requested a review from a team March 21, 2023 13:20
@jjbayer jjbayer enabled auto-merge (squash) March 21, 2023 13:25
@jjbayer jjbayer merged commit 91c7370 into master Mar 21, 2023
@jjbayer jjbayer deleted the fix/replace-anything branch March 21, 2023 13:28
jan-auer added a commit that referenced this pull request Mar 24, 2023
* master:
  feat(normalization): Mark scrubbed transactions as sanitized (#1960)
  fix(pii): Scrub sensitive cookies (#1951)
  release: 23.3.1
  feat(pii-scrubbing): PII scrub span.data by default (#1953)
  test(scrubbing): Add tests for PII scrubbing in breadcrumb.data (#1955)
  build(deps): bump sentry-sdk from 1.11.0 to 1.14.0 (#1959)
  ref(envelope_manager): Remove from_registry calls from the service (#1956)
  cd: add placeholder deployment pipeline (#1954)
  Assert array fields are capped to 100 items (#1910)
  fix(pii): Early return if no text left (#1957)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants