Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.79
diff -u -r1.79 form.inc
--- includes/form.inc	16 Mar 2006 15:32:44 -0000	1.79
+++ includes/form.inc	17 Mar 2006 05:41:23 -0000
@@ -64,14 +64,6 @@
   $form_submitted = FALSE;
 
   $form['#type'] = 'form';
-  if (isset($form['#token'])) {
-    // Make sure that a private key is set:
-    if (!variable_get('drupal_private_key', '')) {
-      variable_set('drupal_private_key', mt_rand());
-    }
-
-    $form['form_token'] = array('#type' => 'hidden', '#default_value' => md5(session_id() . $form['#token'] . variable_get('drupal_private_key', '')));
-  }
   if (isset($form_id)) {
     $form['form_id'] = array('#type' => 'hidden', '#value' => $form_id);
   }
@@ -108,7 +100,7 @@
 
   $form = form_builder($form_id, $form);
   if (!empty($_POST['edit']) && (($_POST['edit']['form_id'] == $form_id) || ($_POST['edit']['form_id'] == $callback))) {
-    drupal_validate_form($form_id, $form, $callback);
+    _form_validate($form, $form_id);
     if ($form_submitted && !form_get_errors()) {
       $redirect = drupal_submit_form($form_id, $form, $callback);
       if (isset($redirect)) {
@@ -146,19 +138,6 @@
   return form_render($form);
 }
 
-function drupal_validate_form($form_id, &$form, $callback = NULL) {
-  global $form_values;
-
-  if (isset($form['#token'])) {
-    if ($form_values['form_token'] != md5(session_id() . $form['#token'] . variable_get('drupal_private_key', ''))) {
-      // setting this error will cause the form to fail validation
-      form_set_error('form_token', t('Validation error, please try again.  If this error persists, please contact the site administrator.'));
-    }
-  }
-
-  _form_validate($form, $form_id);
-}
-
 function drupal_submit_form($form_id, $form, $callback = NULL) {
   // Prevent system module forms (system/theme settings) from saving certain form fields to the variables table.
   unset($GLOBALS['form_values']['submit'], $GLOBALS['form_values']['reset'], $GLOBALS['form_values']['form_id']);
Index: modules/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment.module,v
retrieving revision 1.440
diff -u -r1.440 comment.module
--- modules/comment.module	6 Mar 2006 20:52:55 -0000	1.440
+++ modules/comment.module	17 Mar 2006 05:41:23 -0000
@@ -1323,7 +1323,6 @@
   $form['uid'] = array('#type' => 'value', '#value' => $edit['uid']);
 
   $form['preview'] = array('#type' => 'button', '#value' => t('Preview comment'), '#weight' => 19);
-  $form['#token'] = 'comment' . $edit['nid'] . $edit['pid'];
 
   // Only show post button if preview is optional or if we are in preview mode.
   // We show the post button in preview mode even if there are form errors so that
Index: modules/contact.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact.module,v
retrieving revision 1.43
diff -u -r1.43 contact.module
--- modules/contact.module	27 Feb 2006 17:02:53 -0000	1.43
+++ modules/contact.module	17 Mar 2006 05:41:23 -0000
@@ -336,7 +336,6 @@
     else {
       drupal_set_title($account->name);
 
-      $form['#token'] = $user->name . $user->mail;
       $form['from'] = array('#type' => 'item',
         '#title' => t('From'),
         '#value' => $user->name .' &lt;'. $user->mail .'&gt;',
@@ -447,7 +446,6 @@
     }
 
     if (count($categories) > 1) {
-      $form['#token'] = $user->name . $user->mail;
       $form['contact_information'] = array('#type' => 'markup',
         '#value' => variable_get('contact_form_information', t('You can leave us a message using the contact form below.')),
       );
Index: modules/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node.module,v
retrieving revision 1.615
diff -u -r1.615 node.module
--- modules/node.module	9 Mar 2006 22:38:40 -0000	1.615
+++ modules/node.module	17 Mar 2006 05:41:23 -0000
@@ -1744,7 +1744,7 @@
 function node_form_add_preview($form, $edit) {
   $op = isset($_POST['op']) ? $_POST['op'] : '';
   if ($op == t('Preview')) {
-    drupal_validate_form($form['form_id']['#value'], $form);
+    _form_validate($form, $form['form_id']['#value']);
     if (!form_get_errors()) {
       $form['node_preview'] = array('#value' => node_preview((object)$edit), '#weight' => -100);
     }