Skip to content

[webview_flutter] Add an option to bypass SSL checks #7893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8bca259
Partially implemented ssl error decision
Colman Oct 3, 2024
32b3c83
Partially implemented ssl error decision
Colman Oct 3, 2024
f24ded9
Partially implemented ssl error decision
Colman Oct 7, 2024
c44a50d
Partially implemented ssl error decision
Colman Oct 7, 2024
b1ed63e
Partially implemented ssl error decision
Colman Oct 7, 2024
90b1457
Partially implemented ssl error decision
Colman Oct 7, 2024
de9acf9
Partially implemented ssl error decision
Colman Oct 7, 2024
fdaa89f
Partially implemented ssl error decision
Colman Oct 7, 2024
0458aba
Partially implemented ssl error decision
Colman Oct 7, 2024
e2cb3a1
Partially implemented ssl error decision
Colman Oct 7, 2024
ca81379
Partially implemented ssl error decision
Colman Oct 7, 2024
5a94528
Partially implemented ssl error decision
Colman Oct 8, 2024
ae64dae
Partially implemented ssl error decision
Colman Oct 8, 2024
a06c18c
Partially implemented ssl error decision
Colman Oct 9, 2024
7634b1f
Partially implemented ssl error decision
Colman Oct 9, 2024
c9edcdc
Partially implemented ssl error decision
Colman Oct 9, 2024
81d045a
Partially implemented ssl error decision
Colman Oct 11, 2024
a81420d
Partially implemented ssl error decision
Colman Oct 15, 2024
384e94c
Partially implemented ssl error decision
Colman Oct 15, 2024
55fb7ef
Partially implemented ssl error decision
Colman Oct 16, 2024
8cd4127
Partially implemented ssl error decision
Colman Oct 16, 2024
515580a
Partially implemented ssl error decision
Colman Oct 16, 2024
97d26ea
Partially implemented ssl error decision
Colman Oct 16, 2024
3a9f7c6
Partially implemented ssl error decision
Colman Oct 16, 2024
464dba3
Partially implemented ssl error decision
Colman Oct 16, 2024
e8a591e
Partially implemented ssl error decision
Colman Oct 16, 2024
1f396ca
Partially implemented ssl error decision
Colman Oct 16, 2024
ffe9f00
Partially implemented ssl error decision
Colman Oct 16, 2024
7a3b559
Partially implemented ssl error decision
Colman Oct 16, 2024
ffe6662
Partially implemented ssl error decision
Colman Oct 16, 2024
4988352
Partially implemented ssl error test
Colman Oct 16, 2024
9333d5d
Partially implemented ssl error test
Colman Oct 16, 2024
ac544c9
Partially implemented ssl error decision
Colman Oct 17, 2024
afe3943
Partially implemented ssl error decision
Colman Oct 17, 2024
998e334
Partially implemented ssl error decision
Colman Oct 17, 2024
941915c
Partially implemented ssl error decision
Colman Oct 17, 2024
7ef9309
Fixed versions
Colman Oct 17, 2024
b62371c
Fixed versions
Colman Oct 17, 2024
b0735a7
Added test
Colman Oct 17, 2024
7a10765
Merge branch 'main' into add-an-option-to-bypass-ssl-checks
Colman Oct 18, 2024
64266f6
Fixed change logs
Colman Oct 18, 2024
91cdee9
Added path based dependency overrides
Colman Oct 18, 2024
ae9162d
Added Dart unit tests to the Android package
Colman Oct 18, 2024
f2e0b64
Formatted files
Colman Oct 18, 2024
af4a93a
Fixed switch statements
Colman Oct 18, 2024
0fffc68
Merge branch 'main' into add-an-option-to-bypass-ssl-checks
Colman Oct 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/webview_flutter/webview_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.11.0

* Adds `onSslError` callback to `NavigationDelegate` to handle SSL errors.

## 4.10.0

* Updates minimum supported `webview_flutter_android` from 3.16.0 to 4.0.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ flutter:
- assets/sample_video.mp4
- assets/www/index.html
- assets/www/styles/style.css

# FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE.
# See https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins
dependency_overrides:
{webview_flutter: {path: ../../../webview_flutter/webview_flutter}, webview_flutter_android: {path: ../../../webview_flutter/webview_flutter_android}, webview_flutter_platform_interface: {path: ../../../webview_flutter/webview_flutter_platform_interface}, webview_flutter_wkwebview: {path: ../../../webview_flutter/webview_flutter_wkwebview}}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class NavigationDelegate {
void Function(UrlChange change)? onUrlChange,
void Function(HttpAuthRequest request)? onHttpAuthRequest,
void Function(HttpResponseError error)? onHttpError,
FutureOr<SslErrorDecision> Function(SslError request)? onSslError,
}) : this.fromPlatformCreationParams(
const PlatformNavigationDelegateCreationParams(),
onNavigationRequest: onNavigationRequest,
Expand All @@ -61,6 +62,7 @@ class NavigationDelegate {
onUrlChange: onUrlChange,
onHttpAuthRequest: onHttpAuthRequest,
onHttpError: onHttpError,
onSslError: onSslError,
);

/// Constructs a [NavigationDelegate] from creation params for a specific
Expand Down Expand Up @@ -105,6 +107,7 @@ class NavigationDelegate {
void Function(UrlChange change)? onUrlChange,
void Function(HttpAuthRequest request)? onHttpAuthRequest,
void Function(HttpResponseError error)? onHttpError,
FutureOr<SslErrorDecision> Function(SslError request)? onSslError,
}) : this.fromPlatform(
PlatformNavigationDelegate(params),
onNavigationRequest: onNavigationRequest,
Expand All @@ -115,6 +118,7 @@ class NavigationDelegate {
onUrlChange: onUrlChange,
onHttpAuthRequest: onHttpAuthRequest,
onHttpError: onHttpError,
onSslError: onSslError,
);

/// Constructs a [NavigationDelegate] from a specific platform implementation.
Expand All @@ -130,6 +134,7 @@ class NavigationDelegate {
void Function(UrlChange change)? onUrlChange,
HttpAuthRequestCallback? onHttpAuthRequest,
void Function(HttpResponseError error)? onHttpError,
SslErrorCallback? onSslError,
}) {
if (onNavigationRequest != null) {
platform.setOnNavigationRequest(onNavigationRequest!);
Expand All @@ -155,6 +160,9 @@ class NavigationDelegate {
if (onHttpError != null) {
platform.setOnHttpError(onHttpError);
}
if (onSslError != null) {
platform.setOnSslError(onSslError);
}
}

/// Implementation of [PlatformNavigationDelegate] for the current platform.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export 'package:webview_flutter_platform_interface/webview_flutter_platform_inte
PlatformWebViewWidgetCreationParams,
ProgressCallback,
ScrollPositionChange,
SslCertificate,
SslError,
SslErrorDecision,
SslErrorType,
UrlChange,
WebResourceError,
WebResourceErrorCallback,
Expand Down
5 changes: 5 additions & 0 deletions packages/webview_flutter/webview_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ topics:
- html
- webview
- webview-flutter

# FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE.
# See https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins
dependency_overrides:
{webview_flutter_android: {path: ../../webview_flutter/webview_flutter_android}, webview_flutter_platform_interface: {path: ../../webview_flutter/webview_flutter_platform_interface}, webview_flutter_wkwebview: {path: ../../webview_flutter/webview_flutter_wkwebview}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.1.0

* Adds support for `onReceivedSslError` method to the `AndroidWebViewController`.

## 4.0.0

* Bumps androidx.webkit:webkit from 1.12.0 to 1.12.1.
Expand Down
Loading