-
Notifications
You must be signed in to change notification settings - Fork 291
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
Added exception catches for the OkHTTPClient header vulnerability #3682
Conversation
communication/src/main/java/datadog/communication/ddagent/DDAgentFeaturesDiscovery.java
Outdated
Show resolved
Hide resolved
communication/src/main/java/datadog/communication/ddagent/DDAgentFeaturesDiscovery.java
Outdated
Show resolved
Hide resolved
communication/src/main/java/datadog/communication/fleet/FleetServiceImpl.java
Outdated
Show resolved
Hide resolved
dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/utils/OkHttpUtils.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/common/writer/ddagent/DDAgentApi.java
Outdated
Show resolved
Hide resolved
communication/src/main/java/datadog/communication/ddagent/DDAgentFeaturesDiscovery.java
Outdated
Show resolved
Hide resolved
communication/src/main/java/datadog/communication/ddagent/DDAgentFeaturesDiscovery.java
Outdated
Show resolved
Hide resolved
communication/src/main/java/datadog/communication/fleet/FleetServiceImpl.java
Outdated
Show resolved
Hide resolved
dd-java-agent/agent-debugger/src/main/java/com/datadog/debugger/uploader/BatchUploader.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/common/metrics/OkHttpSink.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/common/writer/ddagent/DDAgentApi.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/common/writer/ddintake/DDIntakeApi.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/common/writer/ddintake/DDIntakeApi.java
Outdated
Show resolved
Hide resolved
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.
I suggest extracting this logic into utility methods to keep it separate and avoid large try-catch blocks
communication/src/main/java/datadog/communication/http/OkHttpUtils.java
Outdated
Show resolved
Hide resolved
communication/src/main/java/datadog/communication/http/OkHttpUtils.java
Outdated
Show resolved
Hide resolved
dd-java-agent/agent-debugger/src/main/java/com/datadog/debugger/uploader/BatchUploader.java
Outdated
Show resolved
Hide resolved
I'm on board with the changes @ygree suggested. It changes the structure more but I like that it gives us the ability to report the header in the new exception for every case |
communication/src/main/java/datadog/communication/http/OkHttpUtils.java
Outdated
Show resolved
Hide resolved
communication/src/main/java/datadog/communication/http/OkHttpUtils.java
Outdated
Show resolved
Hide resolved
communication/src/main/java/datadog/communication/http/OkHttpUtils.java
Outdated
Show resolved
Hide resolved
communication/src/main/java/datadog/communication/http/OkHttpUtils.java
Outdated
Show resolved
Hide resolved
dd-java-agent/agent-debugger/src/main/java/com/datadog/debugger/uploader/BatchUploader.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/lambda/LambdaHandler.java
Outdated
Show resolved
Hide resolved
…ry comments & try/catch statements
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
communication/src/main/java/datadog/communication/http/SafeRequestBuilder.java
Outdated
Show resolved
Hide resolved
Perfect solution! 👍 |
What Does This Do
The exceptions added prevent the header secrets from being printed when non-printable characters cause IllegalArgument Exceptions.
Motivation
Additional Notes