Skip to content

Commit 6aa64b2

Browse files
committed
cover mixed slashes, simplify
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1930162 13f79535-47bb-0310-9956-ffa450edef68
1 parent ecc1b8f commit 6aa64b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6036,8 +6036,8 @@ static apr_status_t check_unc(const char *path, apr_pool_t *p)
60366036
return APR_SUCCESS; /* this early, if we have a UNC, it's specified by an admin */
60376037
}
60386038

6039-
if (!path || (path != ap_strstr_c(path, "\\\\") &&
6040-
path != ap_strstr_c(path, "//"))) {
6039+
if (!path || !((path[0] == '\\' || path[0] == '/')
6040+
&& (path[1] == '\\' || path[1] == '/'))) {
60416041
return APR_SUCCESS; /* not a UNC */
60426042
}
60436043

0 commit comments

Comments
 (0)