PalmaSolutions

index.php

Apr 30th, 2018
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. function stripDangerousValues($input) {
  2.     if (is_array($input)) {
  3.         foreach ($input as $key => $value) {
  4.             if ($key !== '' && $key[0] === '#') {
  5.                 unset($input[$key]);
  6.             }
  7.             else {
  8.                 $input[$key] = stripDangerousValues($input[$key]);
  9.             }
  10.         }
  11.     }
  12.     return $input;
  13. }
  14. $_REQUEST = stripDangerousValues($_REQUEST);
  15. $_GET = stripDangerousValues($_GET);
  16. $_POST = stripDangerousValues($_POST);
Advertisement
Add Comment
Please, Sign In to add comment