diff options
| author | jvoisin | 2018-01-12 16:05:19 +0100 |
|---|---|---|
| committer | jvoisin | 2018-01-12 16:57:42 +0100 |
| commit | bbee5f1baec132f8b47ae80303ce22f7d7787cd8 (patch) | |
| tree | 25a99787d40ec1e84310340d8df9809b9fa16dc8 /doc | |
| parent | 44255b8dbf5c98c8d110c2e3918298ee6978b93c (diff) | |
Add an ugly hack to our parser to make the writing of configuration rules more obvious.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/source/config.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/source/config.rst b/doc/source/config.rst index 9244668..e0df244 100644 --- a/doc/source/config.rst +++ b/doc/source/config.rst | |||
| @@ -276,7 +276,7 @@ In the situation where you have a call to ``system()`` that lacks proper user-in | |||
| 276 | :: | 276 | :: |
| 277 | 277 | ||
| 278 | # Allow `id.php` to restrict system() calls to `id` | 278 | # Allow `id.php` to restrict system() calls to `id` |
| 279 | sp.disable_function.function("system").filename("id.php").param("$cmd").value("id").allow(); | 279 | sp.disable_function.function("system").filename("id.php").param("cmd").value("id").allow(); |
| 280 | sp.disable_function.function("system").filename("id.php").drop() | 280 | sp.disable_function.function("system").filename("id.php").drop() |
| 281 | 281 | ||
| 282 | Of course, this is a trivial example, a lot can be achieved with this feature, as you will see below. | 282 | Of course, this is a trivial example, a lot can be achieved with this feature, as you will see below. |
| @@ -387,9 +387,9 @@ The following rules will: | |||
| 387 | 387 | ||
| 388 | :: | 388 | :: |
| 389 | 389 | ||
| 390 | sp.disable_function.function("system").param("$cmd").value("id").allow(); | 390 | sp.disable_function.function("system").param("cmd").value("id").allow(); |
| 391 | sp.disable_function.function("system").param("$cmd").value_r("^ping").drop().simulation(); | 391 | sp.disable_function.function("system").param("cmd").value_r("^ping").drop().simulation(); |
| 392 | sp.disable_function.function("system").param("$cmd").drop(); | 392 | sp.disable_function.function("system").param("cmd").drop(); |
| 393 | 393 | ||
| 394 | Miscellaneous examples | 394 | Miscellaneous examples |
| 395 | """""""""""""""""""""" | 395 | """""""""""""""""""""" |
