[php-src] PR #22388: ext/sodium: throw ValueError for pwhash argument errors
| From: | iliaal | Date: | Sun, 21 Jun 2026 17:45:48 +0000 |
| Subject: | [php-src] PR #22388: ext/sodium: throw ValueError for pwhash argument errors | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36536@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22388
Author: iliaal
Follow-up to GH-22383, as suggested in review: the four sodium pwhash functions now throw ValueError
for out-of-range arguments instead of SodiumException, keeping SodiumException for internal
libsodium failures. Each converted site keeps an explicit backtrace scrub so the ValueError still
protects the password in caller frames, with a test covering it. Scoped to pwhash for now; changing
the remaining zend_argument_error(sodium_exception_ce, ...) sites across the extension might be a
bigger BC change, so keeping this one small.