You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/07/16 13:21:44 UTC

svn commit: r964767 - in /subversion/trunk/subversion: include/private/svn_opt_private.h libsvn_subr/opt.c

Author: stylesen
Date: Fri Jul 16 11:21:44 2010
New Revision: 964767

URL: http://svn.apache.org/viewvc?rev=964767&view=rev
Log:
Fix issue #3683 - 'Escape unsafe charaters in a URL during export.'

* subversion/include/private/svn_opt_private.h
  (svn_opt__arg_canonicalize_url): Fix comment for the above change.

* subversion/libsvn_subr/opt.c
  (svn_opt__arg_canonicalize_url): Remove check for proper URI encoding
   of the target URL, since it is not required. This is because, just
   few lines down the code we call svn_uri_canonicalize() which actually
   URI encodes all characters based on svn_uri__char_validity table.

Modified:
    subversion/trunk/subversion/include/private/svn_opt_private.h
    subversion/trunk/subversion/libsvn_subr/opt.c

Modified: subversion/trunk/subversion/include/private/svn_opt_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_opt_private.h?rev=964767&r1=964766&r2=964767&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_opt_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_opt_private.h Fri Jul 16 11:21:44 2010
@@ -66,7 +66,6 @@ svn_opt__split_arg_at_peg_revision(const
 /* Attempt to transform URL_IN, which is a URL-like user input, into a
  * valid URL:
  *   - escape IRI characters and some other non-URI characters
- *   - check that only valid URI characters remain
  *   - check that no back-path ("..") components are present
  *   - canonicalize the separator ("/") characters
  * URL_IN is in UTF-8 encoding and has no peg revision specifier.

Modified: subversion/trunk/subversion/libsvn_subr/opt.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/opt.c?rev=964767&r1=964766&r2=964767&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/opt.c (original)
+++ subversion/trunk/subversion/libsvn_subr/opt.c Fri Jul 16 11:21:44 2010
@@ -941,12 +941,6 @@ svn_opt__arg_canonicalize_url(const char
   /* Auto-escape some ASCII characters. */
   target = svn_path_uri_autoescape(target, pool);
 
-  /* The above doesn't guarantee a valid URI. */
-  if (! svn_path_is_uri_safe(target))
-    return svn_error_createf(SVN_ERR_BAD_URL, 0,
-                             _("URL '%s' is not properly URI-encoded"),
-                             target);
-
   /* Verify that no backpaths are present in the URL. */
   if (svn_path_is_backpath_present(target))
     return svn_error_createf(SVN_ERR_BAD_URL, 0,