Commit 5a87c83
fix: strip surrounding quotes from environment variable values
Fixes issue where systemd/Docker env files with quoted values like
ENCRYPTION_KEY="32-char-key" were parsed with quotes included, causing
"34 bytes" errors in production.
Changes:
- Strip matching surrounding quotes (single or double) from env values
- Only strip if quotes match at both ends (e.g., "value" or 'value')
- Preserve internal quotes and mismatched quotes
- Add comprehensive test coverage for quote handling
This resolves the production issue where JWT secrets and encryption keys
were failing validation due to included quotes from .env files.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 17665b0 commit 5a87c83
2 files changed
+42
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
170 | 177 | | |
171 | 178 | | |
172 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
34 | 69 | | |
35 | 70 | | |
36 | 71 | | |
| |||
0 commit comments