Commit 5d73ec8
authored
Replace timing-vulnerable === comparisons with hash_equals() for the
shared secret key in rest_authorize_permission_callback(),
wpac_authorize_permission_callback(), and filter_introspection().
The codebase already uses hash_equals() for HMAC validation in
auth/functions.php — these three spots were missed.
Also sanitize the $_SERVER['HTTP_X_FAUST_SECRET'] superglobal with
wp_unslash() and sanitize_text_field() per WordPress coding standards
before passing to hash_equals().
Split out from #2312 per @josephfusco review feedback — the blockset
cleanup half moves to a separate PR so each half can be reviewed and
reverted independently.
Co-authored-by: latenighthackathon <latenighthackathon@users.noreply.github.com>
1 parent b6eebd5 commit 5d73ec8
3 files changed
Lines changed: 10 additions & 4 deletions
File tree
- .changeset
- plugins/faustwp/includes
- graphql
- rest
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
422 | | - | |
| 422 | + | |
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
| 447 | + | |
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| |||
0 commit comments