diff --git a/Useful-Functions-for-Plugin-and-Theme-Security.md b/Useful-Functions-for-Plugin-and-Theme-Security.md index d34f5d4..fefc6c7 100644 --- a/Useful-Functions-for-Plugin-and-Theme-Security.md +++ b/Useful-Functions-for-Plugin-and-Theme-Security.md @@ -20,6 +20,8 @@ function is_url_local($url) { return ! filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE); } +// Testing things out + $urls = [ 'doesntexistblabla.com', 'https://wpscan.com', 'wpscan.com', '192.168.1.32', '127.0.0.1:9090', 'https://youtube.com:23', 'localhost', 'http://127.0.0.1', '127.1', 'https://0x7f.0x0.0x0.0x1', '0177.0.0.01', '2130706433', 'https://%6c%6f%63%61%6c%68%6f%73%74', 'http://0177.0.0.0x1:9090/aa.txt', '::1', 'https://[::1]:8080', 'http://[::ffff:127.0.0.1]:19983/' @@ -59,5 +61,6 @@ function zip_only_contains_allowed_extensions($zip_path, array $allowed_extensio return true; } +// Testing things out var_dump(zip_only_contains_allowed_extensions('midex.zip', ['png'])); ``` \ No newline at end of file