updated core to 7.54

This commit is contained in:
Bachir Soussi Chiadmi
2017-05-24 19:27:14 +02:00
parent 9acef9d37e
commit 728f8e6d31
163 changed files with 1022 additions and 513 deletions

View File

@@ -1176,7 +1176,7 @@ function drupal_validate_form($form_id, &$form, &$form_state) {
// If the session token was set by drupal_prepare_form(), ensure that it
// matches the current user's session. This is duplicate to code in
// form_builder() but left to protect any custom form handling code.
if (isset($form['#token'])) {
if (!empty($form['#token'])) {
if (!drupal_valid_token($form_state['values']['form_token'], $form['#token']) || !empty($form_state['invalid_token'])) {
_drupal_invalid_token_set_form_error();
// Stop here and don't run any further validation handlers, because they
@@ -1837,7 +1837,7 @@ function form_builder($form_id, &$element, &$form_state) {
// If the session token was set by drupal_prepare_form(), ensure that it
// matches the current user's session.
$form_state['invalid_token'] = FALSE;
if (isset($element['#token'])) {
if (!empty($element['#token'])) {
if (empty($form_state['input']['form_token']) || !drupal_valid_token($form_state['input']['form_token'], $element['#token'])) {
// Set an early form error to block certain input processing since that
// opens the door for CSRF vulnerabilities.