-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
GH-292 android: SSL errors handling in Android #293
Conversation
Ok I see this adds some handling of the error. What happens with the message then? |
Before the change, the events came like this : {type: "loadstart", url: "https://ourdomain.com/"} {type: "loadstop", url: "https://ourdomain.com/"} After : {type: "loadstart", url: "https://ourdomain.com/"} {type: "loaderror", url: "https://ourdomain.com/", code: 0, sslerror: 3, message: "The certificate authority is not trusted"} {type: "loadstop", url: "https://ourdomain.com/"} The I am not sure about what should the |
Ah ok, so the PR makes sure the error is not just swallowed but bubbles up to the web app and can be handled there? |
Yes, exactly. |
b591d2c
to
730ddd1
Compare
Very possible this is unrelated, someone will look into this (either by fixing the flaky tests in general or by giving your PR the thumbs-up anyway) in the future. I am not sure enough to do so myself, so we'll have to wait for another maintainer. |
@janpio I noticed that onReceivedError is not called on http error with Android SDK >= 23 (so loaderror is never triggered for errors which are not ssl error) because onReceivedHttpError should be used instead. Should I create another issue/PR for that? |
Yes please @nicolashenry - sounds not directly related, so another PR would make it much easier to review. Thanks! |
I would really like to see this merged please. I am trying to upload an app to Google and they sent me an email about a SSL Error Handler vulnerability and a deadline to fix it. Here is a help center article they provided: https://support.google.com/faqs/answer/7071387 |
Thanks for bringing attention to this issue. I'll review/test this tonight. @janpio I know it's been awhile since you approved this PR. Do you think you're approval still stands? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking forward to getting this update in.
We've had this bug, too, due to a mis-configured Apache webserver - so the PR definitely solves an issue. 👍 @breautek for retesting: Have a webserver with an invalid/incomplete chain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but I do think we should remove the deprecated constant that @timbru31 pointed out.
I removed the deprecated constant 👍 |
Platforms affected
Android
What does this PR do?
Fix #292
What testing has been done on this change?
I tested on my company website which currently have a chaining certificate issue (it should be fixed soon).
Maybe it should be done on all platforms but our certificate issue only occurs on Android (iOS does not care about this problem).
Checklist