]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
cover mixed slashes, simplify
authorEric Covener <covener@apache.org>
Mon, 1 Dec 2025 12:01:44 +0000 (12:01 +0000)
committerEric Covener <covener@apache.org>
Mon, 1 Dec 2025 12:01:44 +0000 (12:01 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1930162 13f79535-47bb-0310-9956-ffa450edef68

server/core.c

index 11e8a821c745570e9dbc6e94d33d3fda752f3524..1dad12348c643c8c1132e184e7fcefa81dbad66d 100644 (file)
@@ -6036,8 +6036,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 */
     }