[NMDC] 4.10 Magnet Link left mouse in chat opens search

If you find any bugs, please post in here. Bugs in the Linux version should be reported on Github.

[NMDC] 4.10 Magnet Link left mouse in chat opens search

Postby Executer » 12 Jan 2021, 23:09

Hi

the following list of magnet links is not handled correctly
Code: Select all
magnet:?xt=urn:tree:tiger:MJINWSL5AJUTA7XKD4LYU77ZNV2O237R2HO6QLQ&xl=12&dn=i.txt
magnet:?xt=urn:tree:tiger:T4WCVG3SFL4EZPVQV5PD2S6VTQOP3VW22FHXQ3A&xl=14&dn=sdk+%26+dfj.txt
magnet:?xt=urn:tree:tiger:5MBKRFGPFAS74GO234WPHSMNL3PH53N5E47IDTY&xl=7&dn=f.txt
magnet:?xt=urn:tree:tiger:TQ6K2U6YLFR4MBZ7JPVRHW2NOULXGQLXFTBMCXA&xl=6&dn=g.txt

It appears to me the "%26" -> & breaks the handling of the link and those in the same message below it.
Clicking on the link above brings the expected magnet link detected window to download the file, the broken one and those below open a search instead.
Clicking on the working link above fixes the ones not handled as expected until airdc++ gets restarted.
Right mouse -> download worked as expected in my test.

Code: Select all
magnet:?xt=urn:tree:tiger:UVGAVVEPOCV6J4YO2GJYNG336JESOVKGGX37W7Q&xl=3&dn=a.txt
magnet:?xt=urn:tree:tiger:JG3H3V6GLWY2HSFKX4LUVIYAZAFJEIOYMYZZQ6I&xl=13&dn=a%23b.txt
magnet:?xt=urn:tree:tiger:YS3KLSN6YDVCADYJFNNWJRFMIMP7BWOUKXF2SOA&xl=15&dn=a+%23+c.txt

%23 "#" breaks too.

so does
Code: Select all
magnet:?xt=urn:tree:tiger:OUDHKSX2AFB3CXK5YTM3KSNQF6NH7DH7EEWFOUY&xl=6&dn=b.txt
magnet:?xt=urn:tree:tiger:XW6S5JEBIFMN7FGCONAU37YFQ632NDMMV3KE4RA&xl=13&dn=c+%40+q.txt
magnet:?xt=urn:tree:tiger:A2MBX2JYKX2G6E6NMOZYS5CB7CNKIAOEHCVCQQA&xl=13&dn=vc%40f.txt

%40 "@".

It seems to me does the copy magnet link and/or link handling in general are flawed and not robust when special or reserved characters in file names occur.
I've seen wierd things happening too, when someone used an opening parenthesis but didn't closed it in the filename. I understand does parsing and other things can get messed up by this, but normal users expect a "filename" to be simply handled as string and it should work as such even if it is not syntactically correct ;)
Executer
 
Posts: 1
Joined: 06 Dec 2019, 22:13

Re: 4.10 Magnet Link left mouse in chat opens search

Postby maksis » 18 Jan 2021, 13:54

This issue is reproducible only in NMDC hubs, as the links are working fine in ADC hubs
User avatar
maksis
Site Admin
 
Posts: 915
Joined: 23 Nov 2010, 18:56


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 5 guests