Commit Graph

2757 Commits

Author SHA1 Message Date
qutebrowser bot 120e1efed5 Update dependencies 2023-04-24 04:24:26 +00:00
qutebrowser bot 88985aeaa0 Update dependencies 2023-04-17 04:21:54 +00:00
qutebrowser bot b169ace4d2 Update dependencies 2023-04-14 18:57:08 +00:00
Florian Bruhin 30e70803d0 ci: Add PyQt 6.5
See #7624
2023-04-10 23:25:15 +02:00
qutebrowser bot 734ff1c176 Update dependencies 2023-04-10 04:21:37 +00:00
qutebrowser bot 9ff100f0d5 Update dependencies 2023-04-03 04:24:13 +00:00
qutebrowser bot 397818cfa3 Update dependencies 2023-03-20 04:23:50 +00:00
Florian Bruhin 4793070db3 Merge branch 'qt6-v2' into master-qt6 2023-03-17 20:30:13 +01:00
Florian Bruhin da7bde4f1b Release v2.5.4 2023-03-13 22:07:16 +01:00
qutebrowser bot 5f9bf903ec Update dependencies 2023-03-06 04:20:42 +00:00
qutebrowser bot a70868a8cc Update dependencies 2023-02-27 04:20:42 +00:00
Eolien55 faf692657c misc/userscripts/ripbang: Use lite.duckduckgo
The previous way of obtaining the Bang's URL was using the
response's body, using the url atrribute of a meta tag. The way
this was handled was a bit problematic: some URLs were of the format
/l/?uddg=<URL>&<some-other-query-arguments>, while others (such as google)
is simply <URL>. This could have been fixed by using an if-else, but I
preferred another approach. Lite DuckDuckGo sends a 303 response when
using Bangs, instead of a 200 response which makes the redirect. The
location header of the 303 response is the search engine's URL, so it's
easy to implement this function, working for both afformentioned URL
templates.
2023-02-26 15:47:13 +01:00
qutebrowser bot c3f09f61b8 Update dependencies 2023-02-20 04:21:03 +00:00
Florian Bruhin f8c4a6ac3f Release v2.5.3 2023-02-17 11:13:45 +01:00
qutebrowser bot 6b095720f5 Update dependencies 2023-02-13 04:21:48 +00:00
qutebrowser bot 7dacc89d2a Update dependencies 2023-02-06 04:22:25 +00:00
toofar 560f3ab756 unpin astroid
Looks like the upstream bug is fixed now.

I didn't run recompile-requirements because it requires py3.7 for the
pylint file and I don't have that. The robot will run overnight anyway
(and pick up a new pylint release)

ref: 085a7956eb
2023-02-05 18:48:59 +13:00
qutebrowser bot 059b806109 Update dependencies 2023-01-30 04:22:10 +00:00
qutebrowser bot afc89c7f72 Update dependencies 2023-01-23 04:23:15 +00:00
Takahashi, Naoki 77a5eec4eb
Fix: Add `-p` to examples
Usage of the following example is not available unless `-p` is added.

    `usage: tor_identity [-h] [-c CONTROL_PORT] [-p PASSWORD]`
2023-01-21 02:04:46 +09:00
Florian Bruhin 085a7956eb requirements: Avoid astroid 2.13
See https://github.com/PyCQA/astroid/issues/1958
2023-01-10 11:30:34 +01:00
qutebrowser bot 8a4fa5b17d Update dependencies 2023-01-09 04:23:27 +00:00
qutebrowser bot 90d79e20de Update dependencies 2023-01-02 04:21:53 +00:00
qutebrowser bot 07272a8d01 Update dependencies 2022-12-26 04:22:30 +00:00
qutebrowser bot 73278cc0a4 Update dependencies 2022-12-19 04:22:21 +00:00
Florian Bruhin b4d32e04f4 Merge branch 'master' into qt6-v2 2022-12-13 09:05:32 +01:00
Florian Bruhin 5afc8a6819 Make shellcheck happy again about password_fill
v0.9.0 seems to add SC2317 ("Command appears to be unreachable."):
https://www.shellcheck.net/wiki/SC2317

This adds various false-positives in password_fill, let's just ignore
those...

Also see: https://github.com/koalaman/shellcheck/issues/2613
2022-12-13 08:59:48 +01:00
qutebrowser bot 7ef74dc82d Update dependencies 2022-12-12 12:52:23 +00:00
Florian Bruhin af176f749f scripts: Use pip-installed asciidoc
Fixes #7352, closes #6793
2022-12-12 11:06:28 +01:00
qutebrowser bot dc5ef397c9 Update dependencies 2022-12-05 04:22:56 +00:00
Florian Bruhin 938392f93d requirements: Drop flake8-copyright for now
See #7499, #7104 and https://github.com/savoirfairelinux/flake8-copyright/issues/19
2022-11-28 10:40:48 +01:00
qutebrowser bot 4c9ea9fb7d Update dependencies 2022-11-28 04:21:58 +00:00
Florian Bruhin a497ce69be tox/ci: Add PyQt 6.4 2022-11-24 09:26:30 +01:00
qutebrowser bot 6cf333c33a Update dependencies 2022-11-21 04:22:59 +00:00
Florian Bruhin b831e1283d bleeding requirements: Switch back to pytest-instafail master 2022-11-20 10:35:21 +01:00
toofar 2d66466194 Merge branch 'master' into qt6-v2
Just a few conflicts around CI and dependencies.
2022-11-20 15:48:00 +13:00
qutebrowser bot 7bf1b4af5d Update dependencies 2022-11-14 04:28:37 +00:00
qutebrowser bot 28d9ae821c Update dependencies 2022-11-07 04:33:30 +00:00
qutebrowser bot 39f817d57b Update dependencies 2022-11-03 11:04:19 +00:00
qutebrowser bot 1dc5b97547 Update dependencies 2022-10-31 04:37:38 +00:00
Florian Bruhin dbcc0e2514 userscripts: Fix scammy link
See #6516
2022-10-26 22:38:08 +02:00
Florian Bruhin c2f56a753b doc: Add mister_monster userscripts 2022-10-24 17:13:11 +02:00
qutebrowser bot b4283be06c Update dependencies 2022-10-24 04:59:10 +00:00
qutebrowser bot a8d7f7540e Update dependencies 2022-10-17 04:58:45 +00:00
Florian Bruhin 8d2ed00731 Merge remote-tracking branch 'origin/pr/7426' 2022-10-10 09:50:32 +02:00
Florian Bruhin 661b3e0ab5 requirements: Skip flake8-deprecated 2.0.0
See https://github.com/gforcada/flake8-deprecated/issues/19
2022-10-10 09:41:48 +02:00
qutebrowser bot a7c2a690e4 Update dependencies 2022-10-10 04:51:44 +00:00
Florian Bruhin c596dae600 bleeding tests: Switch back to pytest-benchmark master
https://github.com/ionelmc/pytest-benchmark/pull/224 was merged
2022-10-09 10:57:47 +02:00
Jon Higgs 5a88094435 Send source URL to Breadability
Used to construct fully-qualified URLs from relative links. Without it
you get broken images and links.
2022-10-08 12:44:01 +11:00
Florian Bruhin 208be25da4 bleeding tests: Use forks of pytest-benchmark and -instafail
See https://github.com/pytest-dev/pytest/pull/9118
2022-10-07 12:26:30 +02:00
qutebrowser bot ed4615eb44 Update dependencies 2022-10-03 04:36:58 +00:00
qutebrowser bot 1d90b8d95b Update dependencies 2022-09-26 04:55:52 +00:00
qutebrowser bot 2f9ba78852 Update dependencies 2022-09-19 09:03:18 +00:00
Florian Bruhin ecd7565aff requirements: Work around limitations for macOS-specific deps
Also see #3526
2022-09-19 10:51:27 +02:00
Florian Bruhin 46ebef5644 mypy: Use tox.ini to install PyQt6 conditionally
The changes in requirements-mypy.txt would get overwritten on the next
dependency update. Also, it looks like we don't actually need PyQt6 (or
the PyQt6 stubs) available for checking PyQt 5 code if all Qt 6 imports
are appropriately gated by conditionals mypy knows about.

