mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Fix parser to support GeoLookup with MaxMind
This commit is contained in:
parent
0a88e0237f
commit
d97688804e
2
CHANGES
2
CHANGES
@ -1,6 +1,8 @@
|
|||||||
v3.0.3 - YYYY-MMM-DD (to be released)
|
v3.0.3 - YYYY-MMM-DD (to be released)
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
|
- Fix parser to support GeoLookup with MaxMind
|
||||||
|
[Issue #1884, #1895 - @victorhora, @everping]
|
||||||
- parser: Fix simple quote setvar in the end of the line
|
- parser: Fix simple quote setvar in the end of the line
|
||||||
[Issue #1831 - @zimmerle, @csanders-git]
|
[Issue #1831 - @zimmerle, @csanders-git]
|
||||||
- Fix pc file
|
- Fix pc file
|
||||||
|
@ -1080,11 +1080,11 @@ op_before_init:
|
|||||||
}
|
}
|
||||||
| OPERATOR_GEOLOOKUP
|
| OPERATOR_GEOLOOKUP
|
||||||
{
|
{
|
||||||
#ifdef WITH_GEOIP
|
#if defined(WITH_GEOIP) or defined(WITH_MAXMIND)
|
||||||
OPERATOR_CONTAINER($$, new operators::GeoLookup());
|
OPERATOR_CONTAINER($$, new operators::GeoLookup());
|
||||||
#else
|
#else
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "This version of ModSecurity was not compiled with GeoIP support.";
|
ss << "This version of ModSecurity was not compiled with GeoIP or MaxMind support.";
|
||||||
driver.error(@0, ss.str());
|
driver.error(@0, ss.str());
|
||||||
YYERROR;
|
YYERROR;
|
||||||
#endif // WITH_GEOIP
|
#endif // WITH_GEOIP
|
||||||
@ -1555,7 +1555,7 @@ expression:
|
|||||||
/* Debug log: end */
|
/* Debug log: end */
|
||||||
| CONFIG_DIR_GEO_DB
|
| CONFIG_DIR_GEO_DB
|
||||||
{
|
{
|
||||||
#ifdef WITH_GEOIP
|
#if defined(WITH_GEOIP) or defined(WITH_MAXMIND)
|
||||||
std::string err;
|
std::string err;
|
||||||
std::string file = modsecurity::utils::find_resource($1,
|
std::string file = modsecurity::utils::find_resource($1,
|
||||||
driver.ref.back(), &err);
|
driver.ref.back(), &err);
|
||||||
@ -1575,7 +1575,7 @@ expression:
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "This version of ModSecurity was not compiled with GeoIP support.";
|
ss << "This version of ModSecurity was not compiled with GeoIP or MaxMind support.";
|
||||||
driver.error(@0, ss.str());
|
driver.error(@0, ss.str());
|
||||||
YYERROR;
|
YYERROR;
|
||||||
#endif // WITH_GEOIP
|
#endif // WITH_GEOIP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user