Changeset 379407
- Timestamp:
- 05/01/2011 07:30:20 AM (15 years ago)
- Location:
- wp-plugin-security-check/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
wp-plugin-security-check.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-plugin-security-check/trunk/readme.txt
r379097 r379407 5 5 Requires at least: 3.1 6 6 Tested up to: 3.1.1 7 Stable tag: 0. 37 Stable tag: 0.4 8 8 9 9 WP Plugin Security Check checks if your WordPress plugins are 'safe'. … … 31 31 == Changelog == 32 32 33 = 0.4 = 34 * Added support for detecting javascript in the plugin headers. 35 * Squashed a minor bug. Thanks to Julio Potier. 36 33 37 = 0.3 = 34 38 * Added another way to check for image files to reduce the number of false positives. -
wp-plugin-security-check/trunk/wp-plugin-security-check.php
r379097 r379407 4 4 * Plugin URI: http://www.lucdebrouwer.nl/wordpress-plugin-wp-plugin-security-check/ 5 5 * Description: WP Plugin Security Check checks if your WordPress plugins are 'safe'. 6 * Version: 0. 36 * Version: 0.4 7 7 * Author: Luc De Brouwer 8 8 * Author URI: http://www.lucdebrouwer.nl/ … … 46 46 return false; 47 47 } 48 } 49 50 function LDB_wp_plugin_security_check_data( $plugin ) { 51 $hit = false; 52 foreach( $plugin as $key => $value ){ 53 $regexp = '/<script/'; 54 if( preg_match_all( $regexp, strtolower( $value ), $matches ) ) { 55 $hit = true; 56 } 57 } 58 return $hit; 48 59 } 49 60 … … 160 171 $safe = true; 161 172 $class = 'safe'; 173 $data_hit = LDB_wp_plugin_security_check_data( $plugins[$plugins_keys[$p]] ); 174 if( $data_hit ) { 175 $class = 'unsafe'; 176 $hitlist[] = array( array('Javascript detected in plugin headers', 'warning') ); 177 } 162 178 for( $f = 0, $fc = count( $plugin_files ); $f < $fc; $f++ ){ 163 179 $hit = LDB_wp_plugin_security_check( $plugin_files[$f] ); … … 177 193 ?> 178 194 <div class="wp_plugin_security_check_plugin <?php if( $safe ){ echo $class; } else { echo $class; }?>"> 179 <h4><?php echo $plugins[$plugins_keys[$p]]['Name']; ?></h4>195 <h4><?php echo esc_attr($plugins[$plugins_keys[$p]]['Name']); ?></h4> 180 196 <?php 181 197 if( count( $hitlist ) > 0 ){
Note: See TracChangeset
for help on using the changeset viewer.