! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
exo-open breaks magnet links
Status:
RESOLVED: FIXED

Comments

Description Arkadiy Illarionov 2015-05-29 09:36:46 CEST
After commit
http://git.xfce.org/xfce/exo/commit/?id=a2ac10b6b5c3378a46812a64f1afbbb22c38a8f9
exo-open escapes ? in magnet?:xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C with %3F. Magnet links handler (qBittorrent) handles it as incorrent magnet link.
Comment 1 Arkadiy Illarionov 2015-05-29 22:05:30 CEST
Created attachment 6296 
Non-ASCII path error

Also can't open files with non-ASCII symbols in path.
Comment 2 Nemo Inis 2015-06-11 08:34:35 CEST
I think this is related:
-between exo 0.10.4 and exo 0.10.6 (which, basically, points to the commit that Arkadiy Illarionov mentioned), exo-open does not open anything with "%20" in it.
This breaks Calibre when it tries to open the folder path to a book.
Comment 3 Felipe Contreras 2015-07-24 17:59:29 CEST
Again? (bug #9597).

Does nobody do any testing? Is there no 'make check'?

Please revert that commit, it's clearly a broken change that was done without any consideration to what exo-open actually does.

First of all it's obvious that the escaping should be done ONLY in exo_open_find_scheme(); that's where we take a path and convert it to URL, it's totally stupid to assume that all the input of exo-open should be escaped.

Secondly, why does 'exo-open file://$PWD/bla%23kdfj.txt' doesn't work?

Clearly that change should be reverted until somebody does think this through and makes a patch that works correctly, and hopefully with some actual testing.
Comment 4 Felipe Contreras 2015-07-24 18:27:03 CEST
I wrote a patch that actually works.
https://bugzilla.xfce.org/attachment.cgi?id=6394

The original commit is wrong, if you revert that and apply my patch everything works:

* exo-open 'magnet:?xt=urn:btih:...'
* exo-open 'file:///tmp/foo%23bar.txt'
* exo-open '/tmp/foo#bar.txt'
Comment 5 Sean Davis editbugs 2015-08-26 10:16:21 CEST
Applied patch at http://git.xfce.org/xfce/exo/commit/?id=6faf134307a8f651c09931ae4f7017ce141f6320

Thanks!
Comment 6 Rob McCathie 2015-09-01 11:18:31 CEST
Please do an exo release so this gets rolled out.

Magnet links being broken is, IMO at least, significant.
Comment 7 Adam Spiers 2015-09-17 20:10:30 CEST
IIUC, this fix appeared in the 0.10.7 release.

Bug #11942

Reported by:
Arkadiy Illarionov
Reported on: 2015-05-29
Last modified on: 2015-09-17

People

Assignee:
Nick Schermer
CC List:
6 users

Version

Version:
unspecified

Attachments

Non-ASCII path error (25.76 KB, image/png)
2015-05-29 22:05 CEST , Arkadiy Illarionov
no flags

Additional information