Make WordPress Core

Ticket #10758: 10758-wp-comments-post.patch

File 10758-wp-comments-post.patch, 564 bytes (added by hakre, 14 years ago)

Missing checks for set variables.

  • wp-comments-post.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    1717
    1818nocache_headers();
    1919
    20 $comment_post_ID = (int) $_POST['comment_post_ID'];
     20$comment_post_ID = isset ($_POST['comment_post_ID']) ? (int) $_POST['comment_post_ID'] : null;
    2121
    2222$status = $wpdb->get_row( $wpdb->prepare("SELECT post_status, comment_status FROM $wpdb->posts WHERE ID = %d", $comment_post_ID) );
    2323