Commit ffd0403
authored
fix: always regenerate encrypted OAuth secrets in release build (#890)
The AES key for inc/stuff.php is derived from sha256(inc/class-addon-repository.php).
Any change to that file — even whitespace — changes the key and makes the
committed ciphertext undecryptable, so the OAuth flow to ultimatemultisite.com
sends empty client_id/client_secret and the server replies with:
{"error":"invalid_client","error_description":"No client id supplied"}.
encrypt-secrets.php (run via 'npm run prearchive' in the release workflow)
had an mtime-based shortcut that skipped regeneration when
filemtime(class-addon-repository.php) <= filemtime(stuff.php). In CI,
actions/checkout normalises every file's mtime to the checkout time, so
the shortcut always fired and the stale ciphertext shipped unchanged.
Remove the mtime guard: regenerate the ciphertext unconditionally whenever
MU_CLIENT_ID/MU_CLIENT_SECRET are supplied.1 parent d666041 commit ffd0403
1 file changed
Lines changed: 15 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
0 commit comments