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 validation of the W3C trace context header parsing #774

Closed
minherz opened this issue Dec 3, 2021 · 0 comments · Fixed by #777
Closed

Fix validation of the W3C trace context header parsing #774

minherz opened this issue Dec 3, 2021 · 0 comments · Fixed by #777
Assignees
Labels
api: logging Issues related to the googleapis/java-logging API. lang: java Issues specific to Java. priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@minherz
Copy link
Contributor

minherz commented Dec 3, 2021

Parsing should validate the length of each field and allow only hexadecimal characters in the values.

@minherz minherz added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p3 Desirable enhancement or fix. May not be included in next release. lang: java Issues specific to Java. labels Dec 3, 2021
@minherz minherz self-assigned this Dec 3, 2021
@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/java-logging API. label Dec 3, 2021
minherz added a commit that referenced this issue Dec 3, 2021
validate length and characters of the w3c trace context value.
see https://www.w3.org/TR/trace-context/#traceparent-header-field-values
refactor unit testing to bring invalid w3c trace context tests to separate file

Fixes #774
@minherz minherz changed the title Fix validation of the W3 trace context header parsing Fix validation of the W3C trace context header parsing Dec 3, 2021
minherz added a commit that referenced this issue Dec 5, 2021
* fix: enforce w3c trace context value validation

validate length and characters of the w3c trace context value.
see https://www.w3.org/TR/trace-context/#traceparent-header-field-values
refactor unit testing to bring invalid w3c trace context tests to separate file

Fixes #774

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: fix bug in formatting validation

change length of the span field from 12 to 16 according to the standard

* chore: refactor w3c format regex

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/java-logging API. lang: java Issues specific to Java. priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant