mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-15 17:12:14 +03:00
Fixed segmentation fault if http context is not defined.
This commit is contained in:
@@ -938,6 +938,12 @@ ngx_http_modsecurity_init(ngx_conf_t *cf)
|
||||
static ngx_int_t
|
||||
ngx_http_modsecurity_init_process(ngx_cycle_t *cycle)
|
||||
{
|
||||
if (ngx_http_cycle_get_module_main_conf(cycle, ngx_http_modsecurity)
|
||||
== NULL)
|
||||
{
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
/* must set log hook here cf->log maybe changed */
|
||||
modsecSetLogHook(cycle->log, modsecLog);
|
||||
modsecInitProcess();
|
||||
|
||||
Reference in New Issue
Block a user