Skip to content

Commit

Permalink
Fix phpGH-17509: Apache parent and subrequest double bailout
Browse files Browse the repository at this point in the history
  • Loading branch information
bukka committed Jan 31, 2025
1 parent f8b57ff commit fda064f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sapi/apache2handler/sapi_apache2.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,8 @@ static int php_handler(request_rec *r)
ap_add_cgi_vars(r);
}

JMP_BUF *parent_bailout = parent_req && EG(bailout) ? EG(bailout): NULL;

zend_first_try {

if (ctx == NULL) {
Expand Down Expand Up @@ -749,6 +751,10 @@ zend_first_try {
ctx->r = parent_req;
}

if (parent_bailout) {
EG(bailout) = parent_bailout;
}

return OK;
}

Expand Down

0 comments on commit fda064f

Please sign in to comment.