Skip to content
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

fix: report insecure request error #133

Merged
merged 5 commits into from
Dec 8, 2023

Conversation

CAMOBAP
Copy link
Collaborator

@CAMOBAP CAMOBAP commented Dec 7, 2023

Fix for crash

Caused by java.lang.Throwable: A WebView method was called on thread 'ThreadPoolForeg'. All WebView methods must be called on the same thread. (Expected Looper Looper (main, tid 2) {c6be634} called on null, FYI main Looper is Looper (main, tid 2) {c6be634})
       at android.webkit.WebView.checkThread(WebView.java:2592)
       at android.webkit.WebView.removeJavascriptInterface(WebView.java:1929)
       at com.hcaptcha.sdk.HCaptchaWebViewHelper$HCaptchaWebClient.shouldInterceptRequest(SourceFile:26)
       at K7.a(chromium-TrichromeWebViewGoogle.apk-stable-443021033:15)
       at org.chromium.android_webview.AwContentsBackgroundThreadClient.shouldInterceptRequestFromNative(chromium-TrichromeWebViewGoogle.apk-stable-443021033:2)
  • new INSECURE_HTTP_REQUEST_ERROR introduced

@CAMOBAP CAMOBAP requested a review from DSergiu December 7, 2023 22:23
@CAMOBAP CAMOBAP self-assigned this Dec 7, 2023
Copy link

github-actions bot commented Dec 7, 2023

Diffuse report:

OLD: sdk-main.aar
NEW: sdk-pr.aar

 AAR      │ old       │ new       │ diff 
──────────┼───────────┼───────────┼──────
      jar │  51.8 KiB │  51.8 KiB │  0 B 
 manifest │     411 B │     411 B │  0 B 
      res │  78.3 KiB │  78.3 KiB │  0 B 
    other │     814 B │     814 B │  0 B 
──────────┼───────────┼───────────┼──────
    total │ 131.2 KiB │ 131.2 KiB │  0 B 

 JAR     │ old │ new │ diff      
─────────┼─────┼─────┼───────────
 classes │  37 │  37 │ 0 (+0 -0) 
 methods │ 506 │ 506 │ 0 (+0 -0) 
  fields │ 164 │ 164 │ 0 (+0 -0)

Copy link

github-actions bot commented Dec 7, 2023

Benchmark report:

Test name Time ms. (median) Allocations (median)
com.hcaptcha.sdk.HCaptchaBenchmarkTest.EMULATOR_UNLOCKED_benchmarkInvisibleVerification +130.40 -6
com.hcaptcha.sdk.HCaptchaBenchmarkTest.EMULATOR_UNLOCKED_benchmarkInvisibleVerificationColdRun +58.48 +95
com.hcaptcha.sdk.HCaptchaBenchmarkTest.EMULATOR_UNLOCKED_benchmarkInvisibleSetup +6.65 +104
com.hcaptcha.sdk.HCaptchaDebugInfoTest.EMULATOR_UNLOCKED_benchmarkDebugInfo +2.46 +557
com.hcaptcha.sdk.HCaptchaDebugInfoTest.EMULATOR_UNLOCKED_benchmarkDebugSys +3.75 -21
com.hcaptcha.sdk.HCaptchaWebViewHelperTest.EMULATOR_UNLOCKED_benchmarkWebViewLoad +85.59 +96

@DSergiu DSergiu changed the title fix: handle http request from webview properly fix: report insecure request error Dec 8, 2023
Copy link
Contributor

@DSergiu DSergiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 1 comment.

CHANGES.md Outdated Show resolved Hide resolved
@DSergiu DSergiu enabled auto-merge (squash) December 8, 2023 09:15
@DSergiu DSergiu merged commit 725210b into main Dec 8, 2023
@DSergiu DSergiu deleted the bugfix/remove-js-interface-on-wrong-thread branch December 8, 2023 09:15
Copy link

sonarqubecloud bot commented Dec 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants