[Deluge] #3515: [AutoAdd] - Disables watch on a folder when a torrent file fails decoding.

4 views
Skip to first unread message

Deluge

unread,
Mar 28, 2022, 4:12:50 AM3/28/22
to delug...@googlegroups.com
#3515: [AutoAdd] - Disables watch on a folder when a torrent file fails decoding.
----------------------------+---------------------
Reporter: deaddrop9 | Type: bug
Status: new | Priority: minor
Milestone: needs verified | Component: Plugin
Version: 2.0.3 | Keywords: AutoAdd
----------------------------+---------------------
Steps

Create an invalid torrent file (something this is not bencoded) eg

echo "Invalid torrent file format" > /path/to/watch-folder/bad.torrent

Expected outcome

Torrent file should be detected by AutoAdd, and after failing attempts to
add a few times, it should be renamed to bad.torrent.invalid (using
existing file failure functionality) and AutoAdd should continue to
monitor the folder.


Actual outcome

Watch folder is disabled in AutoAdd, and torrent filename is unchanged.
Re-enabling the folder in AutoAdd, just leads to repeated disables.
{{{
deluged[112816]: 21:51:20 [ERROR ][deluge_autoadd.core :367 ]
Disabling "/path/to/watch-folder", error during update: [Failure instance:
Traceback: <class 'RuntimeError'>: unexpected end of file in bencoded
string
deluged[112816]: /usr/lib/python3/dist-
packages/deluge/plugins/AutoAdd-1.8.egg/deluge_autoadd/core.py:108:enable_looping
deluged[112816]: /usr/lib/python3/dist-
packages/deluge/plugins/AutoAdd-1.8.egg/deluge_autoadd/core.py:379:enable_watchdir
deluged[112816]: /usr/local/lib/python3.8/dist-
packages/twisted/internet/task.py:194:start
deluged[112816]: /usr/local/lib/python3.8/dist-
packages/twisted/internet/task.py:239:__call__
deluged[112816]: --- <exception caught here> ---
deluged[112816]: /usr/local/lib/python3.8/dist-
packages/twisted/internet/defer.py:151:maybeDeferred
deluged[112816]: /usr/lib/python3/dist-
packages/deluge/plugins/AutoAdd-1.8.egg/deluge_autoadd/core.py:278:update_watchdir
deluged[112816]: /usr/lib/python3/dist-
packages/deluge/plugins/AutoAdd-1.8.egg/deluge_autoadd/core.py:164:load_torrent
deluged[112816]: ]
}}}

Root cause is failure to check data returned from bdecode function. (it
return None when decoding fails) (pull request to fix coming shortly)

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3515>
Deluge <https://deluge-torrent.org/>
Deluge Project

Deluge

unread,
Feb 24, 2023, 6:04:42 AM2/24/23
to delug...@googlegroups.com
#3515: [AutoAdd] - Disables watch on a folder when a torrent file fails decoding.
------------------------+---------------------
Reporter: deaddrop9 | Owner:
Type: bug | Status: closed
Priority: minor | Milestone: 2.1.2
Component: Plugin | Version: 2.0.3
Resolution: Fixed | Keywords: AutoAdd
------------------------+---------------------
Changes (by Cas):

* status: new => closed
* resolution: => Fixed
* milestone: needs verified => 2.1.2


Comment:

Thanks for fix!

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3515#comment:1>

Reply all
Reply to author
Forward
0 new messages