Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions ext/curl/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
case CURLOPT_TCP_KEEPCNT:
#endif
case CURLOPT_FOLLOWLOCATION:
case CURLOPT_POSTREDIR:
lval = zval_get_long(zvalue);
if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) &&
(PG(open_basedir) && *PG(open_basedir)) && (lval & CURLPROTO_FILE)) {
Expand Down Expand Up @@ -2210,11 +2211,6 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
error = curl_easy_setopt(ch->cp, option, (curl_off_t)lval);
break;

case CURLOPT_POSTREDIR:
lval = zval_get_long(zvalue);
error = curl_easy_setopt(ch->cp, CURLOPT_POSTREDIR, (long) (lval & CURL_REDIR_POST_ALL));
break;

/* the following options deal with files, therefore the open_basedir check
* is required.
*/
Expand Down
Loading