mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Removed CGI style HTTP_* variables in favor of REQUEST_HEADERS:Header-Name. (trac #23)
This commit is contained in:
12
apache2/re.c
12
apache2/re.c
@@ -144,18 +144,6 @@ msre_var *msre_create_var_ex(apr_pool_t *pool, msre_engine *engine, const char *
|
||||
var->name = name;
|
||||
}
|
||||
|
||||
/* CGI HTTP variables emulation. */
|
||||
if (strncasecmp(var->name, "HTTP_", 5) == 0) {
|
||||
if (var->param != NULL) {
|
||||
*error_msg = apr_psprintf(pool, "Variable %s does not support parameters.",
|
||||
var->name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
var->param = var->name + 5;
|
||||
var->name = "REQUEST_HEADERS";
|
||||
}
|
||||
|
||||
/* Resolve variable */
|
||||
var->metadata = msre_resolve_var(engine, var->name);
|
||||
if (var->metadata == NULL) {
|
||||
|
Reference in New Issue
Block a user