Changeset 794800
- Timestamp:
- 10/28/2013 01:36:52 PM (12 years ago)
- Location:
- rockhoist-ratings/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
rh-ratings.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rockhoist-ratings/trunk/readme.txt
r777250 r794800 4 4 Requires at least: 3.6 5 5 Tested up to: 3.6.1 6 Stable tag: 1.2. 16 Stable tag: 1.2.2 7 7 8 8 Rockhoist Ratings is a thumbs up/ thumbs down style rating widget for posts. … … 31 31 32 32 == Changelog == 33 34 = 1.2.2 = 35 * Addressed SQL vulnerability. 33 36 34 37 = 1.2.1 = -
rockhoist-ratings/trunk/rh-ratings.php
r777562 r794800 2 2 /* 3 3 Plugin Name: Rockhoist Ratings 4 Version: 1.2. 15 Plugin URI: http ://blarrr.com/wordpress-ratings-plugin/4 Version: 1.2.2 5 Plugin URI: https://github.com/slizice/Wordpress-Ratings 6 6 Description: A YouTube style rating widget for posts. 7 7 Author: B. Jordan 8 Author URI: http:// about.me/blairjordan8 Author URI: http://www.github.com/slizice 9 9 10 10 Copyright (c) 2009 … … 109 109 110 110 $wpdb->insert( $wpdb->prefix . 'rh_ratings', 111 array( 'user_id' => $args['user_ID'],112 'post_id' => $args['post_ID'],113 'rating' => $args['rating']),111 array( 'user_id' => mysql_real_escape_string($args['user_ID']), 112 'post_id' => mysql_real_escape_string($args['post_ID']), 113 'rating' => mysql_real_escape_string($args['rating'])), 114 114 array( '%d', '%d', '%s' ) ); 115 115 } … … 119 119 global $wpdb; 120 120 121 $wpdb->query( $wpdb->prepare( 'UPDATE ' . $wpdb->prefix . 'rh_ratings' . ' SET rating = %s WHERE user_id = %d AND post_id = %d', $args['rating'], $args['user_ID'], $args['post_ID']) );121 $wpdb->query( $wpdb->prepare( 'UPDATE ' . $wpdb->prefix . 'rh_ratings' . ' SET rating = %s WHERE user_id = %d AND post_id = %d', mysql_real_escape_string($args['rating']), mysql_real_escape_string($args['user_ID']), mysql_real_escape_string($args['post_ID']) ) ); 122 122 123 123 $wpdb->show_errors(); … … 260 260 261 261 // get the submitted parameters 262 $args = array( 'user_ID' => $current_user->ID,263 'post_ID' => intval( $_POST['postID']),264 'rating' => $_POST['rating']);262 $args = array( 'user_ID' => mysql_real_escape_string($current_user->ID), 263 'post_ID' => mysql_real_escape_string(intval( $_POST['postID'] )), 264 'rating' => mysql_real_escape_string($_POST['rating'] )); 265 265 266 266 // save the rating … … 278 278 exit; 279 279 } 280
Note: See TracChangeset
for help on using the changeset viewer.