You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2013/10/10 06:01:59 UTC
svn commit: r1530850 - in /subversion/branches/1.8.x: ./ STATUS
subversion/libsvn_subr/dirent_uri.c
subversion/tests/libsvn_subr/dirent_uri-test.c
Author: svn-role
Date: Thu Oct 10 04:01:59 2013
New Revision: 1530850
URL: http://svn.apache.org/r1530850
Log:
Merge r1516806 from trunk:
* r1516806
Do not look at the hostname part of an URI when checking that
the schema data is canonical.
Justification:
As reported on dev@, "svn co file://./" and similar commands abort
instead of returning an error that the URL is invalid. This was
caused by svn_uri_is_canonical treating the hostname "." as a path
segment. After this change, svn_uri_is_canonicall correctly
determines that the URL is (syntactically) canonical, and the
commands later faile with a normal error in the RA layer, which
validates the semantics of the hostname.
Votes:
+1: brane, rhuijben, stefan2
Modified:
subversion/branches/1.8.x/ (props changed)
subversion/branches/1.8.x/STATUS
subversion/branches/1.8.x/subversion/libsvn_subr/dirent_uri.c
subversion/branches/1.8.x/subversion/tests/libsvn_subr/dirent_uri-test.c
Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1516806
Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1530850&r1=1530849&r2=1530850&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Thu Oct 10 04:01:59 2013
@@ -147,20 +147,6 @@ Veto-blocked changes:
Approved changes:
=================
- * r1516806
- Do not look at the hostname part of an URI when checking that
- the schema data is canonical.
- Justification:
- As reported on dev@, "svn co file://./" and similar commands abort
- instead of returning an error that the URL is invalid. This was
- caused by svn_uri_is_canonical treating the hostname "." as a path
- segment. After this change, svn_uri_is_canonicall correctly
- determines that the URL is (syntactically) canonical, and the
- commands later faile with a normal error in the RA layer, which
- validates the semantics of the hostname.
- Votes:
- +1: brane, rhuijben, stefan2
-
* r1519615, r1519617, r1519733
Fix a memory problem in the 3rd party FS module loader.
Changes[dev]:
Modified: subversion/branches/1.8.x/subversion/libsvn_subr/dirent_uri.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_subr/dirent_uri.c?rev=1530850&r1=1530849&r2=1530850&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_subr/dirent_uri.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_subr/dirent_uri.c Thu Oct 10 04:01:59 2013
@@ -1857,6 +1857,9 @@ svn_uri_is_canonical(const char *uri, ap
#endif /* SVN_USE_DOS_PATHS */
/* Now validate the rest of the URI. */
+ seg = ptr;
+ while (*ptr && (*ptr != '/'))
+ ptr++;
while(1)
{
apr_size_t seglen = ptr - seg;
@@ -1875,9 +1878,8 @@ svn_uri_is_canonical(const char *uri, ap
if (*ptr == '/')
ptr++;
- seg = ptr;
-
+ seg = ptr;
while (*ptr && (*ptr != '/'))
ptr++;
}
Modified: subversion/branches/1.8.x/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1530850&r1=1530849&r2=1530850&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/branches/1.8.x/subversion/tests/libsvn_subr/dirent_uri-test.c Thu Oct 10 04:01:59 2013
@@ -911,6 +911,9 @@ static const testcase_canonicalize_t uri
{ "file:///C:/temp/REPOS", "file:///C:/temp/REPOS" },
{ "file:///c:/", "file:///c:" },
#endif /* SVN_USE_DOS_PATHS */
+ /* Hostnames that look like non-canonical paths */
+ { "file://./foo", "file://./foo" },
+ { "http://./foo", "http://./foo" },
/* svn_uri_is_canonical() was a private function in the 1.6 API, and
has since taken a MAJOR change of direction, namely that only
absolute URLs are considered canonical uris now. */