Follow-up to c1738ca550.
2022-09-16 14:13:50 +02:00
toofar e50bc92e9a remove leftover compiled requirements files
Leftover from 62515fecf0a64f ref #7091
2022-09-16 17:13:05 +12:00
toofar c1738ca550 tox: split mypy env into mypy-{qt5,qt6}
Would be nice to have a bare `mypy` env which ran both the more specific ones
in sequence but I don't know how to do that.

Not sure if there is a way to pull the CONSTANTS_ARGS stuff out to a non-env
parameter and pass it into commands but I couldn't figure out a way. So via
the environment it is.

TODO: compare PyQt6 as-is with the WIP PyQt6-Stub
2022-09-11 10:19:44 +12:00
Florian Bruhin 1963caa7c7 Make PyObjC/AppKit optional with Qt 6.3+ 2022-08-23 18:31:42 +02:00
Florian Bruhin 72c8609ad5 requirements: Switch back to PyInstaller release
macOS fix landed in PyInstaller 5.3
2022-08-23 18:31:42 +02:00
Florian Bruhin c8378d0872 Switch to PyInstaller master branch
Closes #7258
2022-08-23 18:31:42 +02:00
Florian Bruhin a46b09f9bc Upgrade to PyQt6 6.3.1 2022-08-23 18:31:42 +02:00
Florian Bruhin 42ab19b63b macOS: Use patched PyInstaller
See #7258
2022-08-23 18:31:42 +02:00
Florian Bruhin c29419b86a Adjust PyInstaller hiddenimports
_QOpenGLFunctions_2_0 was added in 2df9508e44 but
doesn't seem to be needed anymore. PyQt 6 doesn't seem to need any hiddenimports
at all.
2022-08-23 18:31:41 +02:00
Florian Bruhin c0ffd6d327 scripts: Pass through Qt 6 to PyInstaller 2022-08-23 18:31:41 +02:00
Florian Bruhin 9212ba94d6 scripts: Allow linking/installing pyqt-5 or pyqt-6 2022-08-23 18:31:41 +02:00
Florian Bruhin c5a51eb0bc Drop Qt < 5.15
Fixes #7091

TODO: Add changelog
2022-08-23 18:31:41 +02:00
Florian Bruhin 0428ede31e Add test environments for Qt 6.2 and 6.3 2022-08-23 18:31:40 +02:00
Florian Bruhin 3dd969e731 Merge remote-tracking branch 'origin/pr/7293' 2022-08-23 17:58:09 +02:00
Florian Bruhin 21c82b029b doc: Add qute-containers to README 2022-08-22 15:19:29 +02:00
qutebrowser bot 696be85892 Update dependencies 2022-08-22 04:48:16 +00:00
qutebrowser bot b731fb49d7 Update dependencies 2022-08-15 04:45:36 +00:00
qutebrowser bot b51c416869 Update dependencies 2022-08-08 04:28:07 +00:00
Florian Bruhin ea077cece9 flake8: Reenable flake8-copyright and flake8-future-import
Partial revert of faf04f3791
2022-08-03 15:21:26 +02:00
Florian Bruhin faf04f3791 flake8: Remove broken plugins
https://github.com/PyCQA/flake8/issues/325
https://github.com/savoirfairelinux/flake8-copyright/pull/9
https://github.com/xZise/flake8-future-import/issues/25
https://github.com/aleGpereira/flake8-mock/issues/10
2022-08-01 13:35:45 +02:00
qutebrowser bot 2d04e37a9f Update dependencies 2022-08-01 04:48:27 +00:00
Alessio Bogon 33d7af52c0
Use pytest-bdd:master again
https://github.com/pytest-dev/pytest-bdd/issues/542 should be fixed now
2022-07-27 21:35:26 +02:00
qutebrowser bot 1838f87f75 Update dependencies 2022-07-18 04:37:01 +00:00
Florian Bruhin 820d81374b bleeding requirements: Back to pytest-bdd release
See https://github.com/pytest-dev/pytest-bdd/issues/542

Reverts 99f65a13e7
2022-07-17 12:42:13 +02:00
qutebrowser bot d7fa17e5e3 Update dependencies 2022-07-12 14:57:00 +00:00
Florian Bruhin 63caa39a2a qute-pass: Remove feedback line
Closes #7301
2022-07-11 11:29:19 +02:00
Florian Bruhin 10e4429f1e Merge remote-tracking branch 'origin/pr/7304' 2022-07-11 11:15:30 +02:00
qutebrowser bot d16bbdbdc3 Update dependencies 2022-07-11 04:29:18 +00:00
kt programs c6f326b95b macOS: add MHTML file type to handled files 2022-07-10 22:21:38 +08:00
Florian Bruhin ed35a2c277 requirements: Upgrade to pytest-bdd 6.0.0
https://github.com/pytest-dev/pytest-bdd/issues/447 has been fixed
2022-07-05 11:16:07 +02:00
kt programs 389eac1bb3 macOS: fix hide_decoration making window nonresizable
Use PyObjC to call `setWindowMask:` with resizable flag on the
underlying NSWindow.

Fixes #4067
2022-07-05 17:14:05 +08:00
Florian Bruhin 99f65a13e7 bleeding requirements: Back to pytest-bdd master
See https://github.com/pytest-dev/pytest-bdd/pull/524
2022-07-05 11:08:12 +02:00
qutebrowser bot 33505fb6bc Update dependencies 2022-07-04 04:39:06 +00:00
qutebrowser bot 2d487be5b9 Update dependencies 2022-06-27 04:40:19 +00:00
Florian Bruhin 98990715a6 Release v2.5.2 2022-06-22 15:31:18 +02:00
qutebrowser bot 0f8fc3b9df Update dependencies 2022-06-20 04:26:13 +00:00
Florian Bruhin 46de10722c build-release: Move macOS Info.plist back to PyInstaller .spec
The patching was originally introduced back in 2017 in #3055, when
PyInstaller only supported very basic Info.plist operations.

This changed in 2018 (!) however, with PyInstaller 3.4:
https://pyinstaller.org/en/stable/CHANGES-3.html#id8
https://github.com/pyinstaller/pyinstaller/pull/3532

Thus, let's move this back to PyInstaller. This produces exactly the
same Info.plist as before.

