Commit fb274ec
Prevent panic on fuzzer provided string (go-gitea#14405) (go-gitea#14409)
* Prevent panic on fuzzer provided string
The fuzzer has found that providing a <body> tag with an attribute to
PostProcess causes a panic. This PR removes any rendered html or body
tags from the output.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Placate lint
* placate lint again
Signed-off-by: Andrew Thornton <art27@cantab.net>
* minor cleanup
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>1 parent 0c3f950 commit fb274ec
2 files changed
+53
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | 301 | | |
305 | 302 | | |
306 | 303 | | |
307 | 304 | | |
308 | 305 | | |
309 | 306 | | |
310 | 307 | | |
311 | | - | |
| 308 | + | |
312 | 309 | | |
313 | | - | |
| 310 | + | |
314 | 311 | | |
315 | 312 | | |
316 | 313 | | |
| |||
322 | 319 | | |
323 | 320 | | |
324 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
325 | 347 | | |
326 | 348 | | |
327 | 349 | | |
| |||
334 | 356 | | |
335 | 357 | | |
336 | 358 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | 359 | | |
342 | | - | |
| 360 | + | |
343 | 361 | | |
344 | 362 | | |
345 | 363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
0 commit comments