Ask the user what to do in case of a SSL certificate error
ClosedPublic

Authored by stefanocrocco on Oct 21 2018, 3:14 PM.

Details

Summary

When a certificate error happens, the user is asked whether to ignore
the error or not.

Things become more complicated if the page is loaded by
WebEnginePart::load. In this case, SSL errors will have already been
detected by the KParts framework, so asking the user again would be
meaningless. To avoid this, before calling WebEngineView::load,
WebEnginePart::load stores the URL in an instance variable of
WebEnginePage: WebEnginePage::certificateError checks whether this
variable is the same as the URL which produced the error and, in this
case, always returns true.

Unfortunately, it's impossible to integrate all of this with the KDE
certificates management system, as QWebEngine doesn't provide any information
about them except an error code and description.

Test Plan

find a page with an invalid SSL certificate, enter it in the address
bar then check that one (and only one) dialog is shown and that answering to
ignore the error makes the page load.

Attempt to load the web page from a link and check that the behaviour is the
same.

Diff Detail

Repository
R226 Konqueror
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
stefanocrocco requested review of this revision.Oct 21 2018, 3:14 PM
stefanocrocco created this revision.
dfaure accepted this revision.Nov 4 2018, 9:50 AM
This revision is now accepted and ready to land.Nov 4 2018, 9:50 AM
This revision was automatically updated to reflect the committed changes.