Fix on top of #1677

This commit is contained in:
Felipe Zimmerle 2018-02-26 17:53:18 -03:00
parent f16eb8b54a
commit dca642369e
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277
4 changed files with 9 additions and 4 deletions

View File

@ -8,7 +8,7 @@ v3.0.x - YYYY-MMM-DD (To be released)
- Fix "make dist" target to include necessary headers for Lua
[Issue #1678 - @defanator]
- Fix "include /foo/*.conf" for single matched object in directory
[Issue #1677 - @defanator]
[Issue #1677 - @defanator, @zimmerle]
- Add missing Base64 transformation statements to parser
[Issue #1632 - @victorhora, @zimmerle]
- Fixed resource load on ip match from file

View File

@ -34,7 +34,7 @@ bool IpMatchFromFile::init(const std::string &file,
if (m_param.compare(0, 8, "https://") == 0) {
res = m_tree.addFromUrl(m_param, &e);
} else {
std::string resf = utils::find_resource(m_param, file, error);\
std::string resf = utils::find_resource(m_param, file, error);
if (resf == "") {
return false;
}

View File

@ -123,7 +123,12 @@ std::list<std::string> expandEnv(const std::string& var, int flags) {
if (wordexp(var.c_str(), &p, flags) == false) {
if (p.we_wordc) {
for (char** exp = p.we_wordv; *exp; ++exp) {
vars.push_back(exp[0]);
std::ifstream *iss = new std::ifstream(exp[0], std::ios::in);
if (iss->is_open()) {
iss->close();
delete iss;
vars.push_back(exp[0]);
}
}
}
wordfree(&p);

View File

@ -1,2 +1,2 @@
SecRule ARGS "@contains config_example" "id:10,pass,t:trim"
SecRule ARGS "@missingOperator config_example" "id:11,pass,t:trim"
SecRule ARGS 123 "@missingOperator config_example" "id:11,pass,t:trim"