From cdd0895bc4a0f8199574e23dfe7b5ed808ed51ec Mon Sep 17 00:00:00 2001 From: jrfnl Date: Mon, 8 Oct 2018 03:51:48 +0200 Subject: [PATCH] Ruleset: prevent false positives on random_compat polyfill code When `PHPCompatibility(ParagonieRandomCompat)` is run over the code in the `random_compat` repo itself, it will detect some non-issues. The code in the files is all wrapped within proper `defined()`, `version_compare()` and/or `function_exists()` conditions and will never be executed on incompatible PHP versions. This simple change prevents these non-issues from being reported. This fix does rely on people having installed the package in a directory called `random_compat`. --- .../ruleset.xml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/PHPCompatibilityParagonieRandomCompat/ruleset.xml b/PHPCompatibilityParagonieRandomCompat/ruleset.xml index 4828cb7..e67a12e 100644 --- a/PHPCompatibilityParagonieRandomCompat/ruleset.xml +++ b/PHPCompatibilityParagonieRandomCompat/ruleset.xml @@ -17,4 +17,24 @@ + + + /random_compat/lib/byte_safe_strings\.php$ + + + /random_compat/lib/random_bytes_dev_urandom\.php$ + + + /random_compat/lib/random_bytes_mcrypt\.php$ + + + /random_compat/lib/random_bytes_mcrypt\.php$ + + + /random_compat/lib/random_bytes_mcrypt\.php$ + + + /random_compat/lib/random_bytes_libsodium\.php$ + +