After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 546256 - Never try to unescape (http/dav) URIs
Never try to unescape (http/dav) URIs
Status: RESOLVED OBSOLETE
Product: gvfs
Classification: Core
Component: client module
git master
Other Linux
: High major
: ---
Assigned To: gvfs-maint
gvfs-maint
: 539967 546625 555070 563367 564327 564393 569767 581032 588241 625413 (view as bug list)
Depends on:
Blocks: 588348 591180
 
 
Reported: 2008-08-04 15:45 UTC by Sebastien Bacher
Modified: 2018-09-21 16:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastien Bacher 2008-08-04 15:45:16 UTC
the bug has been opened on https://bugs.launchpad.net/ubuntu/+source/rhythmbox/+bug/254617

Binary package hint: rhythmbox

Rhythmbox 0.11.6 crashes on initial startup after upgrade. The problem appears to be in the URI canonicalisation as this is the last message in the debug log:

(11:07:41) [0x96cb408] [rb_shell_constructor] rb-shell.c:1418: loading database
(11:07:41) [0x96cb408] [rb_shell_constructor] rb-shell.c:1421: shell: syncing window state
(11:07:41) [0xa4bbac0] [rhythmdb_tree_parser_start_element] rhythmdb-tree.c:379: loading database version 1.4 (140)
(11:07:41) [0xa4bbac0] [rhythmdb_tree_parser_start_element] rhythmdb-tree.c:392: old version of rhythmdb, performing URI canonicalisation for all entries (DB version 1.4)
zsh: segmentation fault rhythmbox -d --dry-run

The problem appears to be with a single podcast entry in the rhythmdb.xml. I'll attach the snipplet here.

0.11.6svn20080731-0ubuntu3"

the debug stracktrace:

"#0  g_mount_spec_canonicalize_path (path=0x0) at gmountspec.c:480
        canon = <value optimized out>
        start = <value optimized out>
        p = <value optimized out>
        q = <value optimized out>
  • #1 g_daemon_file_new
    at gdaemonfile.c line 99
  • #2 g_daemon_vfs_get_file_for_uri
    at gdaemonvfs.c line 374
  • #3 IA__g_vfs_get_file_for_uri
    at /build/buildd/glib2.0-2.17.4/gio/gvfs.c line 123
  • #4 IA__g_file_new_for_uri
    at /build/buildd/glib2.0-2.17.4/gio/gfile.c line 4852
  • #5 rb_canonicalise_uri
    at rb-file-helpers.c line 713
  • #6 rhythmdb_tree_parser_end_element
    at rhythmdb-tree.c line 596
  • #7 xmlParseEndTag1
    at parser.c line 7623
  • #8 xmlParseElement__internal_alias
    at parser.c line 8985
  • #9 xmlParseContent__internal_alias
    at parser.c line 8789
  • #10 xmlParseElement__internal_alias
    at parser.c line 8959
  • #11 xmlParseContent__internal_alias
    at parser.c line 8789

Comment 1 Jonathan Matthew 2008-08-04 22:17:43 UTC
This appears to be a bug in gvfs.  'gvfs-info http://feeds.feedburner.com/~r/omahm/~5/http%5A%2F%2Fbinaryzone.ziphoid.com%2FOMAHM_Show3_Follintastic.mp3' crashes in the same way, as far as I can tell.  Replacing the %2Fs in the URI stops it crashing.

http_from_uri() returns with info->path == NULL if g_vfs_decode_uri() fails.  It's not particularly clear who should handle path being NULL thereafter.  It currently crashes because g_mount_spec_canonicalize_path() doesn't handle NULL input.
Comment 2 Christian Kellner 2008-08-06 17:07:44 UTC
*** Bug 546625 has been marked as a duplicate of this bug. ***
Comment 3 Christian Kellner 2008-08-06 17:12:43 UTC
Yep, we shouldn't be returning a non-NULL MountInfo with path set to NULL in case of g_vfs_decode_uri () failing. Of course its also a bug (another one) that we try to unescpae the path in the first place. The actual problem is that we try to unescape %2F resulting in / which we forbid in g_vfs_decode_uri. We shouldn't be doing that, at least not for http. So the correct fix is to 1) never return MountInfo with path == NULL and also not to try to unescape the path in the first place. I'll cook up a patch that does both.
Comment 4 Matthias Clasen 2008-08-25 04:25:56 UTC
A patch for the first part is attached to bug 539967
Comment 5 Christian Kellner 2008-09-05 10:46:08 UTC
*** Bug 539967 has been marked as a duplicate of this bug. ***
Comment 6 Christian Persch 2008-10-05 11:19:45 UTC
*** Bug 555070 has been marked as a duplicate of this bug. ***
Comment 7 Daniel Gryniewicz 2008-11-03 15:01:31 UTC
This happens in gnome-terminal too, with the following URL:

http://github.com/eatnumber1/pcsx2-overlay/tree/master%2Flayman-local.cfg?raw=true
Comment 8 Christian Persch 2008-12-13 18:23:00 UTC
*** Bug 564393 has been marked as a duplicate of this bug. ***
Comment 9 Christian Persch 2008-12-13 18:28:35 UTC
*** Bug 564327 has been marked as a duplicate of this bug. ***
Comment 10 Fryderyk Dziarmagowski 2009-01-27 21:46:08 UTC
any news here?
Comment 11 Christian Persch 2009-01-30 12:34:11 UTC
*** Bug 569767 has been marked as a duplicate of this bug. ***
Comment 12 Baptiste Mille-Mathias 2009-01-30 12:37:20 UTC
I raise severity to Critical if it matters, Iwonder if it shouldn't be put to urgent, as it makes crash application on a well defined URLs
Comment 13 Matthias Clasen 2009-02-01 18:23:06 UTC
Should be a 2.26 showstopper, imo
Comment 14 Baptiste Mille-Mathias 2009-02-01 18:30:39 UTC
I second this
Comment 15 Christian Kellner 2009-02-16 11:15:31 UTC
I have committed a patch to fix the crash. Of course that only fixed the symptom not the real cause. I will rename that bug and change the severity since the second part, namely "also not to try to unescape the
path in the first place." is not done yet. That crash should be gone though.
Comment 16 Christian Persch 2009-07-11 11:33:50 UTC
*** Bug 588241 has been marked as a duplicate of this bug. ***
Comment 17 Christian Kellner 2011-05-14 09:42:28 UTC
*** Bug 581032 has been marked as a duplicate of this bug. ***
Comment 18 Akhil Laddha 2011-10-04 09:51:57 UTC
*** Bug 625413 has been marked as a duplicate of this bug. ***
Comment 19 Ondrej Holy 2013-10-03 16:21:25 UTC
*** Bug 563367 has been marked as a duplicate of this bug. ***
Comment 20 GNOME Infrastructure Team 2018-09-21 16:24:06 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gvfs/issues/54.