Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,23 @@ composer require knplabs/knp-snappy

## Usage

> ⚠️ **Security Warning**
>
> The `--enable-local-file-access` option in `wkhtmltopdf` can be risky if used with untrusted HTML or JavaScript.
> This may expose local files or lead to remote code execution.
>
> To stay safe:
> - Avoid enabling `--enable-local-file-access` unless necessary.
> - Always sanitize user input before processing.
> - Run `wkhtmltopdf` in a sandbox like **AppArmor** or **SELinux**.
> - For untrusted content, consider alternatives like **WeasyPrint**, **Prince**, or **Puppeteer**.
>
> This risk was responsibly reported by
> **Nikita Sveshnikov (Positive Technologies)**.
>
> 🔗 [Official recommendations](https://wkhtmltopdf.org/status.html#recommendations)


### Initialization
```php
<?php
Expand Down
Loading