[Bug 1285204] [NEW] problem with paths with spaces with ubuntu12.04 client with ubuntu13.10 server
Stephane Chazelas
stephane.chazelas at seebyte.com
Wed Feb 26 15:05:53 UTC 2014
Public bug reported:
Note that it is related but not the same bug as
https://bugs.launchpad.net/ubuntu/+source/subversion/+bug/1284641
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
</Location>
EOF
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:
REQUEST:
CHECKOUT /!svn/ver/19/A%20B/test HTTP/1.1\r
RESPONSE:
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:
REQUEST:
PUT /!svn/wrk/52a9ffc7-ace1-41be-83f1-5814bd19d0ab/A%2520B/test
HTTP/1.1\r
RESPONSE:
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
https://issues.apache.org/bugzilla/show_bug.cgi?id=54611 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.
** Affects: subversion (Ubuntu)
Importance: Undecided
Status: New
** Patch added: "potential fix for the issue"
https://bugs.launchpad.net/bugs/1285204/+attachment/3997883/+files/patch
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to subversion in Ubuntu.
https://bugs.launchpad.net/bugs/1285204
Title:
problem with paths with spaces with ubuntu12.04 client with
ubuntu13.10 server
Status in “subversion” package in Ubuntu:
New
Bug description:
Note that it is related but not the same bug as
https://bugs.launchpad.net/ubuntu/+source/subversion/+bug/1284641
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
</Location>
EOF
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:
REQUEST:
CHECKOUT /!svn/ver/19/A%20B/test HTTP/1.1\r
RESPONSE:
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:
REQUEST:
PUT /!svn/wrk/52a9ffc7-ace1-41be-83f1-5814bd19d0ab/A%2520B/test
HTTP/1.1\r
RESPONSE:
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
https://issues.apache.org/bugzilla/show_bug.cgi?id=54611 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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/subversion/+bug/1285204/+subscriptions
More information about the foundations-bugs
mailing list