mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-12-31 21:59:11 +03:00
Using setenv instead of putenv on SetEnv action
This commit is contained in:
committed by
Felipe Zimmerle
parent
ba0007a474
commit
3a55909eae
@@ -35,10 +35,10 @@ namespace actions {
|
||||
bool SetENV::execute(Transaction *t) const noexcept {
|
||||
std::string colNameExpanded(getEvaluatedRunTimeString(t));
|
||||
|
||||
auto pair = utils::string::ssplit_pair(colNameExpanded, '=');
|
||||
ms_dbg_a(t, 8, "Setting envoriment variable: "
|
||||
+ colNameExpanded + ".");
|
||||
|
||||
putenv(strdup(colNameExpanded.c_str()));
|
||||
+ pair.first + " to " + pair.second);
|
||||
setenv(pair.first.c_str(), pair.second.c_str(), /*overwrite*/ 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user