--story=134453973 【安全】Java SDK okhttp 存在安全漏洞#277
Open
likeelli wants to merge 3 commits into
Open
Conversation
- Bump maven-compiler-plugin source/target from 1.7 to 1.8 - Bump okhttp and logging-interceptor from 3.12.13 to 4.12.0 - Add jaxb-api 2.3.0 (required by okhttp 4.x on Java 8) - Update RequestBody.create() call order to (body, mediaType) per okhttp 4.x API - Remove deprecated single-arg setSSLSocketFactory() in HttpConnection (removed in okhttp 4.x) - In AbstractClient.trySetSSLSocketFactory(), fall back to JVM default X509TrustManager when only SSLSocketFactory is set, preserving backward compatibility for existing callers CVE fixed: CVE-2021-0341 (CVSS 7.5 High): TLS hostname verification bypass in okhttp < 4.9.1 CVE-2023-3635 (CVSS 5.3 Medium): GzipSource resource leak in okhttp < 4.10.0
8 test cases covering: TC1 - POST TC3-HMAC-SHA256 (default path) TC2 - GET HmacSHA256 (legacy signature) TC3 - GET TC3-HMAC-SHA256 TC4 - POST HmacSHA1 (legacy signature) TC5 - Custom SSLSocketFactory + X509TrustManager (okhttp4 two-arg API) TC6 - SSLSocketFactory only, no TrustManager (backward compat fallback) TC7 - Custom HostnameVerifier TC8 - Explicit HTTPS protocol
bf1d679 to
d3239a8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.