-
Notifications
You must be signed in to change notification settings - Fork 192
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
Ensure base64 encoded values can be used as headers from env #943
Conversation
This change instructs explode to extract at most 2 parts. Given an example value of ``` OTEL_EXPORTER_OTLP_HEADERS=Authorization=Basic bla64= ``` The config parser would have created the elements, where only two are required. The trailing `=` in base64 headers would then have been effectively discarded, leading to invalid configuration.
Thanks for opening your first pull request! If you haven't yet signed our Contributor License Agreement (CLA), then please do so that we can accept your contribution. A link should appear shortly in this PR if you have not already signed one. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #943 +/- ##
=========================================
Coverage 83.39% 83.39%
Complexity 2122 2122
=========================================
Files 277 277
Lines 6096 6096
=========================================
Hits 5084 5084
Misses 1012 1012
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - could you add a test case for this?
@brettmc added a test |
@cedricziel one linting issue to fix ( |
@brettmc done |
Thanks for your contribution, @cedricziel |
This change instructs explode to extract at most 2 parts.
Given an example value of
The config parser would have created three elements, where only two are required. The trailing
=
in base64 headers would then have been effectively discarded, leading to invalid configuration.