From 3532cb349ce9bdc7885e4d11c83a47930f64c261 Mon Sep 17 00:00:00 2001 From: Billy Newman Date: Mon, 22 Feb 2021 14:36:10 -0700 Subject: [PATCH] [FIX] Webview not falling back to default auth challenge when no cert is provided (#2918) * [FIX] Android - fallback to default auth challenge handling when no cert is provided * If a certificate auth challenge is requested on Android the webview will hang if no certificate is loaded. To prevent this, fallback to default Android behavior and cancel the challenge with request.cancel() * No client certificate case defaults to super implementation * Update react-native-webview * Downgrade to previous dependency version Co-authored-by: Diego Mello Co-authored-by: Gerzon Z Co-authored-by: Jan Garaj --- patches/react-native-webview+10.3.2.patch | 6 ++++-- yarn.lock | 4 +--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/patches/react-native-webview+10.3.2.patch b/patches/react-native-webview+10.3.2.patch index 68412ee27..08b0e9721 100644 --- a/patches/react-native-webview+10.3.2.patch +++ b/patches/react-native-webview+10.3.2.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java b/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java -index ab869cf..2aa7a9e 100644 +index ab869cf..08ce7ce 100644 --- a/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java +++ b/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java @@ -84,6 +84,12 @@ import java.util.Map; @@ -44,7 +44,7 @@ index ab869cf..2aa7a9e 100644 } @Override -@@ -742,12 +754,54 @@ public class RNCWebViewManager extends SimpleViewManager { +@@ -742,12 +754,56 @@ public class RNCWebViewManager extends SimpleViewManager { protected static class RNCWebViewClient extends WebViewClient { @@ -93,6 +93,8 @@ index ab869cf..2aa7a9e 100644 + } + }; + task.execute(); ++ } else { ++ super.onReceivedClientCertRequest(view, request); + } + } + diff --git a/yarn.lock b/yarn.lock index 4a577acf4..c16c63185 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13189,7 +13189,7 @@ react-native-windows@^0.62.0-0: uuid "^3.3.2" xml-parser "^1.2.1" -react-native@RocketChat/react-native#0.63.4, react-native@^0.63.1: +react-native@RocketChat/react-native#0.63.4: version "0.63.4" resolved "https://codeload.github.com/RocketChat/react-native/tar.gz/616299bbc01eeb56cb7d5b52e543051e1ad2d136" dependencies: @@ -13832,8 +13832,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: rn-extensions-share@RocketChat/rn-extensions-share: version "2.4.1" resolved "https://codeload.github.com/RocketChat/rn-extensions-share/tar.gz/4d7c0e4c2f300e4fb116af7b7cc0dbbc8169150c" - dependencies: - react-native "^0.63.1" rn-fetch-blob@0.12.0: version "0.12.0"