Index: wp-comments-post.php
===================================================================
--- wp-comments-post.php	(revision 16123)
+++ wp-comments-post.php	(working copy)
@@ -52,8 +52,16 @@
 $comment_author_url   = ( isset($_POST['url']) )     ? trim($_POST['url']) : null;
 $comment_content      = ( isset($_POST['comment']) ) ? trim($_POST['comment']) : null;
 
+// required for the nonce to work
+$user = wp_get_current_user();
+
+// see comment_form_nonce() in wp-includes/comment.php
+if ( !isset($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], "comment_form_{$comment_post_ID}") ) {
+	do_action('comment_nonce_failed', $comment_post_ID);
+	wp_die( __('Sorry, automated comments are not accepted.') );
+}
+
 // If the user is logged in
-$user = wp_get_current_user();
 if ( $user->ID ) {
 	if ( empty( $user->display_name ) )
 		$user->display_name=$user->user_login;
Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php	(revision 16123)
+++ wp-includes/comment.php	(working copy)
@@ -1981,4 +1981,13 @@
 	return $open;
 }
 
+/**
+ * Include a nonce in comment forms.
+ */
+function comment_form_nonce($post_id) {
+	wp_nonce_field("comment_form_{$post_id}", '_wpnonce', false);
+}
+
+add_action('comment_form', 'comment_form_nonce');
+
 ?>
