Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.578 diff -u -r1.578 system.module --- modules/system/system.module 10 Jan 2008 23:14:58 -0000 1.578 +++ modules/system/system.module 14 Jan 2008 21:13:33 -0000 @@ -1604,6 +1604,7 @@ function system_send_email_action_validate($form, $form_state) { $form_values = $form_state['values']; // Validate the configuration form. + $form_values['recipient'] = trim($form_values['recipient']); if (!valid_email_address($form_values['recipient']) && $form_values['recipient'] != '%author') { // We want the literal %author placeholder to be emphasized in the error message. form_set_error('recipient', t('Please enter a valid email address or %author.', array('%author' => '%author'))); Index: modules/system/system.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v retrieving revision 1.53 diff -u -r1.53 system.admin.inc --- modules/system/system.admin.inc 9 Jan 2008 10:11:55 -0000 1.53 +++ modules/system/system.admin.inc 14 Jan 2008 21:13:22 -0000 @@ -1170,6 +1170,7 @@ */ function system_site_information_settings_validate($form, &$form_state) { // Validate the e-mail address. + $form_state['values']['site_mail'] = trim($form_state['values']['site_mail']); if ($error = user_validate_mail($form_state['values']['site_mail'])) { form_set_error('site_mail', $error); } Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.887 diff -u -r1.887 user.module --- modules/user/user.module 10 Jan 2008 20:22:57 -0000 1.887 +++ modules/user/user.module 14 Jan 2008 21:13:45 -0000 @@ -1492,7 +1492,8 @@ form_set_error('name', t('The name %name has been denied access.', array('%name' => $edit['name']))); } } - + + $edit['mail'] = trim($edit['mail']); // Validate the e-mail address: if ($error = user_validate_mail($edit['mail'])) { form_set_error('mail', $error); Index: install.php =================================================================== RCS file: /cvs/drupal/drupal/install.php,v retrieving revision 1.112 diff -u -r1.112 install.php --- install.php 7 Jan 2008 19:43:28 -0000 1.112 +++ install.php 14 Jan 2008 21:12:49 -0000 @@ -1099,9 +1099,11 @@ if ($error = user_validate_name($form_state['values']['account']['name'])) { form_error($form['admin_account']['account']['name'], $error); } + $form_state['values']['account']['mail'] = trim($form_state['values']['account']['mail']); if ($error = user_validate_mail($form_state['values']['account']['mail'])) { form_error($form['admin_account']['account']['mail'], $error); } + $form_state['values']['site_mail'] = trim($form_state['values']['site_mail']); if ($error = user_validate_mail($form_state['values']['site_mail'])) { form_error($form['site_information']['site_mail'], $error); } Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.616 diff -u -r1.616 comment.module --- modules/comment/comment.module 10 Jan 2008 15:03:53 -0000 1.616 +++ modules/comment/comment.module 14 Jan 2008 21:13:09 -0000 @@ -698,7 +698,7 @@ ); if ($edit['cid']) { // Update the comment in the database. - db_query("UPDATE {comments} SET status = %d, timestamp = %d, subject = '%s', comment = '%s', format = %d, uid = %d, name = '%s', mail = '%s', homepage = '%s' WHERE cid = %d", $edit['status'], $edit['timestamp'], $edit['subject'], $edit['comment'], $edit['format'], $edit['uid'], $edit['name'], $edit['mail'], $edit['homepage'], $edit['cid']); + db_query("UPDATE {comments} SET status = %d, timestamp = %d, subject = '%s', comment = '%s', format = %d, uid = %d, name = '%s', mail = '%s', homepage = '%s' WHERE cid = %d", $edit['status'], $edit['timestamp'], $edit['subject'], $edit['comment'], $edit['format'], $edit['uid'], $edit['name'], trim($edit['mail']), $edit['homepage'], $edit['cid']); // Allow modules to respond to the updating of a comment. comment_invoke_comment($edit, 'update'); @@ -1209,6 +1209,7 @@ } if ($edit['mail']) { + $edit['mail'] = trim($edit['mail']); if (!valid_email_address($edit['mail'])) { form_set_error('mail', t('The e-mail address you specified is not valid.')); } Index: modules/contact/contact.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/contact/contact.pages.inc,v retrieving revision 1.5 diff -u -r1.5 contact.pages.inc --- modules/contact/contact.pages.inc 10 Dec 2007 10:38:00 -0000 1.5 +++ modules/contact/contact.pages.inc 14 Jan 2008 21:13:12 -0000 @@ -105,6 +105,7 @@ if (!$form_state['values']['cid']) { form_set_error('category', t('You must select a valid category.')); } + $form_state['values']['mail'] = trim($form_state['values']['mail']); if (!valid_email_address($form_state['values']['mail'])) { form_set_error('mail', t('You must enter a valid e-mail address.')); }