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
13
13
- [ Requirements] ( #requirements )
14
14
- [ Quick Start and Examples] ( #quick-start-and-examples )
15
15
- [ Available Methods] ( #available-methods )
16
+ - [ Security] ( #security )
16
17
- [ Contribute] ( #contribute )
17
18
18
19
---
@@ -279,6 +280,10 @@ MultiCurl::unsetHeader($key)
279
280
MultiCurl::verbose($on = true, $output = STDERR)
280
281
```
281
282
283
+ ### Security
284
+
285
+ See [ SECURITY.md] ( https://github.com/php-curl-class/php-curl-class/blob/master/SECURITY.md ) .
286
+
282
287
### Contribute
283
288
1 . Check for open issues or open a new issue to start a discussion around a bug or feature.
284
289
1 . 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