mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Allow IPv6 addresses as well. Fixes #4579 props pishmishy.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2e8ee3b0e0
commit
f9ba9a3802
@ -552,7 +552,7 @@ function wp_insert_comment($commentdata) {
|
||||
extract($commentdata, EXTR_SKIP);
|
||||
|
||||
if ( ! isset($comment_author_IP) )
|
||||
$comment_author_IP = preg_replace( '/[^0-9., ]/', '',$_SERVER['REMOTE_ADDR'] );
|
||||
$comment_author_IP = preg_replace( '/[^0-9a-fA-F:., ]/', '',$_SERVER['REMOTE_ADDR'] );
|
||||
if ( ! isset($comment_date) )
|
||||
$comment_date = current_time('mysql');
|
||||
if ( ! isset($comment_date_gmt) )
|
||||
|
Loading…
Reference in New Issue
Block a user