problem with paths with spaces with ubuntu12.04 client with ubuntu13.10 server

Bug #1285204 reported by Stephane Chazelas on 2014-02-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subversion (Ubuntu)

Bug Description

Note that it is related but not the same bug as

Bug found in:

libapache2-mod-svn 1.7.9-1+nmu6ubuntu3
with 2.4.6-2ubuntu2.1

on ubuntu 13.10 amd64.

Committing a change on a file that has space characters (or other characters that need encoded in a URI) in its path with a subversion client prior to 1.7 (so typically ubuntu 12.04's 1.6.17) fails with this type of error:

File not found: transaction '91472-225x', path '/a%20b'

That hit me when upgrading a subversion repository from ubuntu 10.04 to ubuntu 13.10 after which no ubuntu 12.04 user could commit anything with a space in a file path. It is possible that this bug also affects 14.04 (svn 1.8.8 with apache 2.4.7), but one can't tell as bug 1284641 causes the commit to fail before we reach that point.

To reproduce:

On a ubuntu 13.10 server, run (as root):

apt-get install apache2 subversion libapache2-mod-svn
a2enmod dav_svn
svnadmin create /srv/svn
chown -R www-data: /srv/svn
cat > /etc/apache2/mods-available/dav_svn.conf << EOF
<Location /svn>
  DAV svn
  SVNPath /srv/svn
service apache2 restart

On a 12.04 client:

svn co http://server/svn test
cd test
mkdir -p 'A B/C'
echo test > 'A B/C/x'
svn add 'A B'
svn ci -m m1
echo test >> 'A B/C/x'
svn ci -m m2

That second commit will fail with something like:

File not found: transaction '2-225x', path '/A%20B/C/x'

Looking at the network traffic between client and server, we see a few HTTP requests and then:


CHECKOUT /!svn/ver/19/A%20B/test HTTP/1.1\r


HTTP/1.1 201 Created\r
Location: http://server/!svn/wrk/52a9ffc7-ace1-41be-83f1-5814bd19d0ab/A%2520B/test\r

(see how the %20 became %2520 (encoded again))

Followed by:


PUT /!svn/wrk/52a9ffc7-ace1-41be-83f1-5814bd19d0ab/A%2520B/test HTTP/1.1\r


HTTP/1.1 404 Not Found\r

Newer subversion clients are not affected because they use a different protocol, unless you add

SVNAdvertiseV2Protocol Off

to the dav_svn configuration.

That bug was introduced by a change in apache, by the fix to that encodes the location provided by dav_svn (while svn was already encoding it).

Please find a patch attached. That patch against 1.7.9 removes the encoding done by dav_svn.

Though I've done a fair amount of testing with it, I don't know enough about the apache/dav/svn architecture to guarantee that it won't break anything.

The attachment "potential fix for the issue" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers