Commit Graph

14257 Commits

Author SHA1 Message Date
Charles Kerr e51527203e
refactor: re-enable clang-tidy warnings (#2485) 2022-01-23 16:47:41 -06:00
Carles Pastor Badosa 8d1d445fbc
Add content_rating to appdata (#1487)
This tag can be used by app stores such as kde discover, gnome software, elementary appcenter, flathub or similar to discern age-appropriate content.

It uses the Open Age Ratings Service (OARS) in order to provide the required information.
2022-01-23 15:23:53 -06:00
Peter Bailey 96d9ab5abb
allow stopping torrents in verification states (#715) 2022-01-23 14:46:56 -06:00
Charles Kerr 85566c372e
test: tests for magnet links with bad/junk values (#2483)
Co-authored-by: Srinidhi Kaushik <shrinidhi.kaushik@gmail.com>
2022-01-23 13:01:48 -06:00
Charles Kerr c5bc3091cc
fixup! NAT-PMP private/public port and lifetime fix (#1602) (#2482)
ensure the value passed to tr_timerAdd() is non-negative
2022-01-23 11:31:20 -06:00
Charles Kerr fa3cbc3e27
fix: memory leak in upnp (#2481)
Fixes #2480
2022-01-23 11:16:36 -06:00
Esa Varemo 032e01c9d8
Add the option of automatically picking up URLs from the clipboard on window focus (#1633) 2022-01-23 09:57:21 -06:00
dependabot[bot] bda754bbeb
build(deps): bump nanoid from 3.1.23 to 3.2.0 in /web (#2473)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.23 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.23...3.2.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-01-23 08:39:53 -06:00
Charles Kerr b45c831bcb
refactor: use C++ objects in announcer (#2474) 2022-01-22 23:41:01 -06:00
Charles Kerr e0c3a7f3e6
docs: add CONTRIBUTING.md (#2452) 2022-01-21 21:34:23 -06:00
mickaelifs 6c582469fa
NAT-PMP private/public port and lifetime fix (#1602) 2022-01-21 18:07:24 -06:00
Charles Kerr da4ad59290
fix: in check input before calling tr_sha1_from_string() (#2468)
Fixes #2467
2022-01-21 17:17:49 -06:00
Charles Kerr 4833723651
fixup! fix: don't follow symlinks when removing junk files (#1638) (#1638) (#2470)
code style
2022-01-21 12:39:01 -06:00
Vincent Vinel ddca909699
fix: don't follow symlinks when removing junk files (#1638) (#1638)
This prevents accidentally following a symlink that points outside of
the torrent's folder and crawling the rest of the drive for junk files
to remove.

This also prevents symlinks that point to a folder from being treated as
real directories, which would cause them to be removed even if the folder
they point to is not actually empty.
2022-01-21 11:53:00 -06:00
LaserEyess 9e5e27adb6
Add bind-address-ipv4 to upnp (#845)
Pass the bind-address-ipv4 to upnpDiscover to allow for upnp to only
use the interface specified. Prevents upnp packet leaks.

Authored-by: LaserEyess <lasereyess@lasereyess.net>
2022-01-21 09:44:45 -06:00
Charles Kerr f94f7923e8
add multiline wrapping in error label (#2465) 2022-01-20 17:22:23 -06:00
Charles Kerr 2d916ab9a8
fixup! Fixed wrong ipv6 addr used in announces. (#265) (#2464)
fix unused variable warning
2022-01-20 16:34:43 -06:00
vuori a89b98f9e5
Fixed wrong ipv6 addr used in announces. (#265) 2022-01-20 15:28:04 -06:00
Charles Kerr df1cca9b57
chore: update copyright years, make notices consistent (#2463) 2022-01-20 12:27:56 -06:00
Charles Kerr 0166b6e688
fix: explicitly use unsigned char when checking isprint() (#2444) 2022-01-18 15:20:49 -06:00
Charles Kerr 5b8dae3557
fix: make add-torrent dialogs modal in GTK client (#2443)
This solves the issue of the dialogs not centering above the main GTK
client window. Fixes #2214.
2022-01-18 14:16:25 -06:00
Charles Kerr 8189c68190
fix: remove assert() that shouldn't always be true (#2442)
Fixes #2441.
2022-01-18 12:35:08 -06:00
Charles Kerr 0e3a695af2
fix: string leak regression when udp announces fail (#2440) 2022-01-18 11:20:14 -06:00
dependabot[bot] 546fefbd9c
build(deps): bump follow-redirects from 1.13.0 to 1.14.7 in /web (#2395)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.13.0 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.13.0...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-01-18 01:14:03 -06:00
Charles Kerr 8d75736ad1
fix: empty torrent filename (#2435)
fix torrents readded due to unremoved cfg files.
2022-01-17 23:14:00 -06:00
Charles Kerr aa2183c9c5
fix: torrents readded due to unremoved cfg files (#2433)
Fixes #2430.

When removing a torrent, try to remove config filenames under both old
and new filename formats. This prevents torrents from being incorrectly
re-added when old-format files aren't removed.
2022-01-17 20:36:41 -06:00
Charles Kerr bcf5e4636a
fix: calculate seed ratio by torrent size. (#2424)
Previously was calculated by number of bytes downloaded, which caused
edge cases when those two numbers were not the same, e.g. if the user
already had part of the torrent from another source and only downloaded
a small part. When this happened, the ratio could be very large and use
of seedratio would behave in a way that most people would not expect.

Note, the old behavior has been around for a VERY LONG TIME. Even though
this is a bugfix, it does change semantics. I don't think there is any
third-party code that depends on the old behavior but this is arguably
a breaking change.
2022-01-17 17:16:37 -06:00
Charles Kerr f415de0626
explicitly use unsigned chars (#2423)
Fixes #2106
2022-01-17 15:13:22 -06:00
Charles Kerr 3036a76beb
fix: sonarcloud code smells (#2421) 2022-01-17 12:39:50 -06:00
Charles Kerr 19ede2b8cd
fixup! refactor: replace tr_info with tr_torrent_metainfo (#2397) (#2415) 2022-01-17 11:44:53 -06:00
Charles Kerr d8d765c595
refactor: use libdeflate instead of zlib's deflate() (#2405)
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2022-01-17 10:20:12 -06:00
Charles Kerr 6b440af32f
fix: potential out-of-range error in io's readOrWritePiece() (#2413) 2022-01-16 12:02:47 -06:00
Charles Kerr 2c09e99515
fix: parse utorrent peer-id version components as hex (#2411) 2022-01-16 10:27:23 -06:00
Charles Kerr be1e46383d
fix: allow malformed magnet links to be added (#2410) 2022-01-16 09:28:18 -06:00
Charles Kerr c9f8f150ea
fix: broken tooltiop in GTK client peer flag tooltip (#2409) 2022-01-16 08:48:01 -06:00
Charles Kerr db23ca4c6b
refactor: replace tr_info with tr_torrent_metainfo (#2397)
* refactor: replace tr_info with tr_torrent_metafo
2022-01-15 13:33:57 -06:00
Charles Kerr 3a96a5c316
build: refer to primary branch as main (#2394) 2022-01-13 16:03:59 -06:00
Frank Aurich 41b2a802cf
Fix another integer overflow bug on 32-bit platforms with torrents > 4GB (#2391) 2022-01-12 22:52:36 -06:00
Charles Kerr b0ee4007ff
refactor: include cleanups (#2392)
* refactor: include <memory> when using shared_ptr or unique_ptr

* refactor: include <cstdio> iff we use it

* refactor: include <cstring> iff we use it

* refactor: include <cstdlib> iff we use it

* refactor: include <string_view> or <string> iff we use it

* refactor: include <array> iff we use it

* refactor: include <ctime> iff we use it

* refactor: include <cctype> iff we use it

* refactor: misc #include cleanups in libtransmission
2022-01-12 20:13:58 -06:00
Charles Kerr a9284c0a6b
fix: magnet link regression (#2390) 2022-01-11 08:28:14 -06:00
Charles Kerr 43b9d5c147
fix: potential infinite loop when parsing benc (#2389) 2022-01-10 14:27:05 -06:00
Charles Kerr d2e840c64c
refactor: unstack nested code in tr_torrentSetMetadataPiece() (#2387) 2022-01-09 13:17:53 -06:00
Charles Kerr dfc06fe918
refactor: use std::vector in tr_info (#2386) 2022-01-09 10:55:09 -06:00
Charles Kerr 7068eb66c1
refactor: migrate makeFilename() to tr_magnet_metainfo (#2385) 2022-01-08 21:03:21 -06:00
Charles Kerr 49f2823d6f
refactor: use std::string in tr_info (#2384) 2022-01-08 17:41:05 -06:00
Charles Kerr 79d244db82
refactor: rename tr_torrent.infoDictSize() (#2383) 2022-01-08 14:05:38 -06:00
Charles Kerr 8b65b660c8
refactor: use std::string in tr_file (#2382) 2022-01-08 12:53:35 -06:00
Charles Kerr 0c16c454ba
refactor: base64 utils (#2381)
base64 encode/decode now take std::string_views and return std::strings
2022-01-08 06:46:25 -06:00
Charles Kerr 385a119fb1
refactor: make tr_torrent aggregates tr_block_info instead of subclassing (#2376) 2022-01-07 13:13:37 -06:00
Frank Aurich 319312596a
fix: integer overflow when calculating `sizeWhenDone` (#2378)
While the function correctly returns a `uint64_t`, internally a `size_t` variable is used to calculate the accumulated size.
On 32-bit systems (e.g. Raspbian) `size_t` is only 32-bit wide, causing overflow for torrents > 4GB.
2022-01-07 10:48:08 -06:00