Repository navigation
Commit fe4087a
fix(sveltekit): Fix TOCTOU file system race condition in source map cleaning
Replace `existsSync` guard with try/catch around read+write operations
to eliminate the time-of-check to time-of-use race condition (CWE-367)
flagged by CodeQL (code-scanning alert #439).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent b26df86 commit fe4087a
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
| 225 | + | |
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
| |||
0 commit comments