Commit Graph

8867 Commits

Author SHA1 Message Date
Florian Bruhin
e927fecbbc Make content.webrtc_public_interfaces_only work on Qt 5.11
69abc9a1a1 added the argument for Qt 5.9, but
didn't add the QWebEngineSetting for Qt >= 5.11.

See #3010, #2163.
2018-08-08 20:48:33 +02:00
Florian Bruhin
831d3e4044 Add gD keybinding for :tab-give (detach a tab) 2018-08-08 14:23:03 +02:00
Florian Bruhin
7ed71592e0 Handle OSError when creating download directory
Fixes #2570
2018-08-07 16:42:59 +02:00
Florian Bruhin
1cb547a8de Use exist_ok=True for os.path.makedirs
See #2570
2018-08-07 16:42:59 +02:00
Florian Bruhin
b617f1e03c Remove old pylint disable comments 2018-08-06 19:55:27 +02:00
Florian Bruhin
50823b9415 eslint: Disable require-unicode-regexp
See https://eslint.org/docs/rules/require-unicode-regexp
It would be useful to have, but Chromium 49 coming with Qt 5.7 doesn't support
it (Chromium 56 in Qt 5.9 would)...

Also see #3839
2018-08-04 13:43:00 +02:00
Florian Bruhin
6b044d4aff Fix indent 2018-07-28 14:47:01 +02:00
Florian Bruhin
ee06ba0140 Handle invalid URLs in acceptNavigationRequest in the tab API 2018-07-28 11:54:58 +02:00
Florian Bruhin
7ac7ccc296 Ignore invalid URLs in acceptNavigationRequest 2018-07-28 09:18:50 +02:00
Florian Bruhin
d830dd69a4 Add workaround comment 2018-07-24 16:04:28 +02:00
Florian Bruhin
90d7ab84b0 Merge remote-tracking branch 'origin/pr/4072' 2018-07-24 16:03:54 +02:00
Florian Bruhin
f69cd2259e Don't require user interaction for clicking qute:// links
See #4090, #4073
2018-07-24 15:44:27 +02:00
Florian Bruhin
e70d796dad Merge remote-tracking branch 'origin/pr/4090' 2018-07-24 15:41:40 +02:00
Florian Bruhin
6c353a140f Bump up yaml_load deadline on CI 2018-07-23 21:32:09 +02:00
Jay Kamat
31d318ee0a
Add catch and error handling for errors in follow_selected click 2018-07-21 13:58:41 -07:00
Jay Kamat
2b8068f6da
Move audible strings into class variables 2018-07-21 12:50:45 -07:00
Florian Bruhin
3b6c4d4b85 Remove unneeded log prefix
We see the function anyways
2018-07-19 00:31:40 +02:00
Florian Bruhin
7d695d40b9 Add a QUTE_FAKE_OPENGL_VENDOR envvar 2018-07-19 00:31:23 +02:00
Florian Bruhin
8a748741ba Fix checks for Nouveau workaround 2018-07-19 00:28:12 +02:00
Florian Bruhin
a72eee8e39 Enable XSS auditing by default
Qt disables this by default, but Chromium does have it enabled.

I also submitted a change to Qt to hopefully enable it by default there
starting with Qt 5.12: https://codereview.qt-project.org/#/c/198354/15

This also removes the claim of having a (big) performance impact, as Chromium's
XSS design doc says the opposite:
https://www.chromium.org/developers/design-documents/xss-auditor
2018-07-17 12:01:17 +02:00
Florian Bruhin
b8c70e5986 Rewrite type comments again 2018-07-16 22:35:40 +02:00
Florian Bruhin
2d65f25a04 Remove unnecessary object inheritance 2018-07-16 14:44:31 +02:00
Florian Bruhin
e4a772c61c Fix try-except-raise for pylint 2.0
See https://github.com/PyCQA/pylint/issues/2302
2018-07-16 14:44:07 +02:00
Florian Bruhin
e0f3285f05 Fix bad-indentation issues for pylint 2.0
See https://github.com/PyCQA/pylint/issues/2301
2018-07-16 14:41:18 +02:00
Florian Bruhin
e50b6912a7 Fix pylint 2.0 useless-return cases
See https://github.com/PyCQA/pylint/issues/2300
2018-07-16 14:33:11 +02:00
Florian Bruhin
b1d508a3af Rewrite pseudo "type:" comments for pylint 2.0
See https://github.com/PyCQA/pylint/issues/2299
2018-07-16 14:15:00 +02:00
Florian Bruhin
9298f3d055 Refactor print handling and fix window.print
On Qt 5.7.1, window.print() caused a CommandError which wasn't handled as the
command was called from accept_navigation_request.

Instead, we now show the dialog in AbstractPrinting and use that directly.
2018-07-16 08:16:18 +02:00
Hendrik R
b1a060fb71 Process all events before issuing an alert
Fixes #2603

The call to processEvents fixes an apparent race condition with some window
managers, e.g. i3. QT seems to be thinking, that the window is not marked as
urgent and toggles it twice, so synchronizing before issuing the alert makes QT
behave correctly.

