Repository navigation
Commit 41403fd
Derive the key the way core derives its salts when the constants are absent
A wp-config.php without salt constants is one core copes with: wp_salt()
generates salts once and keeps them in the database. Every WordPress
test suite runs that way, and so do more live sites than anyone would
like. Treating the absent constants as no key made encryption
unavailable there, and a field marked encrypted then stored nothing --
which is how a Stripe key saved as an empty string. The constants are
still preferred, so a value encrypted under them stays readable; only
when there are none does wp_salt() stand in.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Kwx2STJ4EaVaJofEJJ9Zo1 parent 576f19d commit 41403fd
2 files changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
316 | 325 | | |
317 | 326 | | |
318 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
479 | 490 | | |
480 | 491 | | |
481 | 492 | | |
| |||
0 commit comments