Commit 647fea8
committed
fix: address Copilot review feedback
- writeEnvFile now quotes values containing whitespace/special chars
and escapes embedded " and \. Fixes the round-trip corruption
Copilot flagged: a pre-existing `FOO="a b"` would previously come
back as `FOO=a b` after any unrelated config update because
stripQuotes read but writeEnvFile didn't re-quote.
- fetchSkills no longer attaches the admin token — /api/skills is
unauthenticated and there's no reason to broaden the token's
exposure surface (server logs, future proxies) until the endpoint
actually guards.
- POST /api/config wraps req.json() in try/catch and returns 400 for
malformed JSON instead of leaking a 500 on a public endpoint.
- Comment on the isSafeEnvValue guard now reflects the full denylist
(not just newlines) so future readers don't narrow the check by
mistake.1 parent eff212d commit 647fea8
3 files changed
Lines changed: 26 additions & 7 deletions
File tree
- agent-templates/next/app/(agent)
- _components
- _lib/config
- api/config
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
488 | | - | |
489 | | - | |
490 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
491 | 492 | | |
492 | 493 | | |
493 | 494 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
167 | 173 | | |
168 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
169 | 179 | | |
170 | 180 | | |
171 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
| |||
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
39 | | - | |
40 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
| |||
0 commit comments