[svk-devel] [PATCH] Bad URL passed to RA layer: Malformed URL for repository

Péter Werner list.svk at 0x.hu
Sun Oct 7 05:30:01 EDT 2007


Hi,

I had problem mirroring one of my svn repositories.

It seems some escaping is missing from SVN::Mirror, see the attached
oneliner patch, which solved my problem.

http://rt.openfoundry.org/Foundry/Project/Tracker/Display.html?Queue=82&id=29840
http://rt.cpan.org/Ticket/Display.html?id=28118

http://lists.bestpractical.com/pipermail/svk-devel/2007-January/000549.html
http://lists.bestpractical.com/pipermail/svk-devel/2007-June/000944.html

  WP
-------------- next part --------------
--- SVN-Mirror-0.73.orig/lib/SVN/Mirror/Ra.pm	2007-03-19 23:59:12.000000000 +0100
+++ SVN-Mirror-0.73/lib/SVN/Mirror/Ra.pm	2007-10-07 08:37:36.000000000 +0200
@@ -168,6 +168,9 @@
     $self->{config} ||= SVN::Core::config_get_config(undef, $self->{pool});
     $self->{auth} ||= $self->_new_auth;
 
+    # escape URI (% is already escaped)
+    $arg{'url'} =~ s/([^-_:.%\/a-zA-Z0-9])/sprintf("%%%02X", ord($1))/eg if defined $arg{'url'};
+
     SVN::Ra->new( url => $self->{rsource},
 		  auth => $self->{auth},
 		  config => $self->{config},


More information about the svk-devel mailing list