Commit 3dd01ee
committed
fix: API correctness issues (SSRF protection, docs alignment)
- Add allowUrlFetch option to client options (default: false)
- Block automatic URL fetching by default for SSRF protection
- Validate URL protocols (only http/https allowed)
- Add helper method normalizeFileInput() to client
- Update README.md with import statement in Quick Start
- Add SSRF protection documentation section to README
- Update and add tests for SSRF protection behavior
Security: SSRF protection requires explicit opt-in for URL fetching.
Users must set allowUrlFetch: true to enable client-side URL fetching.1 parent 41bf142 commit 3dd01ee
File tree
7 files changed
+213
-63
lines changed- src
- __tests__/unit
- types
7 files changed
+213
-63
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
68 | 86 | | |
69 | 87 | | |
70 | 88 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
242 | 307 | | |
243 | 308 | | |
244 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
239 | 265 | | |
240 | 266 | | |
241 | 267 | | |
242 | 268 | | |
243 | 269 | | |
244 | 270 | | |
245 | | - | |
| 271 | + | |
246 | 272 | | |
247 | 273 | | |
248 | 274 | | |
| |||
253 | 279 | | |
254 | 280 | | |
255 | 281 | | |
256 | | - | |
| 282 | + | |
257 | 283 | | |
258 | 284 | | |
259 | 285 | | |
| |||
263 | 289 | | |
264 | 290 | | |
265 | 291 | | |
266 | | - | |
| 292 | + | |
267 | 293 | | |
268 | 294 | | |
269 | 295 | | |
| |||
282 | 308 | | |
283 | 309 | | |
284 | 310 | | |
285 | | - | |
| 311 | + | |
286 | 312 | | |
287 | 313 | | |
288 | 314 | | |
289 | 315 | | |
290 | 316 | | |
291 | 317 | | |
292 | 318 | | |
293 | | - | |
| 319 | + | |
294 | 320 | | |
295 | 321 | | |
296 | 322 | | |
| |||
0 commit comments