Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BitTorrent errorCode=26 Detected directory traversal directive #1131

Open
SumatraPeter opened this issue Feb 4, 2018 · 10 comments
Open

BitTorrent errorCode=26 Detected directory traversal directive #1131

SumatraPeter opened this issue Feb 4, 2018 · 10 comments

Comments

@SumatraPeter
Copy link

SumatraPeter commented Feb 4, 2018

I've got a bunch of .torrent files that aria2 simply won't download, or even print the file list of with -S. For each one I get an error similar to the following:

Exception: [bittorrent_helper.cc:277] errorCode=26 Detected directory traversal directive in MTCDC From Z to A 012 Stz-Star S/Star Trek/Icon

What gives? I don't know what makes that 0 (zero) byte "Icon" or "Icon_" file problematic, but I have no issues opening or downloading the torrent or even skipping that file with a client like uTorrent for example:

problem_file_inside_torrent

I'm also attaching one of the problematic .torrent files below. If you need more of the same do let me know.

Problem_Torrent.zip

@anson2416
Copy link

I met the same issue.

@SumatraPeter
Copy link
Author

I'm not sure whether this program is even being maintained/updated now. :(

@zzzhr1990
Copy link

the same problem.
magnet:?xt=urn:btih:645F8207DF3A5AB56CF74BDD839303B228CBC83C&dn=SKMJ053mp4

@SumatraPeter
Copy link
Author

@zzzhr1990: Confirmed with your torrent, and here it is in case some developer is ever interested in fixing this bug one day...

Problem_Torrent_2.zip

@tatsuhiro-t @nmaier Any chance of getting this bug fixed? 🙂

@zzzhr1990
Copy link

zzzhr1990 commented Jul 27, 2019

@zzzhr1990: Confirmed with your torrent, and here it is in case some developer is ever interested in fixing this bug one day...
Problem_Torrent_2.zip
@tatsuhiro-t @nmaier Any chance of getting this bug fixed? 🙂

Well, there's something wrong with this torrent file:
magnet:?xt=urn:btih:645F8207DF3A5AB56CF74BDD839303B228CBC83C&dn=SKMJ053mp4
one of the filename in metata ends up '/' (empty directory)
so util::detectDirTraversal(utf8Name) returns false.
in src/bittorrent_helper.cc line 275, can we just ignore this file instead of throw error?

@zzzhr1990
Copy link

Well, there's something wrong with this torrent file

@zzzhr1990: Perhaps English is not your first language. As I said above, I have confirmed that the torrent you mentioned does exhibit the same "errorCode=26 Detected directory traversal directive" bug, and thus I have downloaded and attached the torrent with my previous comment. Now it is up to an aria2 dev to actually study these torrents and fix the issue.

sorry, I changed my comment, one of the filename in metdata ends up '/' (empty directory), the cause error 26. can we just ignore this illegal filename and continue add extractFileEntries loop?

@SumatraPeter
Copy link
Author

one of the filename in metdata ends up '/' (empty directory), the cause error 26

I am not a dev so cannot say for sure whether the cause is the same with my torrent too (attached above in Problem_Torrent.zip). Given that the same error is thrown, perhaps yes...

can we just ignore this illegal filename and continue add extractFileEntries loop?

Whatever way this bug is fixed is fine with me. 🙂 As torrent clients like uTorrent have been able to successfully handle such torrents for years now (even ancient versions don't throw an error), I expect the same sort of robustness with aria2 as well. Simply throwing an error 26 and aborting is not the sort of behavior I expect from an otherwise fine utility like this!

@DebuAqua
Copy link

I met the same issue.
Is it possible to let aria2 skip the problematic file and proceed to downloading?

@SumatraPeter
Copy link
Author

Unfortunately this seems to be yet another abandoned FOSS project.

@Loli0721
Copy link

Same question.
There is no option to skip empty files that report errors.
Is this project no longer maintained?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants