subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philip Martin <phi...@codematters.co.uk>
Subject Canonicalization of dubious URLs
Date Sat, 29 Jul 2017 18:54:37 GMT
Consider

  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
svn_uri_is_canonical():

  foo://bar::
  foo://bar:123x
  foo://bar:-

How should strings like this be handled?

-- 
Philip

Mime
View raw message