~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/libsvn_subr/path.c

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-08-07 21:32:47 UTC
  • mfrom: (0.2.15) (4.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20150807213247-ozyewtmgsr6tkewl
Tags: 1.9.0-1
* Upload to unstable
* New upstream release.
  + Security fixes
    - CVE-2015-3184: Mixed anonymous/authenticated path-based authz with
      httpd 2.4
    - CVE-2015-3187: svn_repos_trace_node_locations() reveals paths hidden
      by authz
* Add >= 2.7 requirement for python-all-dev Build-Depends, needed to run
  tests.
* Remove Build-Conflicts against ruby-test-unit.  (Closes: #791844)
* Remove patches/apache_module_dependency in favor of expressing the
  dependencies in authz_svn.load/dav_svn.load.
* Build-Depend on apache2-dev (>= 2.4.16) to ensure ap_some_authn_required()
  is available when building mod_authz_svn and Depend on apache2-bin (>=
  2.4.16) for runtime support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1164
1164
}
1165
1165
 
1166
1166
 
1167
 
/* Return a copy of PATH, allocated from POOL, for which control
1168
 
   characters have been escaped using the form \NNN (where NNN is the
1169
 
   octal representation of the byte's ordinal value).  */
1170
1167
const char *
1171
1168
svn_path_illegal_path_escape(const char *path, apr_pool_t *pool)
1172
1169
{
1228
1225
    {
1229
1226
      if (svn_ctype_iscntrl(*c))
1230
1227
        {
1231
 
          return svn_error_createf
1232
 
            (SVN_ERR_FS_PATH_SYNTAX, NULL,
 
1228
          return svn_error_createf(SVN_ERR_FS_PATH_SYNTAX, NULL,
1233
1229
             _("Invalid control character '0x%02x' in path '%s'"),
1234
1230
             (unsigned char)*c,
1235
1231
             svn_path_illegal_path_escape(svn_dirent_local_style(path, pool),
1256
1252
     anything after it?  We look for the "rightmost" period in the
1257
1253
     string. */
1258
1254
  last_dot = strrchr(path, '.');
1259
 
  if (last_dot && (last_dot + 1 != '\0'))
 
1255
  if (last_dot && (*(last_dot + 1) != '\0'))
1260
1256
    {
1261
1257
      /* If we have a period, we need to make sure it occurs in the
1262
1258
         final path component -- that there's no path separator
1303
1299
                             _("Improper relative URL '%s'"),
1304
1300
                             relative_url);
1305
1301
 
1306
 
  /* No assumptions are made about the canonicalization of the inut
 
1302
  /* No assumptions are made about the canonicalization of the input
1307
1303
   * arguments, it is presumed that the output will be canonicalized after
1308
1304
   * this function, which will remove any duplicate path separator.
1309
1305
   */
1310
1306
  *absolute_url = apr_pstrcat(pool, repos_root_url, relative_url + 1,
1311
 
                              (char *)NULL);
 
1307
                              SVN_VA_NULL);
1312
1308
 
1313
1309
  return SVN_NO_ERROR;
1314
1310
}