Commit 552b5e5e authored by Dries's avatar Dries
Browse files

- Patch #46227 by yogadex: fixed problem with form validation.

parent d20ed7e3
......@@ -121,7 +121,7 @@ function drupal_validate_form($form_id, &$form, $callback = NULL) {
global $form_values;
if (isset($form['#token'])) {
if ($form_values['form_token'] != md5($_SERVER['REMOTE_ADDR'] . $form['#token'] . variable_get('drupal_private_key', ''))) {
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.'));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment