Search code examples
androidreact-nativegoogle-playandroid-security

Insecure HostnameVerifier in Android - React Native


How to fix below error in Google Play store(React native)

Your app is using an unsafe implementation of hostname verifier. Please see this Google Help Centre article for details, including the deadline for fixing the vulnerability.

Lh/a/a/a/a/l/e$a; Lh/a/a/a/a/l/f$a;


Solution

  • Your project or any libraries may use an unsafe hostname verifier. You may successfully updated this app using the same code without any error on previous time. But it is a new review strategy from google play.

    If you are not sure which package is used this unsafe-hostname, you can contact google play support team using the link: https://support.google.com/googleplay/android-developer/contact/app_vuln

    Don't forget to select the same Google account to which you have uploaded your project

    You will receive an email within 2 or 3 business days with details of this issue, including the name of the library that used the unsafe-hostname.

    You can upgrade this library to the latest version, or you can remove this if you are actually not implementing this library in your code.

    I got the following detailed email from google when I contacted with the above link. *

    For example, your app is currently using the following vulnerable implementation of HostnameVerifier: Llib/android/paypal/com/magnessdk/network/d$1; Llib/android/paypal/com/magnessdk/network/e$1;

    My project was not using the PayPal library directly, but paypal is used by another library "braintreepayments". Actually, I am not using this library in my live project, I added this at the initial time of my project. So I commented this library in app/build.gradle, this fixed my issue.