Commit Graph

14107 Commits

Author SHA1 Message Date
Charles Kerr
8afbfecadb refactor: re-enable some clang-tidy checks in qt/ (#2585)
* chore: re-enable readability-static-accessed-through-instance test in qt

* chore: re-enable clang-diagnostic-nonportable-system-include-path check in qt/

* chore: re-enable clang-diagnostic-undefined-reinterpret-cast test in qt/

* chore: re-enable cert-err58-cpp check in qt/

* chore: re-enable clang-diagnostic-switch-enum check in qt/

* chore: re-enable modernize-return-braced-init-list check in qt/

* chore: re-enable cppcoreguidelines-pro-type-static-cast-downcast check in qt/

* chore: re-enable cppcoreguidelines-pro-type-cstyle-cast check in qt/

* refactor: re-enable cppcoreguidelines-init-variables check in qt/

* chore: re-enable cppcoreguidelines-pro-type-vararg check in qt/

* chore: remove explicit disable of clang-diagnostic-old-style-cast check in qt/

* chore: re-enable bugprone-implicit-widening-of-multiplication-result check in qt/
2022-02-07 21:56:04 -06:00
Charles Kerr
ebb2ab6aee chore: update license spdx abbreviations (#2582)
Use SPDX license list 3.0 terminology: replace deprecated identifiers
GPL-2.0" and "GPL-3.0" with "GPL-3.0-only" and "GPL-3.0-only".
2022-02-07 10:25:02 -06:00
Mark Deepwell
71fd56000d Fix webpack start dev server (#2579)
- Use webpack instead of webpack-dev-server (which is no longer
  maintained)
- The webpack -d option requires as string (which is missing) and
  is specified in the config file, therefore use devtool option
  from webpack.config.js
2022-02-07 06:54:33 -06:00
Charles Kerr
ecef0feb0c refactor: clang-tidy in libtransmission (#2578)
* chore: enable cppcoreguidelines-slicing warning

* chore: enable readability-named-parameter warning

* chore: enable bugprone-reserved-identifier check

* chore: enable bugprone-not-null-terminated-result check

* chore: enable bugprone-sizeof-expression check

* chore: enable bugprone-incorrect-roundings check

* chore: enable misc-misplaced-const check

* chore: enable bugprone-suspicious-include check

* chore: enable bugprone-signed-char-misuse check

* chore: enable modernize-raw-string-literal check

* chore: enable readability-static-accessed-through-instance check

* chore: enable readability-implicit-bool-conversion check

* fixup! Merge branch 'main' into refactor/clang-tidy
2022-02-06 22:28:36 -06:00
Viacheslav Chimishuk
f9d068d7a0 Fix broken Cancel and Rename buttons on RenameDialog. (#2577)
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-02-06 19:51:27 -06:00
bkuhls
a8818148e2 fix cross build (#2576)
Remove redundant include, ${UTP_INCLUDE_DIRS} is included already to fix
cross build error with buildroot:

x86_64-linux-g++: ERROR: unsafe header/library path used in cross-compilation: '-isystem' '/libutp'
2022-02-06 01:17:03 -06:00
Craig Andrews
56dab2bd18 daemon: deny memory wx in transmission-daemon.service (#2573)
Attempts to create memory mappings that are writable and executable at the same time, or to change existing memory mappings to become executable, or mapping shared memory segments as executable are prohibited.

There's no reason transmission should be doing that. If it does, it's because of malicious code exploiting a vulnerability.

See: https://www.freedesktop.org/software/systemd/man/systemd.exec.html#MemoryDenyWriteExecute=
2022-02-04 22:08:51 -06:00
Charles Kerr
4455673bed fix: some use-init-statement sonarcloud warnings (#2566) 2022-02-03 07:02:11 -06:00
LaserEyess
5565255d85 add labels to torrent-add rpc method (#2539)
This commit adds labels to the torrent-add method, allowing RPC users to
specify labels when adding a torrent. Labels metadata is commonly known
when adding torrents, so this removes the need to send another
torrent-set call to add labels.

Additionally, transmission-remote is updated to handle labels in
torrent-add.

Co-authored-by: LaserEyess <LaserEyess@users.noreply.github.com>
2022-02-03 00:02:30 -06:00
Charles Kerr
e908193027 fix: some use-init-statement sonarcloud warnings (#2563) 2022-02-01 19:09:11 -06:00
Charles Kerr
878405f862 Revert "fix: sonarcloud (#2558)" (#2562)
This reverts commit 8b9483f7fb.
2022-02-01 11:30:51 -06:00
Charles Kerr
329c4d80e1 fix: edge case file leak if error while making torrent (#2560)
found by Coverity
2022-02-01 01:11:13 -06:00
Charles Kerr
fdff2893b6 refactor: static allocation of formatter units (#2559) 2022-01-31 23:59:43 -06:00
Charles Kerr
8b9483f7fb fix: sonarcloud (#2558)
* fix: add const modifier for functions

* fix: many sonarcloud use-init-statement warnings
2022-01-31 22:46:27 -06:00
Charles Kerr
cf2c32e1ce refactor: remove raw ptr variant of tr_peerMgrCompactToPex() (#2556) 2022-01-31 21:11:47 -06:00
Charles Kerr
b645c4cfc5 refactor: use std::chrono not OS-specific syscalls (#2554) 2022-01-31 19:02:59 -06:00
Charles Kerr
5db993d348 chore: iwyu (#2553) 2022-01-31 17:05:35 -06:00
Charles Kerr
7bc668680e chore: remove unused function tr_strcasestr() (#2552) 2022-01-31 15:59:14 -06:00
Charles Kerr
253f4fe009 chore: remove /upload endpoint from rpc-server (#2550)
It's never been documented or supported and is unused by the web client.

In the unlikely case that a 3rd party app is using it, use 'torrent-add'
instead; it's documented + supported.
2022-01-31 14:54:21 -06:00
Charles Kerr
87dfabb9d2 refactor: replace tr_thread with std::thread (#2548) 2022-01-31 13:34:04 -06:00
Michael Lopez
bc9479d016 fix man pages listing invalid cli options (#2549)
removing unrecognized cli options to resolve issue #1621
2022-01-31 13:32:20 -06:00
Charles Kerr
b7235ed425 fixup! refactor: base64 utils (#2381) (#2545)
fix regression when adding torrent via transmission-remote

Fixes #2541
2022-01-30 23:08:20 -06:00
Charles Kerr
6f9cba4088 fixup! refactor: SAX-like benc parser pt. 1 (#2490) (#2544) 2022-01-30 21:12:57 -06:00
Mitch Livingston
0929d1a013 Merge pull request #2543 from transmission/sparkle-1.27.1
Update Sparkle to 1.27.1
2022-01-30 18:01:59 -05:00
Mitchell Livingston
0ea4a38c73 Update Sparkle to 1.27.1 2022-01-30 17:10:51 -05:00
Charles Kerr
314aa6925d fix: sonarcloud use-init-statement warnings in new code (#2536) 2022-01-29 16:26:09 -06:00
Charles Kerr
52f6e80a61 test: add tr_torrent_metainfo.infoDictSize() tests (#2535) 2022-01-29 15:37:42 -06:00
Charles Kerr
374c24dde1 refactor: trevent use std:: tools intead of pipes (#2520) 2022-01-28 17:56:46 -06:00
Charles Kerr
9e264250d1 refactor: add benc::Handler::Context (#2531)
Prerequisite for using the new benc parser in tr_torrent_metainfo:
That code needs to know the span of the bencoded info dict.
2022-01-28 16:46:14 -06:00
Charles Kerr
7f60738cce refactor: use the new benc parser in announcer-http (#2529) 2022-01-28 12:39:45 -06:00
Charles Kerr
b998032305 fix: paused torrents not scraped even if scrape-paused-torrents-enabled setting is true (#2528) 2022-01-27 22:17:11 -06:00
Charles Kerr
3c5442dd7b test: add tests for parsing http tracker scrape responses (#2527) 2022-01-27 17:18:50 -06:00
Charles Kerr
4c36ba35bc fixup! web: preferences: incomplete-dir (#2183)
chore: code-style.sh
2022-01-26 22:31:57 -06:00
Tomáš Kelemen
ef198858b1 web: preferences: incomplete-dir (#2183)
* web: preferences: incomplete-dir

This minor change adds an option to enable/disable/set the folder for
downloads in progress via the web interface preferences dialog.
2022-01-26 22:31:02 -06:00
FX Coudert
4fe33496c7 macOS: remove quitting badge (#2495)
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-01-25 11:45:06 -06:00
Ilkka
020a9e45ae Add more decimals for low ratios (#2508) 2022-01-25 10:52:22 -06:00
Charles Kerr
02e9fd6b59 fix: use libdeflate_gzip_compress in rpc-server.cc (#2507) 2022-01-24 23:40:01 -06:00
Charles Kerr
4c4b2714f1 feat: remember tab selection in Details dialog (#2506) 2022-01-24 23:16:33 -06:00
Charles Kerr
064ad6a436 refactor: saxlike benc pt. 2: add announce response parsing tests (#2505) 2022-01-24 22:25:55 -06:00
Charles Kerr
81066aae25 fixup! refactor: use C++ objects in announcer (#2474) (#2502)
fix Jan 22 regression in parsing port numbers from pex
2022-01-24 20:21:35 -06:00
Charles Kerr
ac823f3cc4 fix: sonarcloud warnings in new code (#2500) 2022-01-24 19:05:24 -06:00
Charles Kerr
e83a57efa3 refactor: re-enable some clang-tidy rules (#2498) 2022-01-24 13:07:55 -06:00
Charles Kerr
5efec26a3b refactor: SAX-like benc parser pt. 1 (#2490)
* refactor: add SAX-like benc parser

This is the first part of a series of PRs whose end goal is to avoid
the overhead of tr_variant when parsing bencoded data, e.g. when
parsing .torrent files on startup or when parsing announce/scrape
tracker responses.

This PR introduces a SAX-like benc parser, reimplements variant-benc
to use the SAX benc parser (so that we don't have two benc parsers),
and updates the benc + variant tests.
2022-01-24 00:30:00 -06:00
Charles Kerr
2329f7541f refactor: quark's static_assert formatting (#2489)
Slight refactor to libt/quark's static asserts so that the codebase
formats the same between clang-format 12, 13, and 14.
2022-01-23 23:26:14 -06:00
Charles Kerr
43bd736eb4 fixup! [android] Use android logger (#585) (#2488)
clang-format
2022-01-23 21:53:49 -06:00
Andrey
d8dfbbe2d2 [android] Use android logger (#585) 2022-01-23 20:44:43 -06:00
Charles Kerr
b5cbbb7f8f refactor: clang-tidy 14 (#2487)
get transmission building cleanly with clang-tidy 14
2022-01-23 20:44:14 -06:00
C.W. Betts
3b4909ac9d Move private interfaces to interface extensions (#932) 2022-01-23 19:32:45 -06:00
Charles Kerr
26bb9f3440 fix: sonarcloud code smells (#2486) 2022-01-23 18:53:35 -06:00
FX Coudert
a2e30235c4 Make macOS crash reports provide more information (#2471)
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-01-23 18:10:06 -06:00