qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.47k stars 3.99k forks source link

When creating a torrent with a shortcut, the client mistakes it for a folder and considers the files to which the shortcut links #21854

Open stalkerok opened 6 days ago

stalkerok commented 6 days ago

qBittorrent & operating system versions

qBittorrent v5.0.1 (64-bit) Qt: 6.7.3 Libtorrent: 1.2.19.0 Boost: 1.86.0 OpenSSL: 3.4.0 zlib: 1.3.1 OS: W10

What is the problem?

When creating a torrent with a shortcut, the client mistakes it for a folder and considers the files to which the shortcut links. The first torrent was created in qBittorrent. The second one was created in Torrent File Editor. The third one was created in (God forgive me) uTorrent. 2024-11-15_222839

Steps to reproduce

Create a torrent with a shortcut inside the folder. Try re-hashing this torrent.

Additional context

No response

Log(s) & preferences file(s)

torrents.zip

HanabishiRecca commented 5 days ago

I think the best course of action is to just filter out .lnk files, same as Torrent File Editor does. They are useless on their own and most probably get into torrents by mistake.

Here

https://github.com/qbittorrent/qBittorrent/blob/0f12d077c89e5546e8617f899c26a42517f59353/src/base/bittorrent/torrentcreator.cpp#L126-L131

and here

https://github.com/qbittorrent/qBittorrent/blob/0f12d077c89e5546e8617f899c26a42517f59353/src/base/bittorrent/torrentcreator.cpp#L141-L149

stalkerok commented 5 days ago

.lnk is also used for attacks, so it should be filtered due to potential security threat. https://www.reddit.com/r/Piracy/comments/1gjeb29 Hash 6714c11a3cf57cd9707a8ac2b218f88eb218af3f