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

Restrict space-only keys #6431

Merged
merged 1 commit into from
May 9, 2024

Conversation

tkmsaaaam
Copy link
Contributor

Resolves #2948

Someone will need to validate what the specification currently says about baggage keys and create a PR if we're not currently in compliance.

I confirmed it. (Thanks to some commenters.) Written here. This page is linked from opentelemetry-specification.

Leading and trailing whitespaces (OWS) are allowed and are not considered to be a part of the key.

So if key consists of space-only, we should treat as null.

@tkmsaaaam tkmsaaaam requested a review from a team May 4, 2024 05:06
Copy link

codecov bot commented May 4, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 90.86%. Comparing base (2db5bb8) to head (3afc1b4).

Files Patch % Lines
.../api/baggage/propagation/W3CBaggagePropagator.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main    #6431   +/-   ##
=========================================
  Coverage     90.85%   90.86%           
- Complexity     6030     6031    +1     
=========================================
  Files           651      651           
  Lines         17728    17728           
  Branches       1777     1777           
=========================================
+ Hits          16107    16108    +1     
  Misses         1105     1105           
+ Partials        516      515    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jack-berg jack-berg merged commit ca79821 into open-telemetry:main May 9, 2024
17 of 18 checks passed
@tkmsaaaam tkmsaaaam deleted the restrict_space-only_keys branch May 9, 2024 22:45
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.

ImmutableBaggage.isKeyValid allows non-zero-length strings that contain nothing but spaces and/or tabs
4 participants