16831 Commits

Author SHA1 Message Date
Yat Ho
7dc14d2fd4 fix(qt): bugprone-narrowing-conversions (#8741) 2026-03-31 09:14:13 -05:00
Charles Kerr
41e8279a73 refactor: add LocalData facade (#8743)
* refactor: add LocalData facade

* fixup! refactor: add LocalData facade

chore: add using namespace std::literals

* fix: narrowing conversion errors on win32

* build: add local-data.cc, .h to pbxproj

* refactor: use tr_error_code_t

* fix: clang-tidy warnings

* chore: silence clang-tidy warnings

* chore: fix hicpp-named-parameter
2026-03-31 09:13:45 -05:00
Charles Kerr
6b24c1c214 fix: add clickjack safeguards when serving http responses (#8747) 2026-03-30 23:17:13 -05:00
Yat Ho
1445d7dd27 refactor: TCP segment payloads at least 128 bytes (#8745) 2026-03-30 20:33:54 -05:00
Yat Ho
8a636aee21 fix(core): bugprone-narrowing-conversions (#8714) 2026-03-29 21:41:10 -05:00
Charles Kerr
445302855d refactor: async file IO prep (#8740)
* refactor: make TrBlockSize a constant

* refactor: add tr_byte_span::is_valid()

refactor: add tr_byte_span::size()

* refactor: add tr_block_info::byte_span_for_block()

refactor: add tr_block_info::byte_span_for_req()

* refactor: tr_ioRead(), tr_ioWrite() take an open_files arg

* refactor: use std::span for open-files fallback writes
2026-03-29 21:31:12 -05:00
Yat Ho
09810605bb build: handle error from clang-tidy 22 breaking change (#8718) 2026-03-29 19:35:15 -05:00
Yat Ho
980cd07722 fix: reject values outside of uint16_t range in port settings (#8730) 2026-03-29 19:34:59 -05:00
Yat Ho
98e94795c9 fix: bugprone-narrowing-conversions surrounding tr_session_stats::uploadedBytes (#8725) 2026-03-29 14:01:13 -05:00
Yat Ho
c8d6bebf6d fix: use static_cast to cast from void pointers (#8724) 2026-03-29 14:00:49 -05:00
Yat Ho
51c3dc45b8 refactor: use range-checked value_if to serialize/deserialize integer types (#8727) 2026-03-25 10:15:32 -05:00
Yat Ho
566d3d96ef refactor: fixes and preventive measures against strict aliasing violations (#8695)
* fix: strict aliasing violations in net.h

* refactor: restrict value_type for buffers

* chore: housekeeping
2026-03-23 09:33:37 -05:00
github-actions[bot]
1ceca2f48e chore: update generated transmission-web files (#8721)
Co-authored-by: ckerr <70381+ckerr@users.noreply.github.com>
2026-03-23 09:33:17 -05:00
Leopoldo Pla Sempere
22bb8a0838 daemon: avoid periodic idle stats.json rewrites (#8679) 2026-03-23 09:19:44 -05:00
Eduardo Fernandes
879954d893 Fix #8111: reject trailing garbage in RPC URL (#8711)
The RPC server accepted any URL starting with /transmission/rpc,
including /transmission/rpc/xyz and /transmission/rpcx. Changed
the prefix check (tr_strv_starts_with) to an exact match so that
only /transmission/rpc is accepted.
2026-03-23 09:15:36 -05:00
Yat Ho
7af380dd5a refactor(qt): use spaceship operator (#8704) 2026-03-23 09:13:30 -05:00
Yat Ho
e87cc06d68 fix(web): unicorn/prefer-math-trunc (#8720) 2026-03-23 09:13:04 -05:00
Yat Ho
dba3e8f9d3 fix: bugprone-narrowing-conversions surrounding error codes (#8716) 2026-03-23 09:12:38 -05:00
Yat Ho
0960c4e3c3 refactor(qt): use percent done value from RPC (#8712) 2026-03-20 12:41:35 -05:00
Yat Ho
7b92be7a52 fix: handle peer ReqQ smaller than floor (#8689) 2026-03-19 18:07:30 -05:00
Yat Ho
f138e2644c perf(wishlist): ditch PImpl and make methods constexpr (#8694) 2026-03-19 18:02:43 -05:00
Yat Ho
9387db8e3e docs: document the global ip cache behaviour in quirky networking environments (#8696) 2026-03-19 18:01:27 -05:00
Yat Ho
5f663bb6a4 fix(gtk): crash when toggling alt speed limit (#8703) 2026-03-19 13:02:44 -05:00
Charles Kerr
5b7158adc2 ci: use g++13 on dragonflybsd (#8708)
g++12 is erroring out on a false warning
2026-03-19 11:56:44 -05:00
Yat Ho
5e8e3da0c2 refactor(qt): use percent complete value from RPC (#8705) 2026-03-19 10:04:00 -05:00
Yat Ho
8c035915e6 refactor(qt): use upload ratio value from RPC (#8706) 2026-03-19 10:03:37 -05:00
Charles Kerr
849cd0ecea refactor: remove write cache (#8669)
* refactor: mark cache_size_mib as deprecated in RPC

* refactor: make RPC session_set cache_size_mib a no-op

* refactor: tr_ioRead(), tr_ioWrite() now take a std::span

* refactor: add BufferReader::to_buf(std::span<uint8_t>)

* refactor: migrate some methods to to_buf(std::span<uint8_t>)

* refactor: remove the write memory cache

* chore: simplify recalculate_hash()

* refactor: simplify span use in tr_peerMsgsImpl::read_piece_data()
2026-03-11 07:16:39 -05:00
Yat Ho
a483792783 feat: configurable ip query endpoint (#8650)
* feat: configurable ip query endpoint

* fix(test): don't query global IP
2026-03-10 11:36:10 -05:00
Yat Ho
8dfce3c90c perf: constexpr tr_variant::value_if() specialisations (#8670)
* refactor: move `tr_variant::value_if<int64_t>()` to header and constexpr

* refactor: move `tr_variant::value_if<bool>()` to header and constexpr

* refactor: move `tr_variant::value_if<std::string_view>()` to header and constexpr
2026-03-10 08:48:24 -05:00
Yat Ho
a3545eb9c2 feat: bound-checked tr_variant::value_if() for smaller integer types (#8660)
* feat: bound-checked `tr_variant::value_if()` for smaller integer types

* feat(rpc): ignore values outside the `tr_torrent_id_t` range
2026-03-09 19:35:08 -05:00
Charles Kerr
a84c769f94 refactor: remove unused tr_ctorSetFilePriorities() (#8667)
refactor: remove unused tr_ctorSetFilesWanted()
2026-03-09 17:01:03 -05:00
Charles Kerr
974b16e71c refactor: remove tr_torrentsQueueMoveTop() from public API (#8666)
* refactor: remove tr_torrentsQueueMoveTop() from public API

refactor: remove tr_torrentsQueueMoveUp() from public API

refactor: remove tr_torrentsQueueMoveDown() from public API

refactor: remove tr_torrentsQueueMoveBottom() from public API

* refactor: remove unused tr_torrentGetQueuePosition()
2026-03-09 17:00:42 -05:00
Yat Ho
5c6b6db42c fix: modernize-use-integer-sign-comparison (#8662) 2026-03-09 09:58:51 -05:00
Yat Ho
282f085e30 refactor: move tr_pex/tr_variant converters to serializer.cc (#8655) 2026-03-08 12:22:30 -05:00
Charles Kerr
105224de1d perf: prune unused interned strings (#8653) 2026-03-05 10:08:26 -06:00
Yat Ho
eac99ff1a0 fix: readability-container-contains (#8656)
* fix(core): `readability-container-contains`

* fix(test): `readability-container-contains`

* build(gtk): enable `readability-container-contains`

* fix(qt): `readability-container-contains`
2026-03-05 10:00:29 -06:00
Yat Ho
b40adc411e fix: don't overwrite *_enabled if preferred_transports is not in settings.json (#8657) 2026-03-05 08:47:51 -06:00
reardonia
cee65c7606 security: sanitise CTRL characters in filenames on all systems (#8495)
* disallow CTRL characters in filenames on Unixen

* fixup: compact into is_reserved_char()
2026-03-04 18:08:38 -06:00
Yat Ho
4eaf91fda5 refactor: compare_failed spaceship (#8634) 2026-03-04 16:04:10 -06:00
Yat Ho
59abf6e1db fix: re-create candidate when got bad block if needed (#8644)
* refactor: use the same salter everywhere

* fix: re-create candidate when got bad block if needed

* refactor: housekeeping

* fix: emit bad piece signal after all bookkeeping
2026-03-04 15:59:21 -06:00
Charles Kerr
5e305a2d26 refactor: simplify session callbacks (#8646)
* refactor: add a Torrent.id property

* feat: add Controller.torrentForId

* refactor: make tr_session_idle_limit_hit_func a std::function

* refactor: make tr_session_metadata_func a std::function

* refactor: make tr_session_ratio_limit_hit_func a std::function

* refactor: make tr_torrent_completeness_func a std::function

* refactor: make tr_altSpeedFunc a std::function

* refactor: make tr_sessionSetQueueStartCallback callback a std::function

* refactor: make tr_rpc_callback_status callback a std::function

* refactor: remove user_data arg from tr_torrent_rename_done_func

* refactor: harden `tr_torrentFindFromId()` by making it safe to pass in a nullptr session
2026-03-03 16:02:54 -06:00
Yat Ho
7d3b22639d fix: don't process failed HTTP announce response if one the same group succeeded (#8631) 2026-03-01 21:16:20 -06:00
Yat Ho
b561960d51 fix: enable modernize-use-ranges (#8626)
* fix(core): enable `modernize-use-ranges`

* fix(test): enable `modernize-use-ranges`

* fix(qt): enable `modernize-use-ranges`

* fix(gtk): enable `modernize-use-ranges`
2026-02-26 08:22:29 -06:00
Charles Kerr
152e528d9b perf: add a constexpr/consteval tr5/legacy key lookup table (#8625)
* perf: add a constexpr/consteval tr5/legacy key lookup table

* fix: readability-use-anyofallof
2026-02-25 22:18:50 -06:00
Yat Ho
d56a8e80c3 refactor: use char8_t as underlying type of tr_interned_string (#8556) 2026-02-25 09:07:01 -06:00
Yat Ho
765debd61c fix(qt): apicompat when saving settings.json (#8619) 2026-02-25 08:51:21 -06:00
Yat Ho
fe879f5817 fix: revert percent-encoding announce urls and webseeds (#8620) 2026-02-25 08:48:34 -06:00
Yat Ho
6a6b0dbcc5 ci: run clang-tidy-libtransmission for app/test-only changes (#8612)
* ci: run `clang-tidy-libtransmission` for app/test-only changes

* fix: fix another new clang-tidy regression

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2026-02-24 23:49:55 -06:00
Charles Kerr
144871ed5e fix: 4.1.0 crash when parsing some RPC responses from older Transmission servers (#8607) 2026-02-24 22:44:06 -06:00
Charles Kerr
8c9eab9a96 fixup! fix: show translated logging level strings (#8609) (#8615)
fix new clang-tidy warning
2026-02-24 20:07:28 -06:00