Changeset 2464

Show
Ignore:
Timestamp:
03/22/05 00:29:43 (4 years ago)
Author:
ryan
Message:

Validate comment author email. http://mosquito.wordpress.org/view.php?id=982 Props: MtDewVirus?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-comments-post.php

    r2436 r2464  
    3232$comment_type = ''; 
    3333 
    34 if ( (get_settings('require_name_email') && !$user_ID) && ('' == $comment_author_email || '' == $comment_author) ) 
    35     die( __('Error: please fill the required fields (name, email).') ); 
     34if ( get_settings('require_name_email') && !$user_ID ) { 
     35    if ('' == $comment_author_email || '' == $comment_author) 
     36        die( __('Error: please fill the required fields (name, email).') ); 
     37    elseif ( !is_email($comment_author_email)) 
     38        die( __('Error: please enter a valid email address.') ); 
     39
    3640 
    3741if ( '' == $comment_content )