Commit 574a082
fix(core): Sanitize lone surrogates in parameterized (fmt) log bodies
`parameterize`/`fmt` creates a `String` object via `new String()`, so
`typeof message` returns `'object'` not `'string'`, bypassing the
sanitization. Use `String(message)` to coerce to a primitive before
sanitizing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent afbd06e commit 574a082
File tree
2 files changed
+14
-1
lines changed- packages/core
- src/logs
- test/lib/logs
2 files changed
+14
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1280 | 1280 | | |
1281 | 1281 | | |
1282 | 1282 | | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
1283 | 1296 | | |
1284 | 1297 | | |
1285 | 1298 | | |
| |||
0 commit comments