Skip to content

[Security] Fix lowest argon time_cost in PHP config example - #23106

Merged
javiereguiluz merged 1 commit into
symfony:6.4from
tahakotil:fix-argon-time-cost
Sep 28, 2026
Merged

javiereguiluz merged 1 commit into
symfony:6.4from
tahakotil:fix-argon-time-cost

Conversation

@tahakotil

Copy link
Copy Markdown
Contributor

The YAML example in this section says time_cost: 3 # Lowest possible value for argon, but the equivalent PHP config example used ->timeCost(2).

time_cost maps to opsLimit, and SodiumPasswordHasher rejects any value below 3 ('$opsLimit must be 3 or greater.', see SodiumPasswordHasher::__construct). The auto hasher resolves to sodium when libsodium is available, so the PHP example would fail with the stated "lowest possible" value. Fixed the 8.1/8.2 branches already use 3 in both blocks; 6.4 and 7.4 were inconsistent.

@javiereguiluz

Copy link
Copy Markdown
Member

Good catch, thanks @tahakotil.

@javiereguiluz
javiereguiluz merged commit 411c6c5 into symfony:6.4 Sep 28, 2026
3 checks passed
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