From: Eric Covener Date: Mon, 1 Dec 2025 12:01:44 +0000 (+0000) Subject: cover mixed slashes, simplify X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6aa64b2f2d4a00148a58164ddc99b6d10ee87d32;p=thirdparty%2Fapache%2Fhttpd.git cover mixed slashes, simplify git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1930162 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/core.c b/server/core.c index 11e8a821c7..1dad12348c 100644 --- a/server/core.c +++ b/server/core.c @@ -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 */ }