Accessing objects with "[" or "]" in name via webdav results in "Invalid response"

Bug #683443 reported by Roman Yepishev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gvfs
Fix Released
Medium
gvfs (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Distributor ID: Ubuntu
Description: Ubuntu 10.10
Release: 10.10
Codename: maverick

gvfs2-backends: 1.6.4-0ubuntu1.1

STR:
1. Create a file on webdav-enabled location with "[" in the filename
2. Attempt to access this file via gvfs/nautilus

Actual results:
"Invalid response" from nautilus
"Input/Output error" from ls on a .gvfs directory

Expected results:
These file name symbols should not affect the ability to access it through gvfs-webdav.

Roman Yepishev (rye)
Changed in gnome-vfs2 (Ubuntu):
assignee: nobody → Roman Yepishev (rye)
Roman Yepishev (rye)
summary: - Accessing objects with "[" or "]" via webdav results in "Invalid
+ Accessing objects with "[" or "]" in name via webdav results in "Invalid
response"
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, that seems an upstream issue in the gvfs dav backend

affects: gnome-vfs2 (Ubuntu) → gvfs (Ubuntu)
Changed in gvfs (Ubuntu):
importance: Undecided → Low
Revision history for this message
Roman Yepishev (rye) wrote :

@Sebastien, yes, thanks for switching the project.

So, it turns out that the path checks are not very robust:

The path comparison uses the urlencoded strings but the case of hexadecimal letters is not preserved. E.g. for me it checks the following paths:

- /Downloads/test%20file%5bin_brackets%5d/
- /Downloads/test%20file%5Bin_brackets%5D

So after some kind of normalization these paths are different - %5b vs %5B and trailing slash is missing. Basically any character that will be urlencoded with A-F in the resulting hex will cause the first mismatch.

Revision history for this message
Roman Yepishev (rye) wrote :

Here's a patch for gvfsbackenddav.c which fixes this issue.

Roman Yepishev (rye)
tags: added: patch patch-forwarded-upstream
Changed in gvfs:
importance: Unknown → Medium
status: Unknown → New
Changed in gvfs (Ubuntu):
status: New → Triaged
Changed in gvfs:
status: New → In Progress
Changed in gvfs (Ubuntu):
assignee: Roman Yepishev (rye) → nobody
status: Triaged → Fix Committed
Changed in gvfs:
status: In Progress → Fix Released
Martin Pitt (pitti)
Changed in gvfs (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.