You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f891686
Browse filesBrowse the repository at this point in the historyBrowse files
Security: Harden secret names, value parameters and the root key on All Settings.
Three small fixes to the Secrets API:
* `wp_secrets_validate_name()` anchors its segment pattern with `\z`. With `$`, a name with a trailing newline passed, and since option names are trimmed it shared a row with the name without the newline while encrypting for itself.
* Parameters that carry a plaintext value through `wp_set_secret()` and `wp_set_network_secret()` are marked `#[\SensitiveParameter]`, so an exception thrown while saving does not print the value in a stack trace.
* Settings > All Settings masks `_wp_secrets_root_key` and excludes it from the save, as it already does for connector API keys. Replacing the root key made every stored secret unreadable.
Props aryanjasala, dhrupo.
Fixes #66414.
0 commit comments