Skip to content
Snippets Groups Projects
Commit 552b5e5e authored by Dries Buytaert's avatar Dries Buytaert
Browse files

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

parent d20ed7e3
No related branches found
No related tags found
No related merge requests found
......@@ -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.'));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment