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

Commitf9c2539

Browse files
rootzimmerle
root
authored andcommitted
This is fix for reborn ofowasp-modsecurity#334 This bug has been reborn, because Apache (at least in RedHat/CentOS) since version 2.2.15-47 returns in same case APR_INCOMPLETE (not APR_EOF). Based on same patch I have added handler for APR_INCOMPLETE.
1 parent88bffb1 commitf9c2539

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

‎apache2/apache2_io.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ apr_status_t read_request_body(modsec_rec *msr, char **error_msg) {
208208
* too large and APR_EGENERAL when the client disconnects.
209209
*/
210210
switch(rc) {
211+
caseAPR_INCOMPLETE :
212+
*error_msg=apr_psprintf(msr->mp,"Error reading request body: %s",get_apr_error(msr->mp,rc));
213+
return-7;
211214
caseAPR_EOF :
212215
*error_msg=apr_psprintf(msr->mp,"Error reading request body: %s",get_apr_error(msr->mp,rc));
213216
return-6;

‎apache2/mod_security2.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,13 @@ static int hook_request_late(request_rec *r) {
10301030
r->connection->keepalive=AP_CONN_CLOSE;
10311031
returnHTTP_BAD_REQUEST;
10321032
break;
1033+
case-7 :/* Partial recieved */
1034+
if (my_error_msg!=NULL) {
1035+
msr_log(msr,4,"%s",my_error_msg);
1036+
}
1037+
r->connection->keepalive=AP_CONN_CLOSE;
1038+
returnHTTP_BAD_REQUEST;
1039+
break;
10331040
default :
10341041
/* allow through */
10351042
break;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp