summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2019-07-22 23:05:27 +0200
committerFlorian Bruhin <me@the-compiler.org>2019-07-22 23:11:40 +0200
commit350835261586037e706371739ebedf2e2d7529c1 (patch)
treebf159ecdcf8c50c2d999bf40665995bc339b06bb
parent1023c2ef804f724f2bf4ef2961f8040ee60bff97 (diff)
downloadqutebrowser-350835261586037e706371739ebedf2e2d7529c1.tar.gz
qutebrowser-350835261586037e706371739ebedf2e2d7529c1.zip
Speculative fix for permission crash
In some scenarios (which I can't seem to reproduce), the URL we get in shared.feature_permission is an invalid one. In that case, we set "urlstr = None", but that means we call message.* with url=None but option=... set. Since that's invalid usage (we can't set a per-domain option without knowing the URL) it bails out, causing a crash. (cherry picked from commit 068f3ded896aa70cbc644674803cdeb6389d6561)
-rw-r--r--qutebrowser/browser/shared.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/qutebrowser/browser/shared.py b/qutebrowser/browser/shared.py
index 4d75de465..384c58191 100644
--- a/qutebrowser/browser/shared.py
+++ b/qutebrowser/browser/shared.py
@@ -221,6 +221,7 @@ def feature_permission(url, option, msg, yes_action, no_action, abort_on,
html.escape(url.toDisplayString()), msg)
else:
urlstr = None
+ option = None # For message.ask/confirm_async
text = "Allow the website to {}?".format(msg)
if blocking: