Commit Graph

75 Commits

Author SHA1 Message Date
xirvik 7916e6022f Stop the value command on the untrusted-safe allowlist crashing the daemon
glibc leaves endptr unset for a small invalid base; ERANGE throws instead of clamping.
2026-09-20 15:58:47 +02:00
xirvik 8ee3b984dd Give network.xmlrpc.size_limit.set a floor
A limit below any valid request rejects the request that would raise it again.
2026-09-20 09:23:12 +02:00
xirvik 80ae6a4590 Answer an oversized RPC response with a fault
Cap XML-RPC and JSON-RPC output at the SCGI response limit before handing it over.
2026-09-19 18:04:09 +02:00
xirvik 2086e8e780 Check the argument count before indexing config comment log args
A '# do:log.add_output=debug' line read args[1] past the end of the vector.
2026-09-19 12:13:43 +02:00
xirvik d9439d7a95 Dispatch view.event_added over the added half of the changed range
fb75510 pointed it at the removed half, so it fired on departing downloads instead.
2026-09-19 11:41:58 +02:00
noctuum b1be898ba1 Reject an over-long or empty object_storage key
key_type stores a key of key_size or longer as the empty key.
2026-09-18 16:54:48 +02:00
noctuum 3717649bb3 Guard the value iterator in method.insert.list
The list branch dereferenced end() when no value was given.
2026-09-17 09:54:14 +02:00
noctuum af0b600b54 Add unit tests for ipv4_range_parse.
Covers single addresses, explicit ranges and the cidr mask boundaries.
2026-09-13 10:05:39 +02:00
Jari Sundell 2804be2c9c Optionally sanitize download and file names by replacing slash with underscore. 2026-08-29 18:31:16 +09:00
xirvik 9ff0cd28d5 Add schedule.if_absent for clients that re-register periodic tasks.
schedule restarts a re-registered task's countdown, if_absent keeps the existing entry.
2026-08-16 13:36:19 +02:00
kunalkakade 31196ff5f0 Add realpath variants of the commands that return paths.
Closes #1670.
2026-08-07 11:58:14 +02:00
kunalkakade 5b4b607c98 Add string.* commands for text manipulation.
Closes #1366.
2026-08-07 11:35:35 +02:00
rakshasa e56bffff4d Fixed socket category unit test. 2026-08-05 11:18:31 +02:00
Jari Sundell f90a96d57a Added WaitpidQueue to handle background process reaping. 2026-08-04 19:03:26 +09:00
xirvik 05831942a7 commands: don't register min_alloc/max_alloc for the generic socket category
SocketManager throws internal_error for category_generic, aborting rtorrent over RPC.
2026-07-30 12:42:24 +02:00
Jari Sundell f52f20f1b6 Cleaned up system headers. 2026-07-26 19:53:18 +09:00
Jari Sundell 5d350f0bcc Use new encryption modes. 2026-07-14 17:34:14 +09:00
Jari Sundell 50a609ade9 Fixed cacheline size check. 2026-06-01 20:11:02 +09:00
tonimelisma 84229a85be Add directory.watch.ready for safe torrent watch folders 2026-05-25 18:21:31 +02:00
Jari Sundell 71ac256cb5 Moved socket counter to runtime::SocketManager. 2026-05-10 02:11:35 +09:00
Jari Sundell f05b48e228 Moved NetworkConfig to runtime. 2026-05-05 16:17:24 +09:00
Jari Sundell eb96876eb2 Moved Thread header to torrent/system directory. 2026-04-22 23:02:05 +09:00
Jari Sundell 30cec98799 Moved Poll to net namespace. 2025-11-20 03:05:16 +09:00
Jari Sundell 5206e6cb88 Moved various socket options to NetworkConfig. 2025-09-22 06:01:18 +09:00
rakshasa 788442de6a Added test for xmlrpc string reflection. 2025-08-02 15:02:25 +02:00
rakshasa 4492715737 Strict checking of d.views push_back arguments. 2025-08-02 15:02:25 +02:00
Rosen Penev 84c0d516ef replace for_each with range loops
No advantage over the latter, which is simpler.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2025-06-21 11:23:11 +02:00
rakshasa a9196b43d4 Added missing header to Makefile.am. 2025-06-01 15:40:22 +02:00
Jari Sundell f0809ec29d Various pool_event_* and thread API cleanups. 2025-06-01 01:22:14 +09:00
rakshasa 2d565d1c80 Do thread cleanup within the same thread context. 2025-05-30 14:31:52 +02:00
rakshasa 5fb61b2857 Removed old poll creation calls. 2025-05-27 12:23:39 +02:00
Jari Sundell 9ff373fe58 Related refactoring to updated of ThrottleList to use new Scheduler. 2025-05-12 17:38:07 +09:00
Jorge Israel Peña 58a74cee48 Wrap fault struct in value 2025-05-02 12:13:49 +02:00
Jari Sundell 85e74b5542 Removed priority_queue and rak/timer. 2025-05-02 18:03:51 +09:00
Jari Sundell 2ab7460cbc Fix SCGI threading and added missing header. 2025-04-01 01:26:07 +09:00
Jari Sundell 3a227c190f Added system.files.advise_random.set command. 2025-03-28 19:21:25 +09:00
rakshasa 89b35af7a6 Fixed threaded tracker feature compatibility. 2025-02-11 09:01:52 +01:00
kannibalox 9f48226663 Add JSON-RPC capability
Inline nlohmann/json for the JSON parsing itself, and handle requests
with the same SCGI interface as XML-RPC.

Based off the work in https://github.com/jesec/rtorrent
2025-01-20 12:31:04 +01:00
rakshasa c2c6a4be26 Inline test data instead of using separate text file. 2025-01-03 06:04:09 +09:00
kannibalox 350d03ca04 Update XMLRPC unit tests to include <data> for arrays 2025-01-03 05:26:55 +09:00
stickz 73fed24459 tinyxml2: Change from i4 to i8
We need to follow the same specification as xmlrpc-c until we deprecate it. It is breaking various software such as sonarr. We can't have xmlrpc using i8 and tinyxml2 using i4, while we allow both to be used.
2025-01-01 21:32:23 +09:00
kannibalox f2b065a798 Fix typo 2024-12-07 19:26:29 +09:00
kannibalox f33c2560a3 Default to an empty list when not passed explicit <params> 2024-12-07 19:26:29 +09:00
kannibalox db1e78fa9d Update tests to fix typo 2024-12-07 19:26:29 +09:00
kannibalox 48c40ee0c6 Fix typo: methodReponse -> methodResponse 2024-12-07 19:26:29 +09:00
kannibalox 3aeb213dc4 Avoid <int> in tinyxml2 responses
It's part of the XML-RPC spec, but some clients only accept i4/i8, which
should be supported nearly universally.

Fixes #1330
2024-12-07 19:26:29 +09:00
kannibalox 036916fd9f Fix typo in method name 2024-11-25 18:44:28 +09:00
kannibalox 4768eb8356 Fix test to match case change 2024-11-25 18:44:28 +09:00
kannibalox d6dcbc4a69 Add size limit to XML-RPC documents, defaulting to max SCGI size 2024-11-25 18:44:28 +09:00
kannibalox 902de0b258 Add test for empty int text 2024-11-25 18:44:28 +09:00