Commit c908fd7
committed
Fix Argon2 options checks
The minimum for memory cost is 8 KiB per thread. Threads must be checked and set first to allow checking against the correct memory cost mimimum.
Options are now applied the following way:
- If config.php contains the setting with a valid integer, higher or equal the minimum, it is applied.
- If config.php does not contain the setting or an invalid integer, but the related PASSWORD_ARGON2_DEFAULT_* variable is set and contains a valid integer, it is applied instead.
- If PASSWORD_ARGON2_DEFAULT_* is not set or contains no valid integer, the minimum value is applied instead.
Signed-off-by: MichaIng <micha@dietpi.com>1 parent 192cf12 commit c908fd7
1 file changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | | - | |
| 77 | + | |
74 | 78 | | |
75 | 79 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
0 commit comments