Commit d7c079e
Security: reuse PDF::html_to_pdf for the Wiki PDF export
Drop the dedicated static helper and render the wiki page through the
existing PDF::html_to_pdf(), whose mPDF instance is already built with
SafeMpdfHttpClient::container(). The page CSS is written first as header
CSS (html_to_pdf writes the page content in body mode, which ignores
inline <style> blocks) and the body is passed as a content item with
complete_style=false to keep the course header/footer/watermark out, as
the original export did. Dompdf (the second SSRF sink) stays removed.
Refs GHSA-x3j9-q879-46vr
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 789b26c commit d7c079e
2 files changed
Lines changed: 31 additions & 51 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | 580 | | |
619 | 581 | | |
620 | 582 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5381 | 5381 | | |
5382 | 5382 | | |
5383 | 5383 | | |
5384 | | - | |
5385 | | - | |
5386 | | - | |
5387 | | - | |
5388 | | - | |
5389 | | - | |
5390 | | - | |
5391 | | - | |
5392 | | - | |
| 5384 | + | |
| 5385 | + | |
5393 | 5386 | | |
5394 | | - | |
5395 | | - | |
| 5387 | + | |
| 5388 | + | |
5396 | 5389 | | |
5397 | | - | |
| 5390 | + | |
| 5391 | + | |
5398 | 5392 | | |
5399 | | - | |
| 5393 | + | |
| 5394 | + | |
| 5395 | + | |
| 5396 | + | |
| 5397 | + | |
| 5398 | + | |
| 5399 | + | |
| 5400 | + | |
| 5401 | + | |
| 5402 | + | |
| 5403 | + | |
| 5404 | + | |
| 5405 | + | |
| 5406 | + | |
| 5407 | + | |
| 5408 | + | |
| 5409 | + | |
5400 | 5410 | | |
5401 | 5411 | | |
5402 | 5412 | | |
5403 | 5413 | | |
5404 | 5414 | | |
5405 | 5415 | | |
| 5416 | + | |
| 5417 | + | |
| 5418 | + | |
| 5419 | + | |
| 5420 | + | |
| 5421 | + | |
| 5422 | + | |
| 5423 | + | |
5406 | 5424 | | |
5407 | 5425 | | |
5408 | 5426 | | |
| |||
0 commit comments