Unsafe implementation of the HostnameVerifier interface
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- java
- 領域
- mobile-dev, networking, security
調査の方向性
Javaソースで HostnameVerifier と setHostnameVerifier の使用箇所を検索し、続いてカスタム verifier と issue に示されている accordion の接続パスを調査します。実装がすべての hostname を無条件に信頼するのではなく、期待される hostname のチェックを適用し、検証失敗を抑制しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Google now is blocking updates to apps that include libraries that have "unsafe" HostnameVerifier implementations. They seem to pattern match the code so always returning true even from a HostnameVerifier that is only used in a safe context the fact that it always returns true seems to trip the filter.
https://support.google.com/faqs/answer/7188426
To properly handle hostname verification, change the implementation of your custom HostnameVerifier interface to perform the following actions:
- If you are using the HostnameVerifier interface, change the implementation of the verify method to return false whenever the hostname of the server does not meet your expectations.
- If you are using the X509HostnameVerifier interface, change the implementation of the verify methods (variants 1, 2, 3) to raise an SSLException whenever the hostname of the server does not meet your expectations. Ensure that the Exceptions raised within your verify implementation are not caught and suppressed within the method. Suppressing Exceptions in this manner would cause verify to exit normally, leading the app to trust all hostnames.
package com.deezer.sdk.network.b;
...
public class Blues {
...
private static final HostnameVerifier bagpipes = new HostnameVerifier() {
public final boolean verify(String hostname, SSLSession session) {
return true;
}
};
...
private static HttpURLConnection accordion(String var0, String var1, boolean var2) throws IOException {
Object var3;
if (var2) {
((HttpsURLConnection)(var3 = (HttpsURLConnection)(new URL(var0)).openConnection())).setHostnameVerifier(bagpipes);
} else {
var3 = (HttpURLConnection)(new URL(var0)).openConnection();
}
((HttpURLConnection)var3).setRequestProperty("User-Agent", var1);
return (HttpURLConnection)var3;
}
...
}
- 主要言語
- Java
- スター
- 42
- フォーク
- 25
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
deezer/android-sample のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
deezer/android-sample#23 · リアクション 1 件 ·
-
Unsafe implementation of the HostnameVerifier, Play Store rejects apps with this library (v0.11.2).オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
deezer/android-sample#22 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
deezer/android-sample#21 · コメント 1 件 ·
-
SSL Errorオープン
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
deezer/android-sample#19 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
deezer/android-sample#18 · コメント 3 件 ·
deezer/android-sample の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
redhat-developer/intellij-quarkus#1626 ·
-
Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
wso2/product-integrator-mi#5061 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
quarkiverse/quarkus-roq#1277 ·
メンテナーはふだん 1 日以内に返信
-
Typos in page footerオープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
apache/logging-site#48 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/maven-surefire#3496 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信