Skip to content

GeoIP doesn't correctly print missing file name #1309

Closed
@csanders-git

Description

@csanders-git

We get the error message shown from "src/parser/seclang-parser.cc" 4564L but it doesn't correctly get the file.

Error Opening file
nginx: [emerg] "root" directive Rules error. File: <>. Line: 5. Column: 62. Failed to load the GeoDB from: in /usr/local/nginx/conf/nginx.conf:124

#ifdef WITH_GEOIP
std::string file = modsecurity::utils::find_resource(yystack_[0].value.as< std::string > (),
driver.ref.back());
if (GeoLookup::getInstance().setDataBase(file) == false) {
std::stringstream ss;
ss << "Failed to load the GeoDB from: ";
ss << file;
driver.error(yystack_[1].location, ss.str());
YYERROR;
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions