[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Canonicalization of dubious URLs

From: Philip Martin <philip_at_codematters.co.uk>
Date: Sat, 29 Jul 2017 19:54:37 +0100


  svnadmin create repo
  svnmucc -mm propset svn:externals 'foo://bar::/ X' ''
  svn co file://`pwd`/repo wc

1.8 gives a warning on checkout:

  svn: warning: W170000: Illegal repository URL 'foo://bar::'

but 1.9 gives a SEGV:

  svn: ../src/subversion/libsvn_subr/dirent_uri.c:1529: uri_skip_ancestor: Assertion `svn_uri_is_canonical(child_uri, NULL)' failed.

svn_uri_is_canonical() is complaining about the final "::" but this
string is the output of svn_uri_canonicalize(). I think Subversion code
should be able to rely on logic like this:

  assert(svn_uri_is_canonical(svn_uri_canonicalize(str, pool)));

or perhaps that only applies when

  if (svn_path_is_url(str))
    assert(svn_uri_is_canonical(svn_uri_canonicalize(str, pool)));

Is that right?

These strings returned by svn_uri_canonicalize() fail


How should strings like this be handled?

Received on 2017-07-29 20:54:43 CEST

This is an archived mail posted to the Subversion Dev mailing list.