File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ PHP Curl Class is an object-oriented wrapper of the PHP cURL extension that make
1313- [ Requirements] ( #requirements )
1414- [ Quick Start and Examples] ( #quick-start-and-examples )
1515- [ Available Methods] ( #available-methods )
16+ - [ Security] ( #security )
1617- [ Contribute] ( #contribute )
1718
1819---
@@ -279,6 +280,10 @@ MultiCurl::unsetHeader($key)
279280MultiCurl::verbose($on = true, $output = STDERR)
280281```
281282
283+ ### Security
284+
285+ See [ SECURITY.md] ( https://github.com/php-curl-class/php-curl-class/blob/master/SECURITY.md ) .
286+
282287### Contribute
2832881 . Check for open issues or open a new issue to start a discussion around a bug or feature.
2842891 . Fork the repository on GitHub to start making your changes.
Original file line number Diff line number Diff line change 1+ ### Security
2+
3+ * Don't blindly accept arbitrary urls. Curl supports many protocols including ` FILE ` . The following would show the contents of ` file:///etc/passwd ` .
4+
5+ ``` php
6+ // https://www.example.com/fetch_page.php?url=file%3A%2F%2F%2Fetc%2Fpasswd
7+ $unsafe_url = $_GET['url']; // DANGER!
8+ $curl = new Curl();
9+ $curl->get($unsafe_url);
10+ echo $curl->response;
11+ ```
You can’t perform that action at this time.
0 commit comments