Fixes #7251
2022-06-16 17:52:35 +02:00
Florian Bruhin 7fc4a3da62 Merge remote-tracking branch 'origin/pr/6456' 2022-06-14 14:17:07 +02:00
Florian Bruhin 8c887bdba3 Merge remote-tracking branch 'origin/pr/7124' 2022-06-13 12:24:16 +02:00
Florian Bruhin 870fccb366 Merge remote-tracking branch 'origin/pr/7196' 2022-06-13 11:26:43 +02:00
Florian Bruhin 91d01f1393 Merge remote-tracking branch 'origin/pr/7168' 2022-06-13 11:19:46 +02:00
qutebrowser bot 29bcae5409 Update dependencies 2022-06-13 04:32:43 +00:00
mkonig 9538cbe9e7
Merge branch 'qutebrowser:master' into master 2022-06-07 13:16:55 +02:00
qutebrowser bot 066bc4fe1c Update dependencies 2022-06-06 04:26:30 +00:00
Rijnder Wever 12fcff9fe8
Remove superfluous css
It makes no sense to force text to be white, especially for users that already use a white background. I probably included this line by mistake.
2022-06-03 16:46:05 +02:00
mkonig cb800234ed
Merge branch 'qutebrowser:master' into master 2022-06-03 07:43:07 +02:00
qutebrowser bot d66dc0141c Update dependencies 2022-05-30 04:29:05 +00:00
Florian Bruhin 8f21b6fd9f Release v2.5.1 2022-05-26 14:06:03 +02:00
mkonig cfbbd59ce4
Merge branch 'qutebrowser:master' into master 2022-05-23 09:50:37 +02:00
qutebrowser bot 1dbe9c7f62 Update dependencies 2022-05-23 04:27:15 +00:00
Markus Blöchl 6c1d6dd2c5 qute-keepassxc: Add support for TOTP 2022-05-21 22:45:27 +02:00
Markus Blöchl f738ca3b0c qute-keepassxc: Use rofi to select from multiple matching accounts 2022-05-21 22:45:27 +02:00
Markus Blöchl 885081d4e4 qute-keepassxc: Trigger database unlock when querying credentials 2022-05-21 22:45:27 +02:00
Florian Bruhin 409a2990a8 Revert "Workaround PyInstaller 5.0 icon finding"
This reverts commit 07ce034983.

Should be fixed in PyInstaller 5.1 now.
2022-05-19 15:48:28 +02:00
qutebrowser bot 5ef10e2f92 Update dependencies 2022-05-19 13:45:28 +00:00
toofar bd99d2eaab
Merge pull request #7186 from qutebrowser/update-dependencies
Update dependencies
2022-05-18 20:25:42 +12:00
Florian Bruhin dafddad1d4 Remove icdiff remains 2022-05-17 15:43:58 +02:00
mkonig b6c3c73998
Merge branch 'qutebrowser:master' into master 2022-05-17 13:57:45 +02:00
qutebrowser bot 2f5b058e85 Update dependencies 2022-05-16 04:21:56 +00:00
Lars Rustand d6f343cfd4
Add window and private options for qutedmenu 2022-05-13 21:41:50 +02:00
Florian Bruhin 047a44c4c1 requirements: Remove icdiff
The native pytest output often seems better
2022-05-12 08:38:05 +02:00
Florian Bruhin f2c969da58 Merge branch 'update-dependencies' 2022-05-10 14:47:46 +02:00
Florian Bruhin a4faea260c Revert "Skip astroid 2.11.3"
This reverts commit 39fa36e223.
2022-05-10 13:44:02 +02:00
mkonig 1ee1e37b29
Merge branch 'qutebrowser:master' into master 2022-05-10 07:34:17 +02:00
Florian Bruhin 838c435896 docs: Add qute-1password 2022-05-09 18:11:11 +02:00
qutebrowser bot a58e2e6362 Update dependencies 2022-05-09 04:26:26 +00:00
qutebrowser bot 2cb168294e Update dependencies 2022-05-02 04:37:49 +00:00
mkonig 55d1c9bb8b
Merge branch 'qutebrowser:master' into master 2022-04-29 09:06:29 +02:00
Benjamin Schnitzler 9c9d7defc8 link to "pseudo per domain stylesheets" userscript in userscripts readme 2022-04-28 23:13:38 +02:00
qutebrowser bot 5d5f009753 Update dependencies 2022-04-25 16:07:51 +00:00
Florian Bruhin 39fa36e223 Skip astroid 2.11.3
See https://github.com/PyCQA/pylint/issues/6438#issuecomment-1108747642
2022-04-25 17:55:36 +02:00
Florian Bruhin a20bb67a87 mypy: Upgrade to PyQt5-stubs 5.15.6.0
For some unknown reason, those new stubs cause a *lot* of things now to be
checked by mypy which formerly probably got skipped due to Any being implied
somewhere.

The stubs themselves mainly improved, with a couple of regressions too.

In total, there were some 337 (!) new mypy errors. This commit fixes almost all
of them, and the next commit improves a fix to get things down to 0 errors
again.

Overview of the changes:

==== qutebrowser/app.py

- Drop type ignore due to improved stubs.

==== qutebrowser/browser/browsertab.py

- Specify the type of _widget members more closely than just QWidget.
  This is debatable: I suppose the abstract stuff shouldn't need to know
  anything about the concrete backends at all. But it seems like we cut some
  corners when initially implementing things, and put some code in browsertab.py
  just because the APIs of both backends happened to be compatible. Perhaps
  something to reconsider once we drop QtWebKit and hopefully implement a dummy
  backend.

- Add an additional assertion in AbstractAction.run_string. This is already
  covered by the isinstance(member, self.action_base) above it, but that's too
  dynamic for mypy to understand.

- Fix the return type of AbstractScroller.pos_px, which is a QPoint (with x
  and y components), not a single int.

- Fix the return type of AbstractScroller.pos_perc, which is a Tuple (with x
  and y components), not a single int.

- Fix the argument types of AbstractScroller.to_perc, as it's possible to pass
  fractional percentages too.

- Specify the type for AbstractHistoryPrivate._history. See above (_widget) re
  this being debatable.

