]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1930162 from trunk:
authorEric Covener <covener@apache.org>
Mon, 1 Dec 2025 12:05:45 +0000 (12:05 +0000)
committerEric Covener <covener@apache.org>
Mon, 1 Dec 2025 12:05:45 +0000 (12:05 +0000)
cover mixed slashes, simplify

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1930166 13f79535-47bb-0310-9956-ffa450edef68

server/core.c

index fbda9b6dbe01772a25d18d0a7c5d0c4ee680c2f4..925bb23018dc1ba80f5233eacbb600750041ad92 100644 (file)
@@ -5673,8 +5673,8 @@ static apr_status_t check_unc(const char *path, apr_pool_t *p)
         return APR_SUCCESS; /* this early, if we have a UNC, it's specified by an admin */
     }
 
-    if (!path || (path != ap_strstr_c(path, "\\\\") && 
-                path != ap_strstr_c(path, "//"))) { 
+    if (!path || !((path[0] == '\\' || path[0] == '/')
+                && (path[1] == '\\' || path[1] == '/'))) {
         return APR_SUCCESS; /* not a UNC */
     }