Make WordPress Core

Ticket #11513: injection_removal.diff

File injection_removal.diff, 787 bytes (added by petervanderdoes, 15 years ago)
  • wp-content/plugins/akismet/akismet.php

     
    412412        return 'spam';
    413413}
    414414
    415 function akismet_auto_check_comment( $comment ) {
     415function akismet_auto_check_comment( $commentdata ) {
    416416        global $akismet_api_host, $akismet_api_port;
    417417
     418        $comment = $commentdata;
    418419        $comment['user_ip']    = preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] );
    419420        $comment['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
    420421        $comment['referrer']   = $_SERVER['HTTP_REFERER'];
     
    453454                }
    454455        }
    455456        akismet_delete_old();
    456         return $comment;
     457        return $commentdata;
    457458}
    458459
    459460function akismet_delete_old() {