mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
nginx: Adds proper support to SecServerSignature
SecServerSignature was leading nginx to crash. It was trying to write over a memory area that it was not allowed to. In order to fix that a new function was created on the standalone api. This function is called modsecIsServerSignatureAvailale. Whenever it returns data it means that the function SecServerSignature was used by the user. Nginx module was also patched to support this new function.
This commit is contained in:
@@ -673,3 +673,11 @@ void modsecSetWriteResponse(apr_status_t (*func)(request_rec *r, char *buf, unsi
|
||||
void modsecSetDropAction(int (*func)(request_rec *r)) {
|
||||
modsecDropAction = func;
|
||||
}
|
||||
|
||||
/*
|
||||
* Case SecServerSignature was used, this function returns the banner that
|
||||
* should be used, otherwise it returns NULL.
|
||||
*/
|
||||
const char *modsecIsServerSignatureAvailale(void) {
|
||||
return new_server_signature;
|
||||
}
|
||||
|
@@ -114,6 +114,8 @@ int modsecIsRequestBodyAccessEnabled(request_rec *r);
|
||||
|
||||
void modsecSetConfigForIISRequestBody(request_rec *r);
|
||||
|
||||
const char *modsecIsServerSignatureAvailale(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user