Ticket #4579: comment-ipv6-patch.patch
File comment-ipv6-patch.patch, 1.2 KB (added by , 15 years ago) |
---|
-
wp-includes/comment.php
334 334 extract($commentdata, EXTR_SKIP); 335 335 336 336 if ( ! isset($comment_author_IP) ) 337 $comment_author_IP = preg_replace( '/[^0-9 ., ]/', '',$_SERVER['REMOTE_ADDR'] );337 $comment_author_IP = preg_replace( '/[^0-9a-fA-F:., ]/', '',$_SERVER['REMOTE_ADDR'] ); 338 338 if ( ! isset($comment_date) ) 339 339 $comment_date = current_time('mysql'); 340 340 if ( ! isset($comment_date_gmt) ) … … 389 389 $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID']; 390 390 $commentdata['user_ID'] = (int) $commentdata['user_ID']; 391 391 392 $commentdata['comment_author_IP'] = preg_replace( '/[^0-9 ., ]/', '',$_SERVER['REMOTE_ADDR'] );392 $commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '',$_SERVER['REMOTE_ADDR'] ); 393 393 $commentdata['comment_agent'] = $_SERVER['HTTP_USER_AGENT']; 394 394 395 395 $commentdata['comment_date'] = current_time('mysql');