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

stig barfs on too-long magnet links. #210

Open
DiagonalArg opened this issue Oct 27, 2021 · 2 comments
Open

stig barfs on too-long magnet links. #210

DiagonalArg opened this issue Oct 27, 2021 · 2 comments

Comments

@DiagonalArg
Copy link

DiagonalArg commented Oct 27, 2021

stig 0.12.2a.0

With too many trackers, stig will barf on magnet links. eg. the magnet here, which is:

magnet:?xt=urn:btih:673544da778bb597fb3331638c22857a8f6ed623&dn=29Leaks&tr=udp://tracker.coppersurfer.tk:6969/announce&tr=udp://exodus.desync.com:6969/announce&tr=udp://tracker.leechers-paradise.org:6969/announce&tr=http://tracker.opentrackr.org:1337/announce&tr=udp://public.popcorn-tracker.org:6969/announce&tr=http://104.28.1.30:8080/announce&tr=http://104.28.16.69/announce&tr=http://107.150.14.110:6969/announce&tr=http://109.121.134.121:1337/announce&tr=http://114.55.113.60:6969/announce&tr=http://125.227.35.196:6969/announce&tr=http://128.199.70.66:5944/announce&tr=http://157.7.202.64:8080/announce&tr=http://158.69.146.212:7777/announce&tr=http://173.254.204.71:1096/announce&tr=http://178.175.143.27/announce&tr=http://178.33.73.26:2710/announce&tr=http://182.176.139.129:6969/announce&tr=http://185.5.97.139:8089/announce&tr=http://188.165.253.109:1337/announce&tr=http://194.106.216.222/announce&tr=http://195.123.209.37:1337/announce&tr=http://210.244.71.25:6969/announce&tr=http://210.244.71.26:6969/announce&tr=http://213.159.215.198:6970/announce&tr=http://213.163.67.56:1337/announce&tr=http://37.19.5.139:6969/announce&tr=http://37.19.5.155:6881/announce&tr=http://46.4.109.148:6969/announce&tr=http://5.79.249.77:6969/announce&tr=http://5.79.83.193:2710/announce&tr=http://51.254.244.161:6969/announce&tr=http://59.36.96.77:6969/announce&tr=http://74.82.52.209:6969/announce&tr=http://80.246.243.18:6969/announce&tr=http://81.200.2.231/announce&tr=http://85.17.19.180/announce&tr=http://87.248.186.252:8080/announce&tr=http://87.253.152.137/announce&tr=http://91.216.110.47/announce&tr=http://91.217.91.21:3218/announce&tr=http://91.218.230.81:6969/announce&tr=http://93.92.64.5/announce&tr=http://atrack.pow7.com/announce&tr=http://bt.henbt.com:2710/announce&tr=http://bt.pusacg.org:8080/announce&tr=http://bt2.careland.com.cn:6969/announce&tr=http://explodie.org:6969/announce&tr=http://mgtracker.org:2710/announce&tr=http://mgtracker.org:6969/announce&tr=http://open.acgtracker.com:1096/announce&tr=http://open.lolicon.eu:7777/announce&tr=http://open.touki.ru/announce.php&tr=http://p4p.arenabg.ch:1337/announce&tr=http://p4p.arenabg.com:1337/announce&tr=http://pow7.com:80/announce&tr=http://retracker.gorcomnet.ru/announce&tr=http://retracker.krs-ix.ru/announce&tr=http://retracker.krs-ix.ru:80/announce&tr=http://secure.pow7.com/announce&tr=http://t1.pow7.com/announce&tr=http://t2.pow7.com/announce&tr=http://thetracker.org:80/announce&tr=http://torrent.gresille.org/announce&tr=http://torrentsmd.com:8080/announce&tr=http://tracker.aletorrenty.pl:2710/announce&tr=http://tracker.baravik.org:6970/announce&tr=http://tracker.bittor.pw:1337/announce&tr=http://tracker.bittorrent.am/announce&tr=http://tracker.calculate.ru:6969/announce&tr=http://tracker.dler.org:6969/announce&tr=http://tracker.dutchtracking.com/announce&tr=http://tracker.dutchtracking.com:80/announce&tr=http://tracker.dutchtracking.nl/announce&tr=http://tracker.dutchtracking.nl:80/announce&tr=http://tracker.edoardocolombo.eu:6969/announce&tr=http://tracker.ex.ua/announce&tr=http://tracker.ex.ua:80/announce&tr=http://tracker.filetracker.pl:8089/announce&tr=http://tracker.flashtorrents.org:6969/announce&tr=http://tracker.grepler.com:6969/announce&tr=http://tracker.internetwarriors.net:1337/announce&tr=http://tracker.kicks-ass.net/announce&tr=http://tracker.kicks-ass.net:80/announce&tr=http://tracker.kuroy.me:5944/announce&tr=http://tracker.mg64.net:6881/announce&tr=http://tracker.opentrackr.org:1337/announce&tr=http://tracker.skyts.net:6969/announce&tr=http://tracker.tfile.me/announce&tr=http://tracker.tiny-vps.com:6969/announce&tr=http://tracker.tvunderground.org.ru:3218/announce&tr=http://tracker.yoshi210.com:6969/announce&tr=http://tracker1.wasabii.com.tw:6969/announce&tr=http://tracker2.itzmx.com:6961/announce&tr=http://tracker2.wasabii.com.tw:6969/announce&tr=http://www.wareztorrent.com/announce&tr=http://www.wareztorrent.com:80/announce&tr=https://104.28.17.69/announce&tr=https://www.wareztorrent.com/announce&tr=udp://107.150.14.110:6969/announce&tr=udp://109.121.134.121:1337/announce&tr=udp://114.55.113.60:6969/announce&tr=udp://128.199.70.66:5944/announce&tr=udp://151.80.120.114:2710/announce&tr=udp://168.235.67.63:6969/announce&tr=udp://178.33.73.26:2710/announce&tr=udp://182.176.139.129:6969/announce&tr=udp://185.5.97.139:8089/announce&tr=udp://185.86.149.205:1337/announce&tr=udp://188.165.253.109:1337/announce&tr=udp://191.101.229.236:1337/announce&tr=udp://194.106.216.222:80/announce&tr=udp://195.123.209.37:1337/announce&tr=udp://195.123.209.40:80/announce&tr=udp://208.67.16.113:8000/announce&tr=udp://213.163.67.56:1337/announce&tr=udp://37.19.5.155:2710/announce&tr=udp://46.4.109.148:6969/announce&tr=udp://5.79.249.77:6969/announce&tr=udp://5.79.83.193:6969/announce&tr=udp://51.254.244.161:6969/announce&tr=udp://62.138.0.158:6969/announce&tr=udp://62.212.85.66:2710/announce&tr=udp://74.82.52.209:6969/announce&tr=udp://85.17.19.180:80/announce&tr=udp://89.234.156.205:80/announce&tr=udp://9.rarbg.com:2710/announce&tr=udp://9.rarbg.me:2780/announce&tr=udp://9.rarbg.to:2730/announce&tr=udp://91.218.230.81:6969/announce&tr=udp://94.23.183.33:6969/announce&tr=udp://bt.xxx-tracker.com:2710/announce&tr=udp://eddie4.nl:6969/announce&tr=udp://explodie.org:6969/announce&tr=udp://mgtracker.org:2710/announce&tr=udp://open.stealth.si:80/announce&tr=udp://p4p.arenabg.com:1337/announce&tr=udp://shadowshq.eddie4.nl:6969/announce&tr=udp://shadowshq.yi.org:6969/announce&tr=udp://torrent.gresille.org:80/announce&tr=udp://tracker.aletorrenty.pl:2710/announce&tr=udp://tracker.bittor.pw:1337/announce&tr=udp://tracker.coppersurfer.tk:6969/announce&tr=udp://tracker.eddie4.nl:6969/announce&tr=udp://tracker.ex.ua:80/announce&tr=udp://tracker.filetracker.pl:8089/announce&tr=udp://tracker.flashtorrents.org:6969/announce&tr=udp://tracker.grepler.com:6969/announce&tr=udp://tracker.ilibr.org:80/announce&tr=udp://tracker.internetwarriors.net:1337/announce&tr=udp://tracker.kicks-ass.net:80/announce&tr=udp://tracker.kuroy.me:5944/announce&tr=udp://tracker.leechers-paradise.org:6969/announce&tr=udp://tracker.mg64.net:2710/announce&tr=udp://tracker.mg64.net:6969/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://tracker.piratepublic.com:1337/announce&tr=udp://tracker.sktorrent.net:6969/announce&tr=udp://tracker.skyts.net:6969/announce&tr=udp://tracker.tiny-vps.com:6969/announce&tr=udp://tracker.yoshi210.com:6969/announce&tr=udp://tracker2.indowebster.com:6969/announce&tr=udp://tracker4.piratux.com:6969/announce&tr=udp://zer0day.ch:1337/announce&tr=udp://zer0day.to:1337/announce

