subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Foad <julianf...@apache.org>
Subject Re: New canonicalization functions [was: Subversion Exception!]
Date Fri, 14 Dec 2018 17:14:05 GMT
Julian Foad wrote:
> Are you willing to add random-input testing for them?

The attached patch 'dirent-uri-test-random-2.patch' tests rules like:

  * every result should pass an X_is_canonical() test (obvious by code inspection);
  * every other input should produce SVN_ERR_CANONICALIZATION_FAILED;
  * when a path is "canonical", it should be unchanged by "canonicalize".

Some findings:

  * svn_uri_canonicalize_safe("") aborts;
  * svn_uri_canonicalize_safe("/foo") aborts;
  * upper/lower case inconsistencies in URIs

I previously also found upper/lower case inconsistencies in dirent drive letters, when running
these tests with "#define SVN_USE_DOS_PATHS" set in dirent_uri.c, but am right now failing
to replicate that.

>   * the 'relpath' one is not needed because, AFAIK, it's possible to canonicalize any
>     relpath and we already do;

Maybe that will no longer be true if we decide to disallow some characters (control characters)
and/or check for valid UTF-8 in the future.

-- 
- Julian

Mime
View raw message