mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-05 14:03:12 +03:00
Fixed \ handling in Include command on Windows.
This commit is contained in:
@@ -849,6 +849,10 @@ static const char *process_resource_config_fnmatch(const char *path,
|
|||||||
|
|
||||||
/* find the first part of the filename */
|
/* find the first part of the filename */
|
||||||
rest = ap_strchr_c(fname, '/');
|
rest = ap_strchr_c(fname, '/');
|
||||||
|
|
||||||
|
if(rest == NULL)
|
||||||
|
rest = ap_strchr_c(fname, '\\');
|
||||||
|
|
||||||
if (rest) {
|
if (rest) {
|
||||||
fname = apr_pstrndup(ptemp, fname, rest - fname);
|
fname = apr_pstrndup(ptemp, fname, rest - fname);
|
||||||
rest++;
|
rest++;
|
||||||
@@ -953,7 +957,7 @@ AP_DECLARE(const char *) process_fnmatch_configs(apr_array_header_t *ari,
|
|||||||
const char *rootpath, *filepath = fname;
|
const char *rootpath, *filepath = fname;
|
||||||
|
|
||||||
/* locate the start of the directories proper */
|
/* locate the start of the directories proper */
|
||||||
status = apr_filepath_root(&rootpath, &filepath, APR_FILEPATH_TRUENAME, ptemp);
|
status = apr_filepath_root(&rootpath, &filepath, APR_FILEPATH_TRUENAME | APR_FILEPATH_NATIVE, ptemp);
|
||||||
|
|
||||||
/* we allow APR_SUCCESS and APR_EINCOMPLETE */
|
/* we allow APR_SUCCESS and APR_EINCOMPLETE */
|
||||||
if (APR_ERELATIVE == status) {
|
if (APR_ERELATIVE == status) {
|
||||||
|
Reference in New Issue
Block a user