Skip to content

Commit 3596994

Browse files
authored
Merge pull request #3024 from martinhsv/v3/master
Add WRDE_NOCMD to wordexp call
2 parents 5b094c0 + 4c7a9bd commit 3596994

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGES

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
v3.x.y - YYYY-MMM-DD (to be released)
22
-------------------------------------
33

4+
- Add WRDE_NOCMD to wordexp call
5+
[Issue #3024 - @sahruldotid, @martinhsv]
46
- Fix: validateDTD compile fails if when libxml2 not installed
57
[Issue #3014 - @zangobot, @martinhsv]
68
- Fix memory leak of validateDTD's dtd object

src/utils/system.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* ModSecurity, http://www.modsecurity.org/
3-
* Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwave.com/)
3+
* Copyright (c) 2015 - 2023 Trustwave Holdings, Inc. (http://www.trustwave.com/)
44
*
55
* You may not use this file except in compliance with
66
* the License. You may obtain a copy of the License at
@@ -130,6 +130,7 @@ std::list<std::string> expandEnv(const std::string& var, int flags) {
130130
for (char** exp = p.gl_pathv; *exp; ++exp) {
131131
#else
132132
wordexp_t p;
133+
flags = flags | WRDE_NOCMD;
133134
if (wordexp(var.c_str(), &p, flags) == false) {
134135
if (p.we_wordc) {
135136
for (char** exp = p.we_wordv; *exp; ++exp) {

0 commit comments

Comments
 (0)