Sourced from okhttp's changelog.
Version 4.9.2
2021-09-30
- Fix: Don't include potentially-sensitive header values in
Headers.toString()or exceptions. This applies toAuthorization,Cookie,Proxy-Authorization, andSet-Cookieheaders.- Fix: Don't crash with an
InaccessibleObjectExceptionwhen running on JDK17+ with strong encapsulation enabled.- Fix: Strictly verify hostnames used with OkHttp's
HostnameVerifier. Programs that make direct manual calls toHostnameVerifiercould be defeated if the hostnames they pass in are not strictly ASCII. This issue is tracked as [CVE-2021-0341].Version 5.0.0-alpha.2
2021-01-30
In this release MockWebServer has a new Maven coordinate and package name. A longstanding problem with MockWebServer has been its API dependency on JUnit 4. We've reorganized things to remove that dependency while preserving backwards compatibility.
Maven Coordinate Package Name Description com.squareup.okhttp3:mockwebserver3:5.0.0-alpha.2 mockwebserver3 Core module. No JUnit dependency! com.squareup.okhttp3:mockwebserver3-junit4:5.0.0-alpha.2 mockwebserver3.junit4 Optional JUnit 4 integration. com.squareup.okhttp3:mockwebserver3-junit5:5.0.0-alpha.2 mockwebserver3.junit5 Optional JUnit 5 integration. com.squareup.okhttp3:mockwebserver:5.0.0-alpha.2 okhttp3.mockwebserver Obsolete. Depends on JUnit 4. The new APIs use
mockwebserver3in both the Maven coordinate and package name. This new API is not stable and will likely change before the final 5.0.0 release.If you have code that subclasses
okhttp3.mockwebserver.QueueDispatcher, this update is not source or binary compatible. Migrating to the newmockwebserver3package will fix this problem.
- New: DNS over HTTPS is now a stable feature of OkHttp. We introduced this as an experimental module in 2018. We are confident in its stable API and solid implementation.
- Fix: Work around a crash in Android 10 and 11 that may be triggered when two threads concurrently close an SSL socket. This would have appeared in crash logs as
NullPointerException: bio == null.- Fix: Use plus
+instead of%20to encode space characters inFormBody. This was a longstanding bug in OkHttp. The fix makes OkHttp consistent with major web browsers.- Fix: Don't crash if Conscrypt returns a null version.
- Fix: Include the public suffix data as a resource in GraalVM native images.
- Fix: Fail fast when the cache is corrupted.
- Fix: Fail fast when a private key cannot be encoded.
- Fix: Fail fast when attempting to verify a non-ASCII hostname.
- Upgrade: [GraalVM 21][graalvm_21].
- Upgrade: [Kotlin 1.4.20][kotlin_1_4_20].
... (truncated)
3edf17c Prepare for release 4.9.2.262b3cd Handle strict module handling on JDK17 (#6707) (#6742)f574ea2 Cherry pick fix for CVE-2021-0341 onto 4.9.x (#6741)1fd7c0a Make it more difficult to accidentally log sensitive headers (#6551) (#6740)b0397cc 4.9.x GitHub builds update (#6732)eb5a834 Prepare next development version.