Commit 68043649 authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  Revert this patch.  It indicates some fundamental brokenness with the
  apr_filepath_root() fn, which should simply return '/' for an absolute
  path on (most) unix, and advance the path pointer to the first non-'/'
  character  [if only Win32 and others were so simple ;-]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90605 13f79535-47bb-0310-9956-ffa450edef68
parent 6cf3c0d1
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -259,13 +259,8 @@ AP_DECLARE(int) ap_os_is_path_absolute(apr_pool_t *p, const char *dir)
{
    const char *newpath;
    const char *ourdir = dir;
    apr_status_t rv = apr_filepath_root(&newpath, &dir, 0, p);

    if (rv == APR_EABSOLUTE) {
        return 1;
    }

    if (rv != APR_SUCCESS || strncmp(newpath, ourdir, strlen(newpath)) != 0) {
    if (apr_filepath_root(&newpath, &dir, 0, p) != APR_SUCCESS
            || strncmp(newpath, ourdir, strlen(newpath)) != 0) {
        return 0;
    }
    return 1;