GNOME Bugzilla – Bug 765828
Open in Remote Terminal crash on a sftp folder with % character
Last modified: 2016-05-02 20:52:53 UTC
hello, With Nautilus, I can go to a remote directory that contains a % character. But when I open a remote terminal, it crash immediately. If I rename the folder to remove that character, the remote terminal doesn't crash anymore. My folder : Ben Folds & Nick Hornby - Lonely Avenue (flac - 100% log) I tested on Ubuntu GNOME 16.04 (GNOME 3.18), Arch Linux (Nautilus 3.20.1 and GNOME Terminal 3.20.1) with French locales, and Fedora 24 Alpha (Nautilus 3.20.0 and GNOME Terminal 3.20.1) with English locales.
Does it really 'crash' or just close again immediately? If it does crash, please extract the stack trace from abrt/coredumpctl/... (whatever works on ubuntu).
I can reproduce. The ssh connection closes, g-t does not crash. Upon opening a Remote Terminal in a "normal" directory, the local ssh command is: ssh -t abc.xy cd '/full/path/to/directory' && exec $SHELL - With the % character in the directory name, the local ssh command is: ssh -t abc.xy cd (null) && exec $SHELL -
This is quite suspicious: terminal-nautilus.c /* a very simple URI parsing routine from Launchpad #333462, until GLib supports URI parsing (GNOME #489862) */ #define SFTP_PREFIX "sftp://" static void parse_sftp_uri (GFile *file, [blahblah...] Bug 489862 isn't resolved yet.
Nope, there's actually no problem here.
Created attachment 327105 [details] [review] Fix - don't unescape twice ssh_argv() first calls parse_sftp_uri() which already unescapes the URI encoding (e.g. turns "%25" into "%") and then ssh_argv() tried to unescape it once again.
Comment on attachment 327105 [details] [review] Fix - don't unescape twice Thanks! Ok for master and 3-20.
Review of attachment 327105 [details] [review]: Committed