Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit019edfa

Browse files
tunethewebFelipe Zimmerle
authored and
Felipe Zimmerle
committed
This is a fix forowasp-modsecurity#992 to allow drop to work with mod_http2
1 parentb629398 commit019edfa

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

‎apache2/mod_security2.c‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,18 @@ int perform_interception(modsec_rec *msr) {
265265
#if !defined(WIN32)&& !defined(VERSION_NGINX)
266266
{
267267
externmodulecore_module;
268-
apr_socket_t*csd=ap_get_module_config(msr->r->connection->conn_config,
269-
&core_module);
268+
apr_socket_t*csd;
269+
270+
/* For mod_http2 used by HTTP/2 there is a virtual connection so must go through
271+
* master to get the main connection or the drop request doesn't seem to do anything.
272+
* For HTTP/1.1 master will not be defined so just go through normal connection.
273+
* More details here: https://github.com/icing/mod_h2/issues/127
274+
*/
275+
if (msr->r->connection->master) {
276+
csd=ap_get_module_config(msr->r->connection->master->conn_config,&core_module);
277+
}else {
278+
csd=ap_get_module_config(msr->r->connection->conn_config,&core_module);
279+
}
270280

271281
if (csd) {
272282
if (apr_socket_close(csd)==APR_SUCCESS) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp