From bd9699ee05c5afaa9202345cb9cbd50dade0cfd1 Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Tue, 17 Oct 2023 15:52:52 +0200 Subject: [PATCH] Fix hook from PhoneGap sslCertificateChecker plugin --- android-certificate-unpinning.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/android-certificate-unpinning.js b/android-certificate-unpinning.js index eb8bc40..0774b38 100644 --- a/android-certificate-unpinning.js +++ b/android-certificate-unpinning.js @@ -239,7 +239,12 @@ const PINNING_FIXES = { { methodName: 'execute', overload: ['java.lang.String', 'org.json.JSONArray', 'org.apache.cordova.CallbackContext'], - replacement: () => RETURN_TRUE + replacement: () => (_action, _args, context) => { + context.success("CONNECTION_SECURE"); + return true; + } + // This trusts _all_ certs, but that's fine - this is used for checks of independent test + // connections, rather than being a primary mechanism to secure the app's TLS connections. } ],