Skip to content

Commit

Permalink
Merge pull request Automattic#83 from hibernation/issue-72
Browse files Browse the repository at this point in the history
Add $_SERVER check - close issue Automattic#72
  • Loading branch information
nickdaugherty committed Mar 13, 2014
2 parents 8f96233 + 50dcd87 commit 9ed5d16
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions vip-scanner/checks/VIPRestrictedPatternsCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function check( $files ) {
"/(echo|print|\<\?\=)+.+(\\\$GLOBALS|\\\$_SERVER|\\\$_GET|\\\$_REQUEST|\\\$_POST)+/msiU" => array( "level" => "Warning", "note" => "Possible output of restricted variables" ),
"/(echo|print|\<\?\=)+.+(get_search_query)+/msiU" => array( "level" => "Warning", "note" => "Output of search query" ),
"/(\\\$GLOBALS|\\\$_SERVER|\\\$_GET|\\\$_REQUEST|\\\$_POST)+/msiU" => array( "level" => "Note", "note" => "Working with superglobals" ),
"/(\\\$_SERVER\[(?!('|\"REQUEST_URI|SCRIPT_FILENAME|HTTP_HOST'|\"))([^]]+|)\])+/msiU" => array( "level" => "Blocker", "note" => 'Non whitelisted $_SERVER superglobals found in this file' ),
);

foreach ( $this->filter_files( $files, 'php' ) as $file_path => $file_content ) {
Expand Down

0 comments on commit 9ed5d16

Please sign in to comment.