Commit Graph

16042 Commits

Author SHA1 Message Date
LaserEyess b562983cbd
Harden systemd service (#6391)
This commit includes strict, but still compatible, service hardening for
transmission-daemon.service. The main goal is a defense-in-depth
strategy that protects users from unknown vulnerabilities in
transmission.

In practice, transmission does not use any of the features that are
blocked in this hardening. However, this is still a network facing
daemon that, by design, accepts connections from unknown peers. So
better safe than sorry.

This commit also installs the service via CMake

Co-authored-by: LaserEyess <LaserEyess@users.noreply.github.com>
2023-12-24 20:48:18 -06:00
Charles Kerr 501487b8cf
refactor: remove tr_parse_result enum (#6435) 2023-12-24 18:05:18 -06:00
Winton Simonds 0780104b8d
docs: update Transmission-Resume-Files.md (#6367)
explain that the resume file format is benc.
2023-12-24 14:48:09 -06:00
Charles Kerr 69577ea4b9
fix: invalid TR_TORRENT_TRACKERS env var for some torrents (#6434) 2023-12-24 14:21:56 -06:00
Charles Kerr 5e51fda92e
refactor: remove tr_strlcpy() (#6433)
* refactor: do not use tr_strlcpy() in tr_strratio()

* refactor: do not use tr_strlcpy() in bindUnixSocket()

* refactor: do not use tr_strlcpy() in trackerView()

* chore: remove tr_strlcpy() unit tests

* chore: remove tr_strlcpy()

* chore: remove -DHAVE_STRLCPY from Xcode build

* fixup! refactor: do not use tr_strlcpy() in trackerView()

chore: fix copypaste bug
2023-12-24 13:33:33 -06:00
Charles Kerr 0ef34878de
refactor: remove tr_str_is_empty() (#6432)
* refactor: do not u se tr_str_is_empty() in tr_torrentSetLocation()

* refactor: do not use tr_str_is_empty() in remote.cc

* refactor: do not use tr_str_is_empty() in subprocess-win32

* refactor: remove tr_str_is_empty()
2023-12-24 12:01:49 -06:00
Charles Kerr 42b09b22df
refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
Yat Ho d2d7987553
refactor: allow explicitly queuing functions in session thread (#6406)
* feat: allow explicitly queuing functions in session thread

* refactor: rename `tr_session_thread`-related functions to snake_case
2023-12-24 08:32:14 -06:00
Yat Ho 9932f567fb
fix: update WebUI build instructions to use `dataurl` loader for images (#6430) 2023-12-24 07:53:57 -06:00
Yat Ho 45298e5a4e
fix: don't create all 0-byte files in `MakemetaTest::makeRandomFiles()` (#6394)
* fix: randomly failing `MakemetaTest.nameIsRootSingleFile`

* fix: eliminate remaining probability for `MakemetaTest.nameIsRootSingleFile` to fail
2023-12-23 14:49:19 -06:00
github-actions[bot] bfa5da9705
chore: update generated transmission-web files (#6427)
Co-authored-by: ckerr <ckerr@users.noreply.github.com>
2023-12-23 11:05:03 -06:00
Yat Ho a4e8cd5081
fix: esbuild load `svg` and `png` as `dataurl` type (#6409) 2023-12-23 10:32:38 -06:00
Charles Kerr 581d9c34cc
fix: gcc-13 warnings pt. 2 (#6404)
* fix: tr_priority_t usage warnings

* build: disable -Wnull-dereference warnings when building GTest

* fix: -Wunused-result warning in tr_spawn_async()

* fix: -Warray-bounds warning in NetTest::compact4()
2023-12-23 10:32:04 -06:00
LaserEyess a9fa9430ba
add user presets to .gitignore (#6407)
Co-authored-by: LaserEyess <LaserEyess@users.noreply.github.com>
2023-12-23 10:22:01 -06:00
Yat Ho fe95914558
fix: use correct time to determine write buffer size (#6414) 2023-12-23 09:28:43 -06:00
Yat Ho 7c9e04d035
fix: mark torrent as changed when stopping (#6405) 2023-12-17 23:29:53 -06:00
Charles Kerr 2dea0b5fa2
fix: gcc 13 warnings, pt. 1 (#6400)
* fix: nullptr dereference warnings

* fix: mixed enumerated and non-enumerated warning

* fix: -Wnull-dereference warning in qt/MainWindow.cc

* fix: -Wnull-dereference warning in TorrentFilter::countTorrentsPerMode()

* fix: -Wnull-dereference warning in VariantHelpers::change(TrackerStat&, tr_variant*)

* build: bump google-test from 1.12.1 to 1.14.0

* Revert "build: bump google-test from 1.12.1 to 1.14.0"

This reverts commit 6fdcffa5de.
2023-12-17 12:49:39 -06:00
Yat Ho 8177c883b0
fix: allow stopping torrent during verify again (#6398) 2023-12-17 11:16:48 -06:00
Will Thompson efcfc7d374
build: add 4.0.4, 4.0.5 releases to metainfo (#6378) 2023-12-17 10:33:30 -06:00
Yat Ho 714411a984
fix: disable RapidJSON SIMD optimisations (#6395)
The minuscule speed increase is not worth the potential bugs and compatibility problems
2023-12-17 09:38:17 -06:00
Mike Gelfand a494da4fea
fix: fill random buffer in chunks with mbedtls crypto backend (#6379)
* adjust crypto unit test to reproduce the issue

* fill random buffer in chunks with mbedtls crypto backend
2023-12-16 19:21:24 -06:00
Federico Scodelaro 33c4cd1c44
feat(qt): Add ETA to compact view (#3926)
* feat(qt): Add ETA to compcat view

* style: Apply codestyle guides

* fix: Remove whitespaces from translatable string

* chore: fix FTBFS from 76521a1 code shear

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2023-12-16 10:32:07 -06:00
Mingye Wang e951ed2508
Use screen.visibleFrame instead of screen.frame (#6321)
* Use screen.visibleFrame instead of screen.frame

NSScreen.frame does not account for the dock, which can be at the bottom or any of the sides. As a result, layout errors that smash things into the dock can occur in the Y or X direction. visibleFrame accounts for the dock.

Should fix #4779. Untested.

* Update TorrentTableView.mm

* Remove -= 50 in max height calculation
2023-12-16 09:22:06 -06:00
Yat Ho 4b882b1bad
fix: sometimes stuck magnet metadata transfer (#6364)
* fix: don't check `total_size` against `metadata_size_hint`

* refactor: remove `metadata_size_hint`

* refactor: restart metadata transfer from scratch on failing
2023-12-16 08:47:55 -06:00
Yat Ho 7f2e165c1e
fix: remove unnecessary locking in global ip cache (#6370) 2023-12-16 08:03:33 -06:00
Charles Kerr 4037726150
chore: bump fmt to 10.1.1 (#6358) 2023-12-08 11:20:04 -06:00
Yat Ho 7fa318c283
fix: mark torrent as changed when setting location (#6355) 2023-12-08 09:38:57 -06:00
Yat Ho 4506d20136
fix: add check for `EWOULDBLOCK` (#6350) 2023-12-07 10:13:34 -06:00
Charles Kerr 15af2ff5be
refactor: show 1.0 progress for zero-byte files (#6307) 2023-12-06 11:23:47 -06:00
Yat Ho 48f9a2376a
fix: always use location of selected torrents in WebUI set location dialogue (#6337) 2023-12-06 10:10:28 -06:00
Yat Ho bcc81f61c0
fix: create file even if not wanted (#6344) 2023-12-06 09:23:16 -06:00
Cœur 555b249322
documentation fix: create empty files on tr_torrent::start (#6340) 2023-12-05 23:39:24 -06:00
Charles Kerr 56837517b0
refactor: tr_block_info cleanup (#6342)
* refactor: make tr_block_info::init_sizes() private

* refactor: remove unuse tr_file_piece_map::empty()

* refactor: remove tr_file_priorities::reset()

* refactor: remove tr_files_wanted::reset()

* refactor: rename method to tr_file_piece_map::piece_span_for_file()

more consistent naming with tr_block_info

* refactor: rename method to tr_file_piece_map::file_span_for_piece()

more consistent naming with tr_block_info

* refactor: use standard class field order in tr_block_info

* refactor: move CompareToSpan from header to cc file

* refactor: make tr_file_piece_map::reset() private

* refactor: rename method to tr_file_piece_map::file_count()

* refactor: rename method to tr_file_piece_map::byte_span_for_file()

* refactor: constify tr_block_info function args

* refactor: fix more signed vs unsigned
2023-12-05 22:06:27 -06:00
Charles Kerr 3cd66899fe
refactor: remove prefetch (#6332) 2023-12-04 11:45:37 -06:00
github-actions[bot] 0c51eb36d7
chore: update generated transmission-web files (#6336) 2023-12-04 10:35:42 -06:00
Yat Ho 71de532e0c
fix: always use location of selected torrents in WebUI set location dialogue (#6334) 2023-12-04 10:27:57 -06:00
Charles Kerr 2e46bad22d
refactor: constify the inout module (#6328)
* refactor: move tr_preallocation_mode info tr_open_files

* refactor: remove unnecessary error nullptr check

* refactor: use snake_case for private method names in inout.cc

* refactor: extract-method get_fd() from read_or_write_bytes()

* refactor: make function args const where possible

* refactor: simplify read_or_write_bytes()

* refactor: make buflen a uint64_t in read_or_write_piece()

* refactor: move tr_torrentStop() logic from read_or_write_piece() to tr_ioWrite()

* refactor: make tr_ioFoo() functions take a const torrent

* refactor: make tr_cache::close_torrent_files() take a tor_id instead of a torrent
2023-12-02 14:16:36 -06:00
github-actions[bot] 9e7a860b57
chore: update generated transmission-web files (#6322)
Co-authored-by: ckerr <ckerr@users.noreply.github.com>
2023-12-01 16:48:46 -06:00
Charles Kerr d766050dd8
perf: fewer temporary strings (#6325)
* perf: parse the .resume file contents inplace

* perf: use unmanaged strings in make_torrent_field()

* perf: accept moved strings in tr_error::set()

* perf: use small::vector in tr_peerMsgsImpl::sendPex()

the expected pex size is predictable and fits easily on the stack
2023-12-01 16:48:16 -06:00
Charles Kerr 25d67dd00d
refactor: in tr_announce_list, replace port_and_str with aggregated parsed url (#6323) 2023-12-01 15:48:04 -06:00
Jake Leahy c853ec3358
feat: Only show .torrent files in the web UI (#6320) 2023-12-01 10:40:36 -06:00
Cœur e10689beea
refactor: support deallocating VDKQueue object (#6290) 2023-11-29 18:17:43 -06:00
Cœur f85c3b6f8d
refactor: omit unnecessary reference in magnet metadata progress (#6311) 2023-11-28 17:52:10 -06:00
Yat Ho ed4fad9b18
feat: support creating 0 byte files (#6232) 2023-11-28 10:51:13 -06:00
Yat Ho 1dca5fe480
chore: minor bandwidth code housekeeping (#6306) 2023-11-28 10:18:38 -06:00
Charles Kerr 1ec6b2b232
refactor: make more tr_torrent fields private (#6305)
* refactor: make tr_torrent::max_connected_peers_ private

* refactor: make tr_torrent::completeness_ private

* refactor: make tr_torrent::mark_edited() private

* refactor: make tr_torrent::mark_changed() private

* refactor: make tr_torrent::start_when_stable_ private

* refactor: make tr_torrent::is_dirty() private

* refactor: make tr_torrent::byte_span() private

* refactor: remove unused non-const version of tr_torrent::metainfo()

* refactor: make tr_torrent::set_dirty() private

* refactor: remove unused tr_torrentStartMagnet()
2023-11-27 23:04:04 -06:00
Yat Ho 5d64c860ea
fix: low priority not working (#6079) 2023-11-27 19:59:26 -06:00
Charles Kerr b9d1b33939
build: use esbuild to bundle the web app (#6280) 2023-11-27 19:23:40 -06:00
Charles Kerr b00b8dd2fb
refactor: make tr_torrent::on_announce_list_changed() private (#6304) 2023-11-27 16:42:31 -06:00
Charles Kerr 777bdfecf1
refactor: make tr_torrent::queue_position_ private (#6301) 2023-11-27 01:27:57 -06:00