This change should not change the behaviour on other systems only correct the
fault reported in #2603.
2018-07-15 14:31:03 +02:00
Florian Bruhin
d1a25b6c3f Release v1.4.1 2018-07-11 17:17:51 +02:00
Florian Bruhin
43e58ac865 CVE-2018-10895: Fix CSRF issues with qute://settings/set URL
In ffc29ee043 (part of v1.0.0), a
qute://settings/set URL was added to change settings.

Contrary to what I apparently believed at the time, it *is* possible for
websites to access `qute://*` URLs (i.e., neither QtWebKit nor QtWebEngine
prohibit such requests, other than the usual cross-origin rules).

In other words, this means a website can e.g. have an `<img>` tag which loads a
`qute://settings/set` URL, which then sets `editor.command` to a bash script.
The result of that is arbitrary code execution.

Fixes #4060
See #2332
2018-07-11 17:05:23 +02:00
Florian Bruhin
b9e3d3cab9 Add workaround for chrome-extension:// URLs
Fixes #4049
2018-07-09 12:29:35 +02:00
Florian Bruhin
274b66ec46 Strip trailing newlines from pastebin URL 2018-07-08 22:09:56 +02:00
Florian Bruhin
0a31e19eda Handle download errors when the reply is already gone
Fixes #1270
2018-07-03 17:16:02 +02:00
Florian Bruhin
0f037fb415 Release v1.4.0 2018-07-03 15:44:44 +02:00
Florian Bruhin
8cf22c85e0 Merge remote-tracking branch 'origin/pr/4019' 2018-07-03 13:52:24 +02:00
Florian Bruhin
d861c097b1 Support new dead keys added in Qt 5.11 properly
See https://codereview.qt-project.org/#/c/207231/
2018-07-02 22:32:59 +02:00
Florian Bruhin
ad19833e34 Revert "Add workaround for PyQt 5.11 headerDataChanged bug"
PyQt 5.11.1 has already been released, with the bug fixed.

This reverts commit 291763a55643342a6f977ce2a12dcc6f4badbe8a.
2018-07-02 22:32:59 +02:00
Florian Bruhin
eca08f064b Add workaround for PyQt 5.11 headerDataChanged bug
https://www.riverbankcomputing.com/pipermail/pyqt/2018-June/040445.html
2018-07-02 22:32:59 +02:00
Florian Bruhin
c3455d9082 Add a wrapper around sip
Starting with PyQt 5.11, the sip module now is bundled with PyQt as PyQt.sip.
Having a qutebrowser.qt also helps with #3625, see #995
2018-07-02 22:32:59 +02:00
Florian Bruhin
a7af5195d1 Set title when showing PDF.js error page
Fixes #3894
2018-06-28 11:22:44 +02:00
Florian Bruhin
e9c78b29ed Ignore Python 3.7 collections.abc warning
Related issues/PRs:
https://github.com/yaml/pyyaml/pull/181
https://github.com/pypa/setuptools/issues/1401
https://github.com/pallets/markupsafe/pull/98
https://github.com/yaml/pyyaml/pull/181
https://github.com/pallets/jinja/pull/867
2018-06-27 16:01:21 +02:00
Florian Bruhin
2f612aa6df Update comment 2018-06-26 15:54:56 +02:00
Florian Bruhin
8519aa940f Decorate slots properly 2018-06-26 10:40:13 +02:00
Florian Bruhin
ea4ee6f00b Use the url_changed signal in the tab API 2018-06-26 10:39:33 +02:00
Florian Bruhin
1536843f33 Only get greasemonkey object once 2018-06-26 10:39:04 +02:00
Florian Bruhin
61da5d0c7c Merge remote-tracking branch 'origin/pr/4017' 2018-06-26 10:37:17 +02:00
Florian Bruhin
85a9f6a08a Fix lint 2018-06-26 10:23:48 +02:00
Jimmy
c43d173197 greasemonkey: s/userscripts/greasemonkey_scripts/
No need to confuse developers as well as users.
2018-06-26 16:42:31 +12:00
Jimmy
ee2c765859 greasemonkey: check _widget is not deleted
Just for good luck.

No crash has been reported here but it is a common pattern for functions
called from signals.
2018-06-26 16:42:31 +12:00
Jimmy
6f1232e621 greasemonkey: move 5.7.1 injection method into _WebEngineScripts
Moves the 5.8 check to `_WebEngineScripts.init()`.

Changes `_inject_userscripts` to allow for the two code paths. With
5.7.1 we need to specify the injection point and not clear all scripts
for each call, since we have to call it three times.

Change the 5.8+ hook to call a new method which passes all the scripts
into `_inject_userscripts` so that doesn't have to have a fallback
conditional inside it because thats an inversion of responsibility!

Pulling the remove scripts part into a seperate function and making it
the callers responsibilty to call that first would tidy it up a little
more but meh.

I was worried about just doing `_widget.page().urlChanged.connect()`
once at tab init, where before it was connected at page init, because I
was under the impression that the child page can be replaced at any
time, eg when navigating to a new origin. But under manual testing I
didn't see that at all. Maybe I was mistaken or maybe that only started
in a later Qt version.
2018-06-26 16:42:31 +12:00