Klaus Rennecke <kre@tigris.org>

r850285, r850273, r850219, r850209

r850209 | jpieper | 2004-07-04 14:56:45 +0000 (Sun, 04 Jul 2004)

Treat the hostname portion of URLs specially in svn_path_canonicalize
so that "/../" cannot backpath over it.  

Patch by: Klaus Rennecke <kre@tigris.org>
(Test cases by me.)

* subversion/libsvn_subr/path.c
  (svn_path_canonicalize): Copy over the hostname unmangled, so that
    absolute_path is set correctly for URLs.

* subversion/tests/libsvn_subr/path-test.c
  (test_canonicalize): Add some URLs into the test cases for

r850219 | jpieper | 2004-07-05 18:32:14 +0000 (Mon, 05 Jul 2004)

Factorize the common code from svn_path_remove_component and
svn_path_dirname.  Also, fix a whitespace formatting issue introduced
in r10135.  

Patch by: Klaus Rennecke <kre@tigris.org> 
(Tweaked by me: whitespace fix and docstring addition.)

* subversion/libsvn_subr/path.c
  (previous_segment): New factorized routine that finds the end of the
    previous path segment.
  (svn_path_remove_component, svn_path_dirname): Utilize the newly
    created previous_segment.
  (svn_path_canonicalize): Add whitespace after a while statement.

r850273 | breser | 2004-07-09 17:53:37 +0000 (Fri, 09 Jul 2004)

Check that the two characters following the % escape are valid hex
digits. This serves to check for premature end of input as well.

Fixes Issue #1947.

Patch by: Klaus Rennecke <kre@tigris.org>

* subversion/libsvn_subr/path.c
  (svn_path_uri_decode): Check syntax of % escape.

r850285 | breser | 2004-07-10 09:56:22 +0000 (Sat, 10 Jul 2004)

Oops missed the test suite addition for Issue #1947.

Patch by: Klaus Rennecke <kre@tigris.org>

* subversion/tests/libsvn_subr/path-test.c
 (test_uri_decode): New test function.
 (test_funcs): Added test_uri_decode.