@rndusr
Copy link
Owner

rndusr commented Oct 27, 2021 via email

@DiagonalArg
Copy link
Author

DiagonalArg commented Nov 2, 2021

In stig's TUI, I type add: <paste magnet from clipboard>. Stig then crashes with a traceback and this error:

OSError: [Errno 36] File name too long: '/home/dev/magnet:? ...

$ stig                                                                                                                                                                                       [133/133]
Traceback (most recent call last):                                                                                                                                                                                       
  File "/home/dev/.local/bin/stig", line 8, in <module>                                                                                                                                                                  
    sys.exit(run())                                                                                                                                                                                                      
  File "/home/dev/.local/pipx/venvs/stig/lib/python3.8/site-packages/stig/__init__.py", line 25, in run                                                                                                                  
    main.run()                                                                                                                                                                                                           
  File "/home/dev/.local/pipx/venvs/stig/lib/python3.8/site-packages/stig/main.py", line 102, in run                                                                                                                     
    if not tui.run(run_commands):                                                                                                                                                                                        
  File "/home/dev/.local/pipx/venvs/stig/lib/python3.8/site-packages/stig/tui/main.py", line 60, in run                                                                                                                  
    tuiobjects.urwidloop.run()                                                                                                                                                                                           
  File "/home/dev/.local/pipx/venvs/stig/lib/python3.8/site-packages/urwid/main_loop.py", line 287, in run                                                                                                               
    self._run()                                                                                                                                                                                                          
  File "/home/dev/.local/pipx/venvs/stig/lib/python3.8/site-packages/urwid/main_loop.py", line 385, in _run                                                                                                              
    self.event_loop.run()                                                                                                                                                                                                
  File "/home/dev/.local/pipx/venvs/stig/lib/python3.8/site-packages/stig/tui/urwidpatches.py", line 193, in run                                                                                                         
    raise self._exc_info                                                                                                                                                                                                 
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run                                                                                                                                                          
    self._context.run(self._callback, *self._args)                                                                                                                                                                       
  File "/home/dev/.local/pipx/venvs/stig/lib/python3.8/site-packages/stig/tui/cli.py", line 198, in callback                                                                                                             
    task.result()                                                                                                                                                                                                        
  File "/home/dev/.local/pipx/venvs/stig/lib/python3.8/site-packages/stig/tui/completer.py", line 91, in update                                                                                                          
    self._categories = await self._get_candidates_wrapper(args)                                                                                                                                                          
  File "/home/dev/.local/pipx/venvs/stig/lib/python3.8/site-packages/stig/tui/completer.py", line 38, in _get_candidates_wrapper                                                                                         
    cands = await maybe_await(self._get_candidates(args))                                                                                                                                                                
  File "/home/dev/.local/pipx/venvs/stig/lib/python3.8/site-packages/stig/tui/tuiobjects.py", line 68, in get_candidates                                                                                                     return cmdcls.completion_candidates(args)                                                                                                                                                                              File "/home/dev/.local/pipx/venvs/stig/lib/python3.8/site-packages/stig/commands/cmdbase.py", line 341, in completion_candidates                                                                                           cands = cls.completion_candidates_posargs(args)                                                                                                                                                                        File "/home/dev/.local/pipx/venvs/stig/lib/python3.8/site-packages/stig/commands/tui/torrent.py", line 44, in completion_candidates_posargs                                                                            
    return candidates.fs_path(args.curarg.before_cursor,                                                                                                                                                                 
  File "/home/dev/.local/pipx/venvs/stig/lib/python3.8/site-packages/stig/completion/candidates.py", line 214, in fs_path                                                                                                
    itr = os.scandir(dirpath) 
OSError: [Errno 36] File name too long: '/home/dev/magnet:?xt=urn:btih:673544da778bb597fb3331638c22857a8f6ed623&dn=29Leaks&tr=udp://tracker.coppersurfer.tk:6969/announce&tr=udp://exodus.desync.com:6969/announce&tr=udp
://tracker.leechers-paradise.org:6969/announce&tr=http://tracker.opentrackr.org:1337/announce&tr=udp://public.popcorn-tracker.org:6969/announce&tr=http://104.28.1.30:8080/announce&tr=http://104.28.16.69/announce&tr=ht
tp://107.150.14.110:6969/announce&tr=http://109.121.134.121:1337/announce&tr=http://114.55.113.60:6969/announce&tr=http://125.227.35.196:6969/announce&tr=http://128.199.70.66:5944/announce&tr=http://157.7.202.64:8080/
announce&tr=http://158.69.146.212:7777/announce&tr=http://173.254.204.71:1096/announce&tr=http://178.175.143.27/announce&tr=http://178.33.73.26:2710/announce&tr=http://182.176.139.129:6969/announce&tr=http://185.5.97.
139:8089/announce&tr=http://188.165.253.109:1337/announce&tr=http://194.106.216.222/announce&tr=http://195.123.209.37:1337/announce&tr=http://210.244.71.25:6969/announce&tr=http://210.244.71.26:6969/announce&tr=http:/
/213.159.215.198:6970/announce&tr=http://213.163.67.56:1337/announce&tr=http://37.19.5.139:6969/announce&tr=http://37.19.5.155:6881/announce&tr=http://46.4.109.148:6969/announce&tr=http://5.79.249.77:6969/announce&tr=
http://5.79.83.193:2710/announce&tr=http://51.254.244.161:6969/announce&tr=http://59.36.96.77:6969/announce&tr=http://74.82.52.209:6969/announce&tr=http://80.246.243.18:6969/announce&tr=http://81.200.2.231/announce&tr
=http://85.17.19.180/announce&tr=http://87.248.186.252:8080/announce&tr=http://87.253.152.137/announce&tr=http://91.216.110.47/announce&tr=http://91.217.91.21:3218/announce&tr=http://91.218.230.81:6969/announce&tr=htt
p://93.92.64.5/announce&tr=http://atrack.pow7.com/announce&tr=http://bt.henbt.com:2710/announce&tr=http://bt.pusacg.org:8080/announce&tr=http://bt2.careland.com.cn:6969/announce&tr=http://explodie.org:6969/announce&tr
=http://mgtracker.org:2710/announce&tr=http://mgtracker.org:6969/announce&tr=http://open.acgtracker.com:1096/announce&tr=http://open.lolicon.eu:7777/announce&tr=http://open.touki.ru/announce.php&tr=http://p4p.arenabg.
ch:1337/announce&tr=http://p4p.arenabg.com:1337/announce&tr=http://pow7.com:80/announce&tr=http://retracker.gorcomnet.ru/announce&tr=http://retracker.krs-ix.ru/announce&tr=http://retracker.krs-ix.ru:80/announce&tr=htt
p://secure.pow7.com/announce&tr=http://t1.pow7.com/announce&tr=http://t2.pow7.com/announce&tr=http://thetracker.org:80/announce&tr=http://torrent.gresille.org/announce&tr=http://torrentsmd.com:8080/announce&tr=http://
tracker.aletorrenty.pl:2710/announce&tr=http://tracker.baravik.org:6970/announce&tr=http://tracker.bittor.pw:1337/announce&tr=http://tracker.bittorrent.am/announce&tr=http://tracker.calculate.ru:6969/announce&tr=http:
//tracker.dler.org:6969/announce&tr=http://tracker.dutchtracking.com/announce&tr=http://tracker.dutchtracking.com:80/announce&tr=http://tracker.dutchtracking.nl/announce&tr=http://tracker.dutchtracking.nl:80/announce&
tr=http://tracker.edoardocolombo.eu:6969/announce&tr=http://tracker.ex.ua/announce&tr=http://tracker.ex.ua:80/announce&tr=http://tracker.filetracker.pl:8089/announce&tr=http://tracker.flashtorrents.org:6969/announce&tr=http://tracker.grepler.com:6969/announce&tr=http://tracker.internetwarriors.net:1337/announce&tr=http://tracker.kicks-ass.net/announce&tr=http://tracker.kicks-ass.net:80/announce&tr=http://tracker.kuroy.me:5944/announce&tr=http://tracker.mg64.net:6881/announce&tr=http://tracker.opentrackr.org:1337/announce&tr=http://tracker.skyts.net:6969/announce&tr=http://tracker.tfile.me/announce&tr=http://tracker.tiny-vps.com:6969/announce&tr=http://tracker.tvunderground.org.ru:3218/announce&tr=http://tracker.yoshi210.com:6969/announce&tr=http://tracker1.wasabii.com.tw:6969/announce&tr=http://tracker2.itzmx.com:6961/announce&tr=http://tracker2.wasabii.com.tw:6969/announce&tr=http://www.wareztorrent.com/announce&tr=http://www.wareztorrent.com:80/announce&tr=https://104.28.17.69/announce&tr=https://www.wareztorrent.com/announce&tr=udp://107.150.14.110:6969/announce&tr=
udp://109.121.134.121:1337/announce&tr=udp://114.55.113.60:6969/announce&tr=udp://128.199.70.66:5944/announce&tr=udp://151.80.120.114:2710/announce&tr=udp://168.235.67.63:6969/announce&tr=udp://178.33.73.26:2710/annou
nce&tr=udp://182.176.139.129:6969/announce&tr=udp://185.5.97.139:8089/announce&tr=udp://185.86.149.205:1337/announce&tr=udp://188.165.253.109:1337/announce&tr=udp://191.101.229.236:1337/announce&tr=udp://194.106.216.2
22:80/announce&tr=udp://195.123.209.37:1337/announce&tr=udp://195.123.209.40:80/announce&tr=udp://208.67.16.113:8000/announce&tr=udp://213.163.67.56:1337/announce&tr=udp://37.19.5.155:2710/announce&tr=udp://46.4.109.1
48:6969/announce&tr=udp://5.79.249.77:6969/announce&tr=udp://5.79.83.193:6969/announce&tr=udp://51.254.244.161:6969/announce&tr=udp://62.138.0.158:6969/announce&tr=udp://62.212.85.66:2710/announce&tr=udp://74.82.52.20
9:6969/announce&tr=udp://85.17.19.180:80/announce&tr=udp://89.234.156.205:80/announce&tr=udp://9.rarbg.com:2710/announce&tr=udp://9.rarbg.me:2780/announce&tr=udp://9.rarbg.to:2730/announce&tr=udp://91.218.230.81:6969/
announce&tr=udp://94.23.183.33:6969/announce&tr=udp://bt.xxx-tracker.com:2710/announce&tr=udp://eddie4.nl:6969/announce&tr=udp://explodie.org:6969/announce&tr=udp://mgtracker.org:2710/announce&tr=udp://open.stealth.si
:80/announce&tr=udp://p4p.arenabg.com:1337/announce&tr=udp://shadowshq.eddie4.nl:6969/announce&tr=udp://shadowshq.yi.org:6969/announce&tr=udp://torrent.gresille.org:80/announce&tr=udp://tracker.aletorrenty.pl:2710/ann
ounce&tr=udp://tracker.bittor.pw:1337/announce&tr=udp://tracker.coppersurfer.tk:6969/announce&tr=udp://tracker.eddie4.nl:6969/announce&tr=udp://tracker.ex.ua:80/announce&tr=udp://tracker.filetracker.pl:8089/announce&t
r=udp://tracker.flashtorrents.org:6969/announce&tr=udp://tracker.grepler.com:6969/announce&tr=udp://tracker.ilibr.org:80/announce&tr=udp://tracker.internetwarriors.net:1337/announce&tr=udp://tracker.kicks-ass.net:80/a
nnounce&tr=udp://tracker.kuroy.me:5944/announce&tr=udp://tracker.leechers-paradise.org:6969/announce&tr=udp://tracker.mg64.net:2710/announce&tr=udp://tracker.mg64.net:6969/announce&tr=udp://tracker.opentrackr.org:1337
/announce&tr=udp://tracker.piratepublic.com:1337/announce&tr=udp://tracker.sktorrent.net:6969/announce&tr=udp://tracker.skyts.net:6969/announce&tr=udp://tracker.tiny-vps.com:6969/announce&tr=udp://tracker.yoshi210.com
:6969/announce&tr=udp://tracker2.indowebster.com:6969/announce&tr=udp://tracker4.piratux.com:6969/announce&tr=udp://zer0day.ch:1337/announce&tr=udp://zer0day.to:1337'

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

2 participants