pwd bug fix

This commit is contained in:
2026-10-13 14:46:18 +02:00
parent afe1a1b610
commit d28b602827
3 changed files with 79 additions and 14 deletions
+7
View File
@@ -133,6 +133,13 @@ Versions follow `MAJOR.MINOR.PATCH-REVISION_STAGE_N` (e.g. `3.99.1-4_rc_1`).
theme's colours; the prompt no longer forks `date` twice per command
(`$EPOCHREALTIME`) and runs one `git status` instead of three git commands,
without taking the index lock.
- `pwd.sh` (security): `genpwd` drew its characters from `$RANDOM` (15 bits,
predictable seed); it now uses `$SRANDOM` or `/dev/urandom` with unbiased
selection and shuffle. Its info message goes to stderr, so `pw=$(genpwd)`
captures only the password; the `GENPWD_DEFAULT_*` values are validated
(they were evaluated as arithmetic expressions); `pwdscore` classifies
characters with locale-proof classes; README default of
`GENPWD_DEFAULT_OCCURS` corrected.
- `compress.sh`: option flags and loop variables no longer leak into the
interactive shell.