- Fix the return type of AbstractTabPrivate.event_target(), which can be None
  (see #3888).

- Fix the return type of AbstractTabPrivate.run_js_sync, which is Any (the JS
  return value), not None.

- Fix the argument type for AbstractTabPrivate.toggle_inspector: position can
  be None to use the last used position.

- Declare the type of sub-objects of AbstractTab.

- Fix the return value of AbstractTab.icon(), which is the QIcon, not None.

==== qutebrowser/browser/commands.py

- Make sure the active window is a MainWindow (with a .win_id attribute).

==== qutebrowser/browser/downloadview.py

- Add _model() which makes sure that self.model() is a DownloadModel, not None
  or any other model. This is needed because other methods access a variety of
  custom attributes on it, e.g. last_index().

==== qutebrowser/browser/greasemonkey.py

- Add an ignore for AbstractDownload.requested_url which we patch onto the
  downloads. Probably would be nicer to add it as a proper attribute which always
  gets set by the DownloadManager.

==== qutebrowser/browser/hints.py

- Remove type ignores for QUrl.toString().
- Add a new type ignore for combining different URL flags (which works, but is
  not exactly type safe... still probably a regression in the stubs).
- Make sure the things we get back from self._get_keyparser are what we actually
  expect. Probably should introduce a TypedDict (and/or overloads for
  _get_keyparser with typing.Literal) to teach mypy about the exact return value.
  See #7098.
  This is needed because we access Hint/NormalKeyParser-specific attributes such
  as .set_inhibited_timout() or .update_bindings().

==== qutebrowser/browser/inspector.py

- Similar changes than in browsertab.py to make some types where we share API
  (e.g. .setPage()) more concrete. Didn't work out unfortunately, see next
  commit.

==== qutebrowser/browser/network/pac.py

- Remove now unneeded type ignore for signal.

==== qutebrowser/browser/qtnetworkdownloads.py

- Make sure that downloads is a qtnetworkdownloads.DownloadItem (rather than an
  AbstractDownload), so that we can call ._uses_nam() on it.

==== qutebrowser/browser/qutescheme.py

- Remove now unneeded type ignore for QUrl flags.

==== qutebrowser/browser/urlmarks.py

- Specify the type of UrlMarkManager._lineparser, as those only get initialized
  in _init_lineparser of subclasses, so mypy doesn't know it's supposed to exist.

==== qutebrowser/browser/webelem.py

- New casts to turn single KeyboardModifier (enum) entries into
  KeyboardModifiers (flags). Might not be needed anymore with Qt 6.
- With that, casting the final value is now unneeded.

==== qutebrowser/browser/webengine/notification.py

- Remove now unneeded type ignore for signal.
- Make sure the self.sender() we get in HerbeNotificationAdapter._on_finished()
  is a QProcess, not just any QObject.

==== qutebrowser/browser/webengine/webenginedownloads.py

- Remove now unneeded type ignores for signals.

==== qutebrowser/browser/webengine/webengineelem.py

- Specify the type of WebEngineElement._tab.
- Remove now unneeded type ignore for mixed flags.

==== qutebrowser/browser/webengine/webengineinspector.py

- See changes to inspector.py and next commit.
- Remove now unneeded type ignore for signal.

==== qutebrowser/browser/webengine/webenginequtescheme.py

- Remove now unneeded type ignore for mixed flags.

==== qutebrowser/browser/webengine/webenginesettings.py

- Ignore access of .setter attribute which we patch onto QWebEngineProfile.
  Would be nice to have a subclass or wrapper-class instead.

==== qutebrowser/browser/webengine/webenginetab.py

- Specified the type of _widget members more closely than just QWidget.
  See browsertab.py changes for details.
- Remove some now-unneeded type ignores for creating FindFlags.
- Specify more concrete types for WebEngineTab members where we actually need to
  access WebEngine-specific attributes.
- Make sure the page we get is our custom WebEnginePage subclass, not just any
  QWebEnginePage. This is needed because we access custom attributes on it.

==== qutebrowser/browser/webengine/webview.py

- Make sure the page we get is our custom WebEnginePage subclass, not just any
  QWebEnginePage. This is needed because we access custom attributes on it.

==== qutebrowser/browser/webkit/network/networkreply.py

- Remove now unneeded type ignores for signals.

==== qutebrowser/browser/webkit/webkitinspector.py

- See changes to inspector.py and next commit.

==== qutebrowser/browser/webkit/webkittab.py

- Specify the type of _widget members more closely than just QWidget.
  See browsertab.py changes for details.
- Add a type ignore for WebKitAction because our workaround needs to
  treat them as ints (which is allowed by PyQt, even if not type-safe).
- Add new ignores for findText calls: The text is a QString and can be None; the
  flags are valid despite mypy thinking they aren't (stubs regression?).
- Specify the type for WebKitHistoryPrivate._history, because we access
  WebKit-specific attributes. See above (_widget) re this being debatable.
- Make mypy aware that .currentFrame() and .frameAt() can return None (stubs
  regression?).
- Make sure the .page() and .page().networkAccessManager() are our subclasses
  rather than the more generic QtWebKit objects, as we use custom attributes.
- Add new type ignores for signals (stubs regression!)

==== qutebrowser/browser/webkit/webpage.py

- Make sure the .networkAccessManager() is our subclass rather than the more
  generic QtWebKit object, as we use custom attributes.
- Replace a cast by a type ignore. The cast didn't work anymore.

==== qutebrowser/browser/webkit/webview.py

- Make sure the .page() is our subclass rather than the more generic QtWebKit
  object, as we use custom attributes.

==== qutebrowser/commands/userscripts.py

- Remove now unneeded type ignore for signal.

==== qutebrowser/completion/completer.py

- Add a new _completion() getter (which ensures it actually gets the completion
  view) rather than accessing the .parent() directly (which could be any QObject).

==== qutebrowser/completion/completiondelegate.py

- Make sure self.parent() is a CompletionView (no helper method as there is only
  one instance).
- Remove a now-unneeded type ignore for adding QSizes.

==== qutebrowser/completion/completionwidget.py

- Add a ._model() getter which ensures that we get a CompletionModel (with
  custom attributes) rather than Qt's .model() which can be any QAbstractItemModel
  (or None).
- Removed a now-unneeded type ignore for OR-ing flags.

==== qutebrowser/completion/models/completionmodel.py

- Remove now unneeded type ignores for signals.
- Ignore a complaint about .set_pattern() not being defined. Completion
  categories don't share any common parent class, so it would be good to introduce
  a typing.Protocol for this. See #7098.

==== qutebrowser/components/misccommands.py

- Removed a now-unneeded type ignore for OR-ing flags.

==== qutebrowser/components/readlinecommands.py

- Make sure QApplication.instance() is a QApplication (and not just a
  QCoreApplication). This includes the former "not None" check.

==== qutebrowser/components/scrollcommands.py

- Add basic annotation for "funcs" dict. Could have a callable protocol to
  specify it needs a count kwarg, see #7098.

==== qutebrowser/config/stylesheet.py

- Correctly specify that stylesheet apply to QWidgets, not any QObject.
- Ignore an attr-defined for obj.STYLESHEET. Perhaps could somehow teach mypy
  about this with overloads and protocols (stylesheet for set_register being None
  => STYLESHEET needs to be defined, otherwise anything goes), but perhaps not
  worth the troble. See #7098.

==== qutebrowser/keyinput/keyutils.py

- Remove some now-unneeded type ignores and add a cast for using a single enum
  value as flags. Might need to look at this again with Qt 6 support.

==== qutebrowser/keyinput/modeman.py

- Add a FIXME for using a TypedDict, see comments for hints.py above.

==== qutebrowser/mainwindow/mainwindow.py

- Remove now-unneeded type ignores for calling with OR-ed flags.
- Improve where we cast from WindowType to WindowFlags, no int needed
- Use new .tab_bar() getter, see below.

==== qutebrowser/mainwindow/prompt.py

- Remove now-unneeded type ignores for calling with OR-ed flags.

==== qutebrowser/mainwindow/statusbar/bar.py

- Adjust type ignores around @pyqtProperty. The fact one is still needed seems
  like a stub regression.

==== qutebrowser/mainwindow/statusbar/command.py

- Fix type for setText() override (from QLineEdit): text can be None
  (QString in C++).

==== qutebrowser/mainwindow/statusbar/url.py

- Adjust type ignores around @pyqtProperty. The fact one is still needed seems
  like a stub regression.

==== qutebrowser/mainwindow/tabbedbrowser.py

- Specify that TabDeque manages browser tabs, not any QWidgets. It accesses
  AbstractTab-specific attributes.
- Make sure that the .tabBar() we get is a tabwidget.TabBar, as we access
  .maybe_hide.
- Fix the annotations for stored marks: Scroll positions are a QPoint, not int.
- Add _current_tab() and _tab_by_idx() wrappers for .currentWidget() and
  .widget(), which ensures that the return values are valid AbstractTabs (or None
  for _tab_by_idx). This is needed because we access AbstractTab-specific
  attributes.
- For some places, where the tab can be None, continue using .currentTab() but
  add asserts.
- Remove some now-unneeded [unreachable] ignores, as mypy knows about the None
  possibility now.

==== qutebrowser/mainwindow/tabwidget.py

- Add new tab_bar() and _tab_by_idx() helpers which check that the .tabBar() and
  .widget() are of type TabBar and AbstractTab, respectively.
- Add additional assertions where we expect ._tab_by_idx() to never be None.
- Remove dead code in get_tab_fields for handling a None y scroll position. I
  was unable to find any place in the code where this could be set to None.
- Remove some now-unneeded type ignores and casts, as mypy now knows that
  _type_by_idx() could be None.
- Work around a strange instance where mypy complains about not being able to
  find the type of TabBar.drag_in_progress from TabWidget._toggle_visibility,
  despite it clearly being shown as a bool *inside* that class without any
  annotation.
- Add a ._tab_widget() getter in TabBar which ensures that the .parent() is in
  fact a TabWidget.

==== qutebrowser/misc/crashsignal.py

- Remove now unneeded type ignores for signals.

==== qutebrowser/misc/editor.py

- Remove now unneeded type ignores for signals.

==== qutebrowser/misc/ipc.py

- Remove now unneeded type ignores for signals.
- Add new type ignores for .error() which is both a signal and a getter
  (stub regression?). Won't be relevant for Qt 6 anymore, as the signal was
  renamed to errorOccurred in 5.15.

==== qutebrowser/misc/objects.py

- Make sure mypy knows that objects.app is our custom Application (with custom
  attributes) rather than any QApplication.

==== qutebrowser/utils/objreg.py

- Ignore attr-defined for .win_id attributes. Maybe could add a typing.Protocol,
  but ideally, the whole objreg stuff should die one day anyways.

==== tests/unit/completion/test_completer.py

- Make CompletionWidgetStub inherit from CompletionView so that it passes the
  new isinstance() asserts in completer.py (see above).
2022-04-25 17:23:16 +02:00
Jimmy 6250cda2e1 Merge pull request #7123 from pylbrecht/bitwarden-userscript-url-matching
Fix qute-bitwarden userscript URL matching for multi level subdomains

The qute-bitwarden userscript is not able to autofill for a multi-level subdomain URLs (e.g. `http://my.sub.domain.local/`).
qute-bitwarden exits with status code 2 and returns the following on stderr:
```
No pass candidates for URL 'http://my.sub.domain.local/' found!
```
Joining the extracted subdomain and domain with a `.` solves the issue.
2022-04-25 14:37:11 +12:00
Florian Bruhin 07ce034983 Workaround PyInstaller 5.0 icon finding
See https://github.com/pyinstaller/pyinstaller/issues/6759

Fixes #7132, see #7129
2022-04-19 15:51:59 +02:00
Florian Bruhin 4617361a45 Revert "Avoid PyInstaller 5.0"
This reverts commit d98314799a.
2022-04-19 15:49:29 +02:00
Florian Bruhin d98314799a Avoid PyInstaller 5.0
See https://github.com/pyinstaller/pyinstaller/issues/6759
Follow-up to #7129
2022-04-19 15:10:23 +02:00
qutebrowser bot 171750c7e7 Update dependencies 2022-04-18 04:23:01 +00:00
Florian Bruhin 488dc175e0 doc: Adjust some PyQt5 references 2022-04-14 13:40:31 +02:00
bitraid 6bf7907c19
NSIS: Base icon choices on previous install
Closes #7109
2022-04-13 12:54:26 +03:00
bitraid a97ffe0bd0
NSIS: Get interface colors from system.
Fixes #7112
2022-04-13 12:43:54 +03:00
Philipp Albrecht dc83634e1a Join subdomain and domain with a dot 2022-04-13 10:14:49 +02:00
qutebrowser bot ec49047f12 Update dependencies 2022-04-11 04:22:43 +00:00
Florian Bruhin 3f31e36bc7 Merge remote-tracking branch 'origin/feat/remove_pyqt_resources_for_importlib' 2022-04-05 12:18:48 +02:00
Florian Bruhin 96425c93bf Merge remote-tracking branch 'origin/pr/7103' 2022-04-05 12:14:53 +02:00
Jimmy 78043bc4f8 fix more moved icons/ references
For Makefile installs (broke while copying stuff over) and pyinstaller
installs (broke on launch).
2022-04-05 08:45:15 +12:00
Florian Bruhin ab7a2ee558 Switch to Python 3.7 subprocess API
Follow-up for #6905
2022-04-04 16:58:31 +02:00
qutebrowser bot 5efd72470b Update dependencies 2022-04-04 09:09:33 +00:00
Florian Bruhin 0b0be06e54 Drop types-dataclasses
There is https://github.com/python/typeshed/blob/master/stdlib/dataclasses.pyi for the stdlib one
2022-04-04 09:33:18 +02:00
Jimmy e9ed6456fd Load icons via importlib.resources
The PyQt resources system is gone in 6.2 and deprecated before that. This
should be the last usage of it.

Switches icons to be read with `utils.resources.read_file_binary()` in
`notification.py` (fallback desktop notification icon) and `app.py` (icon for
the desktop window).

importlib only loads resources under a package, so the icons are moved under
the `qutebrowser/` directory.

Closes: #6062
2022-04-04 18:03:54 +12:00
Jimmy cd4429db25 Remove 3.6 pins from requirements files.
Then regenerate the relevant files.
Also drop dataclasses from requirements files.
TODO: should we drop the dataclasses-types requirement for mypy too?
2022-04-04 12:08:19 +12:00
Florian Bruhin 0a2940622c Fix some userscript syntax issues
Thanks to (a hacked) pyupgrade
2022-04-03 21:04:33 +02:00
Florian Bruhin 7580eca147 Actually mark qute-pass executable 2022-04-02 12:50:10 +02:00
Florian Bruhin 01a402dcfc Release v2.5.0 2022-04-01 16:59:20 +02:00
Florian Bruhin 3f58605ad1 Merge remote-tracking branch 'origin/pr/6543' 2022-03-31 21:14:40 +02:00
Florian Bruhin 50922bf620 Merge remote-tracking branch 'origin/pr/6957' 2022-03-31 14:40:33 +02:00
Florian Bruhin 887253f70c Add missing space 2022-03-31 14:37:20 +02:00
Florian Bruhin c832be9b95 Merge remote-tracking branch 'origin/pr/6996' 2022-03-31 14:37:01 +02:00
Florian Bruhin d671887777 Merge remote-tracking branch 'origin/pr/7048' 2022-03-31 12:06:13 +02:00
Florian Bruhin 0489f6a090 Merge remote-tracking branch 'origin/pr/7068' 2022-03-31 11:50:43 +02:00
Florian Bruhin f654c0fdfc cast userscript: Fix error message
Avoid SC2140 shellcheck false-positive: https://github.com/koalaman/shellcheck/issues/2479

Also remove extra quoting
2022-03-31 11:41:30 +02:00
Florian Bruhin 08fa205560 Merge remote-tracking branch 'origin/pr/7074' 2022-03-31 11:27:36 +02:00
Florian Bruhin 757532e568 Fix version specifiers for importlib-metadata 2022-03-30 13:57:56 +02:00
Florian Bruhin ab3fb74bb3 Do the Python 3.6 dance for pallets 2022-03-30 12:59:24 +02:00
qutebrowser bot da9ef56fa6 Update dependencies 2022-03-30 10:31:43 +00:00
Florian Bruhin 485b22a6ef requirements: Remove --use-feature=in-tree-build
This is the default now according to pip output
2022-03-30 11:56:34 +02:00
Florian Bruhin c0677c0f6f Do the Python 3.6 dance for Jinja2 2022-03-30 09:52:13 +02:00
Florian Bruhin 396442a7cd Do the Python 3.6 dance for importlib-resources 2022-03-29 22:16:20 +02:00
qutebrowser bot fe22b2b0b0 Update dependencies 2022-03-28 04:23:33 +00:00
David Vaughan 0321577cc3 Fix a couple tab lengths (cast) 2022-03-21 21:13:56 -07:00
David Vaughan 065edd67fa Change cast configuration to use an env var
Also some other small improvements / fixes.
2022-03-21 21:06:36 -07:00
qutebrowser bot 87b9dab1d8 Update dependencies 2022-03-21 04:23:12 +00:00
David Vaughan 88aa165d48 Disable shellcheck on source line (cast) 2022-03-16 16:46:12 -07:00
David Vaughan e38b31af0b Make cast dl program configurable (default yt-dlp)
I am making the yt-dl program used in the `cast` userscript
configurable, via a pattern borrowed from some of the other
userscripts here (e.g. `password_fill` and `kodi`): we look for an
optional "cast_rc" file in the qutebrowser config directory and source
it if it exists.

(Technically this allows for overriding any variables used in `cast`,
but this is in line with how the pattern works in the other scripts
already.)

If the config file is not found, we default to yt-dlp, and if that
doesn't exist then youtube-dl. If after all this no program is
available, we emit an error message

(note, the error messaging function as currently written in the cast script
seems broken and doesn't display the full error message, but fixing this
existing bug is outside of the scope of this change. May be good for a
followup).

I recognize there's some danger of breakage for some users by switching
the default to yt-dlp, but I think it's reasonable to assume that almost
everybody who has yt-dlp installed would prefer it to be used anyway.
Those who don't will experience no difference.
2022-03-16 16:39:57 -07:00
DavidRV00 3ba49366d1
Switch `cast` userscript from youtube-dl to yt-dlp
The `cast` userscript hasn't worked for me in a while, because it attempts to launch youtube-dl which has been replaced by yt-dlp for some time. Switching this one command gets `cast` working for me.
2022-03-15 23:30:36 -07:00
Joakim Hansen 3b54d45cd9 qute-pass: Support folder prefixes in gopass-mode 2022-03-14 12:36:11 +01:00
Florian Bruhin d4304511f3 requirements: Do the Python 3.6 dance 2022-03-14 09:14:58 +01:00
qutebrowser bot eb132a5830 Update dependencies 2022-03-14 04:20:38 +00:00
mkonig 75a714e7f0
Merge branch 'qutebrowser:master' into master 2022-03-09 09:19:41 +01:00
qutebrowser bot d50d9e8019 Update dependencies 2022-03-07 04:21:14 +00:00
Daniel Dimijian 68f683a8ad make url grabbing more robust 2022-03-02 10:59:30 -05:00
Daniel Dimijian 5eb57f4354 remove python 2 compatibility imports 2022-03-02 10:58:03 -05:00
Jetfrog28 b6c658a958
include qutebrowser in user agent
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2022-03-02 03:35:32 -05:00
Daniel Dimijian ed61390bde change user agent to ripbang 2022-03-02 02:24:22 -05:00
Daniel Dimijian b5c1cf9144 fix ripbang url snipping and set command 2022-03-02 01:54:18 -05:00
Daniel Dimijian dc50793d2d fix ripbang userscript for command line (not spawned) 2022-03-02 01:54:18 -05:00
qutebrowser bot bf16444389 Update dependencies 2022-02-28 04:21:34 +00:00
Jimmy 6e119a8508 pin tldextract for 3.6
I'm almost tempted to get pyenv working, almost.
2022-02-21 21:49:09 +13:00
Jimmy 0aa5558888 pin itsdangerous for python3.6
I wonder how many else will fail.
Also it would be nice if the compiled requirements files said where the
requirements come from, as in what they are dependencies of, if
anything. Like pip-compile does.
2022-02-21 21:32:08 +13:00
Jimmy fa232daa10 try to pin markupsafe for 3.6
Hopefully that works. This was confusing. Grepping for 3.6 to see how
other places pin it there were a bunch of normal pins in .txt files and
then some comment-but-actually-instruction comments in the -raw files.
There is a readme in the requirements folder but it just says what
instructions are allowed. Not why you would want to add them, seems to
very high cognitive load setup.
Trying to run the recompile_requirements.py script it did some stuff
then quit because it couldn't find python3.7. Yeah I don't have that
installed. It doesn't try to use pyenv or anything, just runs venv
expecting you have everything installed?
Turns out you take the name of the requirements file you added the
instructions to (eq requirements-test.txt-raw -> test) and run it with
that as argument. The requirements file you modify should be the highest
level one that mentions the requirement you want to pin.

Anyway I edited the qutebrowser.text-raw one because that seems like the
main one and it mentions MarkupSafe (because of jinja2?) and ran
`scripts/dev/recompile_requirements qutebrowser` in my existing venv.
Lets see what the CI thinks.

Also got lots of `pkg_resources==0.0.0` in a bunch of requirements files
which seems problematic.
2022-02-21 21:16:41 +13:00
qutebrowser bot 1d75436b7f Update dependencies 2022-02-21 04:20:20 +00:00
Florian Bruhin 21cf983501 Merge remote-tracking branch 'origin/update-dependencies' 2022-02-14 16:17:57 +01:00
Florian Bruhin 9624685703 Fix other license typo
See #7027
2022-02-14 16:17:04 +01:00
Marco A Parillo 1c1a32f9ac Fix typo in license 2022-02-14 10:02:08 -05:00
qutebrowser bot 8318f68ba9 Update dependencies 2022-02-14 04:22:19 +00:00
mkonig f9a1cef97b
Merge branch 'qutebrowser:master' into master 2022-02-07 10:52:35 +01:00
qutebrowser bot 729a857887 Update dependencies 2022-02-07 04:18:33 +00:00
qutebrowser bot 1228ea2c8c Update dependencies 2022-02-04 16:47:03 +00:00
mkonig e001d845b4
Merge branch 'qutebrowser:master' into master 2022-02-03 19:11:19 +01:00
Pierre-Albéric TROUPLIN 3f4f9649d9 Add link to personal userscripts 2022-02-03 14:27:37 +01:00
Florian Bruhin 387e165a7b requirements: Do the Python 3.6 dance 2022-02-02 22:12:01 +01:00
mkonig b9834afd69
Merge branch 'qutebrowser:master' into master 2022-02-01 09:30:35 +01:00
Florian Bruhin e45ece7227 Remove old requirements-pip.txt
The reason stated in ac0409c60d to keep it does not apply anymore, we have it in requirements-tox.txt now.
2022-01-31 09:16:07 +01:00
qutebrowser bot 9e80ff0a5c Update dependencies 2022-01-31 04:21:21 +00:00
qutebrowser bot 7395a43e53 Update dependencies 2022-01-24 04:21:13 +00:00
mkonig 761352ff6c
Merge branch 'qutebrowser:master' into master 2022-01-18 08:54:49 +01:00
qutebrowser bot fc894c798a Update dependencies 2022-01-17 04:20:25 +00:00
Jonas Belouadi 1256d013f0 Add yomichad to userscripts README.md 2022-01-15 15:00:02 +01:00
tinywrkb 2d44db28e2 userscripts/open_download: Wait for xdg-open exit code 2022-01-12 15:23:23 +02:00
tinywrkb d7a4c3a24d userscripts/open_download: Flatpak compatibility 2022-01-12 15:23:02 +02:00
Florian Bruhin 5c37937ad9 Don't install PyYAML from git for bleeding CI
Workaround for https://github.com/yaml/pyyaml/issues/601
2022-01-12 11:42:03 +01:00
mkonig 1888164f5a
Merge branch 'qutebrowser:master' into master 2022-01-12 10:25:15 +01:00
qutebrowser bot f5e91cb06e Update dependencies 2022-01-10 04:20:20 +00:00
Florian Bruhin 40c30dcd72 Merge remote-tracking branch 'origin/pr/6932' 2022-01-09 19:04:41 +01:00
mkonig 681151ac88
Merge branch 'qutebrowser:master' into master 2022-01-05 10:48:01 +01:00
Florian Bruhin f4714a9300 Use flake8-pytest-style 2022-01-04 10:30:24 +01:00
Florian Bruhin f60d340d16 requirements: Python 3.6 for zipp 2022-01-03 09:58:14 +01:00
qutebrowser bot 88b9fb83b9 Update dependencies 2022-01-03 04:20:17 +00:00
Eric Engestrom 5d0071b19c qute-bitwarden: let the user specify their password prompt
This allows it to work on Wayland (my use case), but also opens up the
possibility of using the system keychain to manage the password, or any
other method the user might want.
2022-01-02 17:46:15 +00:00
mkonig 01ced0af21
Merge branch 'qutebrowser:master' into master 2021-12-29 20:36:12 +01:00
Florian Bruhin 71833bbe06 requirements: More Python 3.6 stuff 2021-12-29 11:15:21 +01:00
qutebrowser bot cf99fa9bc9 Update dependencies 2021-12-27 11:08:26 +00:00
Florian Bruhin 1d0787f852 requirements: Do the Python 3.6 dance 2021-12-20 11:36:48 +01:00
qutebrowser bot 00b0ef3c1f Update dependencies 2021-12-20 04:21:35 +00:00
mkonig e53fb51e47
Merge branch 'qutebrowser:master' into master 2021-12-17 09:57:23 +01:00
qutebrowser bot 6b679d6362 Update dependencies 2021-12-13 04:22:18 +00:00
mkonig f045ef48b6
Merge branch 'qutebrowser:master' into master 2021-12-07 09:00:30 +01:00
mkonig 3027adc26b
Merge branch 'qutebrowser:master' into master 2021-12-06 08:05:58 +01:00
qutebrowser bot c792913c68 Update dependencies 2021-12-06 04:19:29 +00:00
Florian Bruhin 5e6bae3983 Merge branch 'packaging-update'
# Conflicts:
#	misc/requirements/requirements-dev.txt
2021-12-03 15:58:48 +01:00
qutebrowser bot de84f1dca2 Update dependencies 2021-12-03 14:30:13 +00:00
Florian Bruhin a580079206 scripts: Handle packaging dependencies via tox 2021-12-03 15:28:04 +01:00
Florian Bruhin d35839b16a requirements: Upgrade to pylint 2.12
We pinned pylint to < 2.5 due to this issue:
https://github.com/PyCQA/astroid/issues/772

...but then for some reaosn never unpinned it after the issue was fixed.
2021-12-02 16:15:12 +01:00
qutebrowser bot 75216f0e4a Update dependencies 2021-11-29 04:21:26 +00:00
qutebrowser bot c3f93b3e4f Update dependencies 2021-11-22 04:21:11 +00:00
qutebrowser bot 67b9b6f8a5 Update dependencies 2021-11-15 04:21:28 +00:00
Florian Bruhin fa806ad667 password_fill: Fix quoting for variable expansions
See https://github.com/koalaman/shellcheck/wiki/SC2295
2021-11-08 08:27:34 +01:00
qutebrowser bot 633efe85ac Update dependencies 2021-11-08 04:19:31 +00:00
Mirko König 13c6134e12 Fixed shellcheck issue 2021-11-01 12:17:37 +01:00
Mirko König cf9ad69a04 Token is stored with read write permissions for user only. 2021-11-01 12:13:53 +01:00
qutebrowser bot 389ccdc339 Update dependencies 2021-11-01 04:22:01 +00:00
Florian Bruhin 4558798043 Avoid pytest-bdd 5 for now
See https://github.com/pytest-dev/pytest-bdd/issues/447
2021-10-30 13:23:07 +02:00
qutebrowser bot 0e06d8db7b Update dependencies 2021-10-25 08:04:42 +00:00
Florian Bruhin 36ffff2f6b Release v2.4.0 2021-10-21 18:50:06 +02:00
qutebrowser bot 62958e54e0 Update dependencies 2021-10-21 16:34:33 +00:00
Florian Bruhin 9989bf223f requirements: PyQt 5.15.5 2021-10-21 18:02:49 +02:00
Florian Bruhin 959c388984 tox: Use newest PyQt for pyinstaller
See #6611
2021-10-21 16:51:55 +02:00
Florian Bruhin 5fb7d337fa Merge remote-tracking branch 'origin/update-dependencies' 2021-10-21 16:48:37 +02:00
Florian Bruhin 58e64d28c4 Don't register qutebrowserurl: as URL protocol
This was originally intended as a fix for CVE-2021-41146, but it turned out the
same exploit works via e.g. https:// just as well. Still, it makes sense to
remove it.
2021-10-21 16:01:54 +02:00
Florian Bruhin 8f46ba3f6d CVE-2021-41146: Add --untrusted-args to avoid argument injection
On Windows, if an application is registered as an URL handler like this:

    HKEY_CLASSES_ROOT
        https
            URL Protocol = ""
            [...]
            shell
                open
                    command
                    (Default) = ".../qutebrowser.exe" "%1"

one would think that Windows takes care of making sure URLs can't inject
arguments by containing a quote. However, this is not the case, as
stated by the Microsoft docs:
https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914(v=vs.85)

    Security Warning: Applications that handle URI schemes must consider how to
    respond to malicious data. Because handler applications can receive data
    from untrusted sources, the URI and other parameter values passed to the
    application may contain malicious data that attempts to exploit the handling
    application.

and

    As noted above, the string that is passed to a pluggable protocol handler
    might be broken across multiple parameters. Malicious parties could use
    additional quote or backslash characters to pass additional command line
    parameters. For this reason, pluggable protocol handlers should assume that
    any parameters on the command line could come from malicious parties, and
    carefully validate them. Applications that could initiate dangerous actions
    based on external data must first confirm those actions with the user. In
    addition, handling applications should be tested with URIs that are overly
    long or contain unexpected (or undesirable) character sequences.

Indeed it's trivial to pass a command to qutebrowser this way - given how
trivial the exploit is to recreate given the information above, here's a PoC:

    https:x" ":spawn calc

(or qutebrowserurl: instead of https: if qutebrowser isn't registered as a
default browser)

Some applications do escape the quote characters before calling
qutebrowser - but others, like Outlook Desktop or .url files, do not.

As a fix, we add an --untrusted-args flag and some early validation of the raw
sys.argv, before parsing any arguments or e.g. creating a QApplication (which
might already allow injecting Qt flags there).

We assume that there's no way for an attacker to inject flags *before* the %1
placeholder in the registry, and add --untrusted-args as the last argument of
the registry entry. This way, it'd still be possible for users to customize
their invocation flags without having to remove --untrusted-args.

After --untrusted-args, however, we have some rather strict checks:

- There should be zero or one arguments, but not two (or more)
- Any argument may not start with - (flag) or : (qutebrowser command)

We also add the --untrusted-args flag to the Linux .desktop file, though it
should not be needed there, as the specification there is sane:

https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables

    Implementations must take care not to expand field codes into multiple
    arguments unless explicitly instructed by this specification. This means
    that name fields, filenames and other replacements that can contain spaces
    must be passed as a single argument to the executable program after
    expansion.

There is no comparable mechanism on macOS, which opens the application without
arguments and then sends an "open" event to it:
https://doc.qt.io/qt-5/qfileopenevent.html

This issue was introduced in qutebrowser v1.7.0 which started registering it as
URL handler: baee288890 / #4086

This is by no means an issue isolated to qutebrowser. Many other projects have
had similar trouble with Windows' rather unexpected behavior:

Electron / Exodus Bitcoin wallet:
- http://web.archive.org/web/20190702112128/https://medium.com/0xcc/electrons-bug-shellexecute-to-blame-cacb433d0d62
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000006
- https://medium.com/hackernoon/exploiting-electron-rce-in-exodus-wallet-d9e6db13c374

IE/Firefox:

- https://bugzilla.mozilla.org/show_bug.cgi?id=384384
- https://bugzilla.mozilla.org/show_bug.cgi?id=1572838

Others:
- http://web.archive.org/web/20210930203632/https://www.vdoo.com/blog/exploiting-custom-protocol-handlers-in-windows
- https://parsiya.net/blog/2021-03-17-attack-surface-analysis-part-2-custom-protocol-handlers/
- etc. etc.

See CVE-2021-41146 / GHSA-vw27-fwjf-5qxm:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-41146
https://github.com/qutebrowser/qutebrowser/security/advisories/GHSA-vw27-fwjf-5qxm

Thanks to Ping Fan (Zetta) Ke of Valkyrie-X Security Research Group
(VXRL/@vxresearch) for finding and responsibly disclosing this issue.
2021-10-21 16:01:04 +02:00
qutebrowser bot 07cf1ff356 Update dependencies 2021-10-18 04:19:35 +00:00
qutebrowser bot a16951ca67 Update dependencies 2021-10-11 04:21:27 +00:00
Mirko König 3373bda4b9 Added token handling to make use of the cache. 2021-10-08 19:49:19 +02:00
qutebrowser bot a58bb22388 Update dependencies 2021-10-04 04:20:38 +00:00
Florian Bruhin efd002dae3 requirements: Revert to pytest-bdd release for bleeding
See https://github.com/pytest-dev/pytest-bdd/issues/447
2021-10-01 14:58:38 +02:00
Adrián Lattes 002db2c6b8
Add userscript bitwarden-rofi 2021-09-29 15:04:18 +02:00
mhmdanas b7f14d3bfb Fix a couple of minor mistakes 2021-09-27 20:46:22 +03:00
qutebrowser bot 4ddb008a27 Update dependencies 2021-09-27 04:20:00 +00:00
qutebrowser bot 7c98cc981d Update dependencies 2021-09-20 08:19:52 +00:00
Florian Bruhin 2b28ab015d Revert "requirements: Use older pluggy"
This reverts commit 41febf9475.

diff_cover now requires pluggy >=1.0.0.
2021-09-20 10:00:18 +02:00
Mirko König b5815e6113 Prevent pasting secrets to the wrong page. 2021-09-14 08:22:33 +02:00
qutebrowser bot 9a210fcef4 Update dependencies 2021-09-13 07:40:03 +00:00
Florian Bruhin caf6345251 requirements: Test --use-feature=in-tree-build 2021-09-13 08:38:45 +02:00
Florian Bruhin 41febf9475 requirements: Use older pluggy
See https://github.com/Bachmann1234/diff_cover/issues/249
2021-09-13 08:30:52 +02:00
Mirko König 1ad1771e64 : Added double quotes to fix error reported by shellcheck. 2021-09-06 07:08:58 +02:00
Florian Bruhin 650d9e4c34 Fix paths for scripts/dev/gen_resources.py 2021-09-04 17:39:58 +02:00
qutebrowser bot 280fa01091 Update dependencies 2021-08-30 04:21:44 +00:00
qutebrowser bot e015483639 Update dependencies 2021-08-23 04:20:14 +00:00
Florian Bruhin 5dec8e13c5 Merge remote-tracking branch 'origin/pr/6633' 2021-08-21 16:35:58 +02:00
Florian Bruhin 222755d0e9 Merge remote-tracking branch 'origin/pr/6634' 2021-08-21 16:33:19 +02:00
André Keller bc0fd73450 Optionally provide unfiltered selection of secrets
Add an option to show all secrets, whether they match the current url
or not.
2021-08-18 10:50:15 +02:00
qutebrowser bot b16568ebae Update dependencies 2021-08-16 04:20:00 +00:00
Mirko König 7f2e3bcd4a Listing all possible entries when website
could not be found is fixed.
2021-08-09 10:44:26 +02:00
André Keller 6ba917d5ec Optionally ask for confirmation before inserting a password
The default behaviour of qute-pass userscript will insert a password
automatically if there is only a single candidate found. This option will
force the selection prompt (i.e. dmenu) to show regardless of how many
password candidates are found.
2021-08-03 14:54:21 +02:00
qutebrowser bot 1bb597cf6b Update dependencies 2021-08-02 04:21:39 +00:00
Florian Bruhin 26de32045b Release v2.3.1 2021-07-28 14:34:24 +02:00
qutebrowser bot 107cae6fae Update dependencies 2021-07-26 04:18:36 +00:00
qutebrowser bot ce5b377093 Update dependencies 2021-07-19 04:19:54 +00:00
Jason Rosenzweig c7b48deea8
Made implementation simpler, removed unrelated change 2021-07-13 20:52:06 +08:00
Jason Rosenzweig f2cc3fa731
Initial commit of fix for issue 6549 2021-07-13 18:56:20 +08:00
Florian Bruhin cc8e67962b qute-keepass: Add missing exit
Closes #6592
2021-07-13 10:50:38 +02:00
qutebrowser bot 0b05d7f3ef Update dependencies 2021-07-12 04:19:50 +00:00
Florian Bruhin efeeaa2826
Merge pull request #6582 from qutebrowser/update-dependencies
Update dependencies
2021-07-06 16:31:40 +02:00
Florian Bruhin 71d2f46f2b doc: Add userscript repo link 2021-07-06 11:47:04 +02:00
qutebrowser bot fd537691d8 Update dependencies 2021-07-05 04:19:02 +00:00
Florian Bruhin d6a3d1fe60 Merge remote-tracking branch 'origin/pr/6574' 2021-06-28 17:55:53 +02:00
Florian Bruhin a55355eaa6 Release v2.3.0 2021-06-28 17:29:52 +02:00
qutebrowser bot 395f80ed77 Update dependencies 2021-06-28 04:20:03 +00:00
Florian Bruhin ae4520884c doc: Add untrack-url
See #6555
2021-06-21 11:32:26 +02:00
qutebrowser bot 0198148989 Update dependencies 2021-06-21 04:21:09 +00:00
Mirko König 8653a1d37d : Added qute-1pass to README. 2021-06-18 14:03:51 +02:00
Mirko König 468401eecc : Fixed some issues reported by the CI checks. Some change in jq query. 2021-06-17 14:14:57 +02:00
Florian Bruhin 698d2d6b8b Add new types packages for mypy
See http://mypy-lang.blogspot.com/2021/05/the-upcoming-switch-to-modular-typeshed.html
2021-06-14 12:19:25 +02:00
qutebrowser bot f411c7c769 Update dependencies 2021-06-14 04:21:35 +00:00
zocker-160 7f73b20e34 fix bug in keepassxc user script when using --insecure 2021-06-12 13:11:55 +02:00
Mirko König d2e2c8a8b3 Removed old line that was commented. 2021-06-10 09:39:48 +02:00
qutebrowser bot 7348d4b538 Update dependencies 2021-06-07 04:46:39 +00:00
Sidharth Arya 6219592e47
Update README.md 2021-06-04 19:44:43 +05:30
Sidharth Arya 7e7ef7439b
Update README.md 2021-06-04 18:27:19 +05:30
Florian Bruhin 93d21b475e
Merge pull request #6490 from rien333/patch-1
[readability-js] Add reference to AUR package
2021-06-02 15:46:15 +02:00
Florian Bruhin 948e878d39 Release v2.2.3 2021-06-01 18:32:13 +02:00
bitraid 74cf64a063
Windows Uninstaller: Fix silent uninstall (again) 2021-06-01 18:57:54 +03:00
Florian Bruhin 1d499b7d57 Merge remote-tracking branch 'origin/pr/6498' 2021-06-01 16:48:48 +02:00
bitraid 78d4a9d41b
Windows Installer: Allow elevation when silent 2021-05-31 14:06:09 +03:00
Mirko König 235b0ba539 : Multiple url per login are considered. 2021-05-31 08:41:07 +02:00
qutebrowser bot 6155482743 Update dependencies 2021-05-31 05:11:16 +00:00
Rijnder Wever a0ac31e0eb
Add reference to AUR package
I just added the readability package to the [AUR](https://aur.archlinux.org/packages/nodejs-readability-git/).

Not much of a difference from using npm directly, but, personally,  (i) I prefer to manage all my (important) packages using yay, and (ii) like to perform all system upgrades from one place (i.e. yay --devel).
2021-05-30 00:36:41 +02:00