X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/959f97d8ecd5c1668103a3e41c795486b944bc68..refs/tags/wordpress-2.8-scripts:/wp-trackback.php diff --git a/wp-trackback.php b/wp-trackback.php index 26f8763e..58886f8d 100644 --- a/wp-trackback.php +++ b/wp-trackback.php @@ -1,10 +1,21 @@ $title\n\n$excerpt"; $comment_type = 'trackback'; - $dupe = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND comment_author_url = '$comment_author_url'"); + $dupe = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_author_url = %s", $comment_post_ID, $comment_author_url) ); if ( $dupe ) trackback_response(1, 'We already have a ping from that URL for this post.'); @@ -97,4 +108,4 @@ if ( !empty($tb_url) && !empty($title) ) { do_action('trackback_post', $wpdb->insert_id); trackback_response(0); } -?> +?> \ No newline at end of file