Skip to content

Commit d25b2bf

Browse files
committed
Add note regarding PHP execution of library files and WordPress plugins (php-curl-class#562)
1 parent d282890 commit d25b2bf

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

SECURITY.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,17 @@ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // DANGER!
9292
```php
9393
libxml_disable_entity_loader(true);
9494
```
95+
96+
### Prevent PHP execution of library files
97+
98+
PHP files in this library are not intended to be accessible by users browsing websites. Prevent direct access to library files by moving the library folder at least one level higher than the web root directory. Alternatively, configure the server to disable php file execution for all library files.
99+
100+
#### For WordPress plugin developers
101+
102+
WordPress plugin developers that wish to incorporate the PHP Curl Class library into their plugin, should take special care to include only the "core" library files.
103+
104+
Do one of the following:
105+
106+
Option 1. Download an official release from the [releases page](https://github.com/php-curl-class/php-curl-class/releases) and incorporate the files contained in the compressed file into the plugin. The releases include only the necessary php files for the library to function.
107+
108+
Option 2. Manually copy only the [src/](https://github.com/php-curl-class/php-curl-class/tree/master/src) directory into your plugin. Be sure not to copy any other php files as they may be executable by users visiting the php files directly.

0 commit comments

Comments
 (0)