Skip to content

Commit

Permalink
Update Core to 7.58
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentTorregrosa committed Apr 1, 2018
1 parent f69e15b commit 40aefe1
Show file tree
Hide file tree
Showing 132 changed files with 477 additions and 391 deletions.
6 changes: 5 additions & 1 deletion www/includes/bootstrap.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* The current system version.
*/
define('VERSION', '7.57');
define('VERSION', '7.58');

/**
* Core API compatibility.
Expand Down Expand Up @@ -2632,6 +2632,10 @@ function _drupal_bootstrap_configuration() {
timer_start('page');
// Initialize the configuration, including variables from settings.php.
drupal_settings_initialize();

// Sanitize unsafe keys from the request.
require_once DRUPAL_ROOT . '/includes/request-sanitizer.inc';
DrupalRequestSanitizer::sanitize();
}

/**
Expand Down
82 changes: 82 additions & 0 deletions www/includes/request-sanitizer.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php

/**
* @file
* Contains code for sanitizing user input from the request.
*/

/**
* Sanitizes user input from the request.
*/
class DrupalRequestSanitizer {

/**
* Tracks whether the request was already sanitized.
*/
protected static $sanitized = FALSE;

/**
* Modifies the request to strip dangerous keys from user input.
*/
public static function sanitize() {
if (!self::$sanitized) {
$whitelist = variable_get('sanitize_input_whitelist', array());
$log_sanitized_keys = variable_get('sanitize_input_logging', FALSE);

// Process query string parameters.
$get_sanitized_keys = array();
$_GET = self::stripDangerousValues($_GET, $whitelist, $get_sanitized_keys);
if ($log_sanitized_keys && $get_sanitized_keys) {
_drupal_trigger_error_with_delayed_logging(format_string('Potentially unsafe keys removed from query string parameters (GET): @keys', array('@keys' => implode(', ', $get_sanitized_keys))), E_USER_NOTICE);
}

// Process request body parameters.
$post_sanitized_keys = array();
$_POST = self::stripDangerousValues($_POST, $whitelist, $post_sanitized_keys);
if ($log_sanitized_keys && $post_sanitized_keys) {
_drupal_trigger_error_with_delayed_logging(format_string('Potentially unsafe keys removed from request body parameters (POST): @keys', array('@keys' => implode(', ', $post_sanitized_keys))), E_USER_NOTICE);
}

// Process cookie parameters.
$cookie_sanitized_keys = array();
$_COOKIE = self::stripDangerousValues($_COOKIE, $whitelist, $cookie_sanitized_keys);
if ($log_sanitized_keys && $cookie_sanitized_keys) {
_drupal_trigger_error_with_delayed_logging(format_string('Potentially unsafe keys removed from cookie parameters (COOKIE): @keys', array('@keys' => implode(', ', $cookie_sanitized_keys))), E_USER_NOTICE);
}

$request_sanitized_keys = array();
$_REQUEST = self::stripDangerousValues($_REQUEST, $whitelist, $request_sanitized_keys);

self::$sanitized = TRUE;
}
}

/**
* Strips dangerous keys from the provided input.
*
* @param mixed $input
* The input to sanitize.
* @param string[] $whitelist
* An array of keys to whitelist as safe.
* @param string[] $sanitized_keys
* An array of keys that have been removed.
*
* @return mixed
* The sanitized input.
*/
protected static function stripDangerousValues($input, array $whitelist, array &$sanitized_keys) {
if (is_array($input)) {
foreach ($input as $key => $value) {
if ($key !== '' && $key[0] === '#' && !in_array($key, $whitelist, TRUE)) {
unset($input[$key]);
$sanitized_keys[] = $key;
}
else {
$input[$key] = self::stripDangerousValues($input[$key], $whitelist, $sanitized_keys);
}
}
}
return $input;
}

}
6 changes: 3 additions & 3 deletions www/modules/aggregator/aggregator.info
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ files[] = aggregator.test
configure = admin/config/services/aggregator/settings
stylesheets[all][] = aggregator.css

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/aggregator/tests/aggregator_test.info
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/block/block.info
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ core = 7.x
files[] = block.test
configure = admin/structure/block

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/block/tests/block_test.info
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ regions[footer] = Footer
regions[highlighted] = Highlighted
regions[help] = Help

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/blog/blog.info
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ version = VERSION
core = 7.x
files[] = blog.test

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/book/book.info
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ files[] = book.test
configure = admin/content/book/settings
stylesheets[all][] = book.css

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/color/color.info
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ version = VERSION
core = 7.x
files[] = color.test

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/comment/comment.info
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ files[] = comment.test
configure = admin/content/comment
stylesheets[all][] = comment.css

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/contact/contact.info
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ core = 7.x
files[] = contact.test
configure = admin/structure/contact

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/contextual/contextual.info
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ version = VERSION
core = 7.x
files[] = contextual.test

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/dashboard/dashboard.info
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ files[] = dashboard.test
dependencies[] = block
configure = admin/dashboard/customize

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/dblog/dblog.info
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ version = VERSION
core = 7.x
files[] = dblog.test

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/field/field.info
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ dependencies[] = field_sql_storage
required = TRUE
stylesheets[all][] = theme/field.css

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ dependencies[] = field
files[] = field_sql_storage.test
required = TRUE

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/field/modules/list/list.info
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ dependencies[] = field
dependencies[] = options
files[] = tests/list.test

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/field/modules/list/tests/list_test.info
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package = Testing
version = VERSION
hidden = TRUE

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/field/modules/number/number.info
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ core = 7.x
dependencies[] = field
files[] = number.test

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/field/modules/options/options.info
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ core = 7.x
dependencies[] = field
files[] = options.test

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/field/modules/text/text.info
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ dependencies[] = field
files[] = text.test
required = TRUE

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/field/tests/field_test.info
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ files[] = field_test.entity.inc
version = VERSION
hidden = TRUE

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/field_ui/field_ui.info
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ core = 7.x
dependencies[] = field
files[] = field_ui.test

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/file/file.info
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ core = 7.x
dependencies[] = field
files[] = tests/file.test

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

6 changes: 3 additions & 3 deletions www/modules/file/tests/file_module_test.info
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE

; Information added by Drupal.org packaging script on 2018-02-21
version = "7.57"
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
project = "drupal"
datestamp = "1519235152"
datestamp = "1522264019"

Loading

0 comments on commit 40aefe1

Please sign in to comment.