Commit 4ec87e1
fix(shared): validate SOURCEBOT_ENCRYPTION_KEY length (#1305)
* fix(shared): validate SOURCEBOT_ENCRYPTION_KEY is 32 chars
The key is used directly as a 32-byte AES-256-CBC key. Validate its
length at startup so a misconfigured key fails fast with an actionable
message instead of a RangeError deep in an encryption call.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs: add CHANGELOG entry for #1305
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(shared): use a real 32-char SOURCEBOT_ENCRYPTION_KEY
The test value was named "...-32-characters!" but was actually 34
chars, which now fails the length validation. Replace it with a true
32-character value.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent a84e7a9 commit 4ec87e1
3 files changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
341 | 347 | | |
342 | 348 | | |
343 | 349 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
0 commit comments