Skip to content

Commit d976888

Browse files
victorhoraFelipe Zimmerle
authored andcommitted
Fix parser to support GeoLookup with MaxMind
1 parent 0a88e02 commit d976888

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
v3.0.3 - YYYY-MMM-DD (to be released)
22
-------------------------------------
33

4+
- Fix parser to support GeoLookup with MaxMind
5+
[Issue #1884, #1895 - @victorhora, @everping]
46
- parser: Fix simple quote setvar in the end of the line
57
[Issue #1831 - @zimmerle, @csanders-git]
68
- Fix pc file

src/parser/seclang-parser.yy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,11 +1080,11 @@ op_before_init:
10801080
}
10811081
| OPERATOR_GEOLOOKUP
10821082
{
1083-
#ifdef WITH_GEOIP
1083+
#if defined(WITH_GEOIP) or defined(WITH_MAXMIND)
10841084
OPERATOR_CONTAINER($$, new operators::GeoLookup());
10851085
#else
10861086
std::stringstream ss;
1087-
ss << "This version of ModSecurity was not compiled with GeoIP support.";
1087+
ss << "This version of ModSecurity was not compiled with GeoIP or MaxMind support.";
10881088
driver.error(@0, ss.str());
10891089
YYERROR;
10901090
#endif // WITH_GEOIP
@@ -1555,7 +1555,7 @@ expression:
15551555
/* Debug log: end */
15561556
| CONFIG_DIR_GEO_DB
15571557
{
1558-
#ifdef WITH_GEOIP
1558+
#if defined(WITH_GEOIP) or defined(WITH_MAXMIND)
15591559
std::string err;
15601560
std::string file = modsecurity::utils::find_resource($1,
15611561
driver.ref.back(), &err);
@@ -1575,7 +1575,7 @@ expression:
15751575
}
15761576
#else
15771577
std::stringstream ss;
1578-
ss << "This version of ModSecurity was not compiled with GeoIP support.";
1578+
ss << "This version of ModSecurity was not compiled with GeoIP or MaxMind support.";
15791579
driver.error(@0, ss.str());
15801580
YYERROR;
15811581
#endif // WITH_GEOIP

0 commit comments

Comments
 (0)