diff --git a/qutebrowser/browser/shared.py b/qutebrowser/browser/shared.py index 5db2d9fa0..8536ea837 100644 --- a/qutebrowser/browser/shared.py +++ b/qutebrowser/browser/shared.py @@ -146,9 +146,13 @@ def ignore_certificate_errors(url, errors, abort_on): """.strip()) msg = err_template.render(url=url, errors=errors) - return message.ask(title="Certificate errors - continue?", text=msg, - mode=usertypes.PromptMode.yesno, default=False, - abort_on=abort_on) + ignore = message.ask(title="Certificate errors - continue?", text=msg, + mode=usertypes.PromptMode.yesno, default=False, + abort_on=abort_on) + if ignore is None: + # prompt aborted + ignore = False + return ignore elif ssl_strict is False: log.webview.debug("ssl-strict is False, only warning about errors") for err in errors: diff --git a/tests/end2end/features/prompts.feature b/tests/end2end/features/prompts.feature index 978e79406..00cb93dd9 100644 --- a/tests/end2end/features/prompts.feature +++ b/tests/end2end/features/prompts.feature @@ -197,6 +197,14 @@ Feature: Prompts And I run :prompt-accept no Then a SSL error page should be shown + Scenario: SSL error with ssl-strict = ask -> abort + When I clear SSL errors + And I set network -> ssl-strict to ask + And I load an SSL page + And I wait for a prompt + And I run :leave-mode + Then a SSL error page should be shown + # Geolocation Scenario: Always rejecting geolocation