By default, WordPress does not review whether the comment is published by the blogger. if someone knows the nickname and Email of the blogger, it uses this nickname and Email, you can successfully impersonate a blogger to post comments, and then cheat other visitors. I tested three methods to solve this problem.
By default, WordPress does not review whether the comment is published by the blogger. if someone knows the nickname and Email of the blogger, it uses this nickname and Email, you can successfully impersonate a blogger to post comments, and then cheat other visitors. I tested three methods to solve this problem.
First, prohibit visitors from making comments using the administrator's nickname or email.
The file used to modify the comment callback function is function. php if the topic has its own comment File, modify the topic such as: this site to modify the topic in the comments-ajax.php
WordPress 3.0
Open the wp-comments-post.php under the WordPress installation directory in a text editor and run the following code (about 70 lines ):
If (get_option ('comment _ registration') | 'private' = $ status) Wp_die (_ ('sorry, you must be logged in to post a comment .')); |
Replace:
If ('Administrator nickname '= $ comment_author | 'Administrator mailbox' = $ comment_author_email) Wp_die ('Haha, are you kidding? '); If (get_option ('comment _ registration') | 'private' = $ status) Wp_die (_ ('sorry, you must be logged in to post a comment. '); WordPress 2.9.2Open the wp-comments-post.php under the WordPress installation directory in a text editor, find and put the following code (about 63 lines ): If (get_option ('comment _ registration') | 'private' = $ status-> post_status) Wp_die (_ ('sorry, you must be logged in to post a comment .'));Replace: If ('Administrator nickname '= $ comment_author | 'Administrator mailbox' = $ comment_author_email) Wp_die ('Haha, are you kidding? '); If (get_option ('comment _ registration') | 'private' = $ status-> post_status) Wp_die (_ ('sorry, you must be logged in to post a comment .')); |