Ticket #4579: comment.php.diff

File comment.php.diff, 940 bytes (added by ruckus, 5 years ago)

Patch to comment.php to revert changeset:3990

  • comment.php

     
    339339        extract($commentdata, EXTR_SKIP); 
    340340 
    341341        if ( ! isset($comment_author_IP) ) 
    342                 $comment_author_IP = preg_replace( '/[^0-9., ]/', '',$_SERVER['REMOTE_ADDR'] ); 
     342                $comment_author_IP = $_SERVER['REMOTE_ADDR']; 
    343343        if ( ! isset($comment_date) ) 
    344344                $comment_date = current_time('mysql'); 
    345345        if ( ! isset($comment_date_gmt) ) 
     
    394394        $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID']; 
    395395        $commentdata['user_ID']         = (int) $commentdata['user_ID']; 
    396396 
    397         $commentdata['comment_author_IP'] = preg_replace( '/[^0-9., ]/', '',$_SERVER['REMOTE_ADDR'] ); 
     397        $commentdata['comment_author_IP'] = $_SERVER['REMOTE_ADDR']; 
    398398        $commentdata['comment_agent']     = $_SERVER['HTTP_USER_AGENT']; 
    399399 
    400400        $commentdata['comment_date']     = current_time('mysql');