[php-src] PR #22383: Throw on below-minimum opslimit/memlimit in sodium pwhash
| From: | iliaal | Date: | Sun, 21 Jun 2026 11:08:32 +0000 |
| Subject: | [php-src] PR #22383: Throw on below-minimum opslimit/memlimit in sodium pwhash | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36530@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22383
Author: iliaal
The four sodium pwhash functions queue a zend_argument_error when opslimit or memlimit is below the
documented minimum but fall through to the KDF instead of returning. When libsodium rejects the
value the precise argument error is clobbered by a generic "internal error"; when it
accepts the value the full KDF runs before the queued error surfaces, defeating the minimum-cost
gate. Adding the missing RETURN_THROWS() makes each lower-bound check return like its sibling
upper-bound branches.