Skip to content

fix: Report slash- and tilde-prefixed redacted attributes as escaped references - #56

Draft
beekld wants to merge 1 commit into
mainfrom
bklimt/SDK-2923/escaped-refs-for-slash-prefixed-redacted-attrs
Draft

fix: Report slash- and tilde-prefixed redacted attributes as escaped references#56
beekld wants to merge 1 commit into
mainfrom
bklimt/SDK-2923/escaped-refs-for-slash-prefixed-redacted-attrs

Conversation

@beekld

@beekld beekld commented Aug 15, 2026

Copy link
Copy Markdown

Summary

When a context has a custom attribute whose literal name begins with /, the redaction logic that builds an event's _meta.redactedAttributes failed to list it.

The serializer converted each literal attribute name to a Reference via Reference::new(key), which interprets a leading / as attribute-pointer syntax. For an attribute literally named /ssn, that parsed to the pointer component ssn, so the value lookup found nothing and the attribute was silently dropped from redactedAttributes. The value itself was never emitted, so there was no data leak. The attribute was just never reported.

This builds the reference from the literal name using the ATREF backwards-compatibility escaping (~ -> ~0, / -> ~1, prepend /), so /ssn is now reported as /~1ssn.

This fix is needed for the rust-server-sdk to pass the v3 contract tests.

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.

1 participant