Skip to content

Clear CURLOPT_PRIVATE in curl_reset() - #25170

Open
lacatoire wants to merge 1 commit into
php:PHP-8.4from
lacatoire:fix/curl-reset-private-84
Open

lacatoire wants to merge 1 commit into
php:PHP-8.4from
lacatoire:fix/curl-reset-private-84

Conversation

@lacatoire

@lacatoire lacatoire commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

CURLOPT_PRIVATE is stored on the PHP side only, so curl_easy_reset() does not clear it and a reset handle still returns the old value. Clear it in curl_reset().

To reproduce

$ch = curl_init();
curl_setopt($ch, CURLOPT_PRIVATE, "secret-marker");
curl_reset($ch);
var_dump(curl_getinfo($ch, CURLINFO_PRIVATE));

Before (PHP 8.4.26): string(13) "secret-marker"

After: bool(false)

@Sjord

Sjord commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

#25000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants