Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4b3ca6c94 | ||
|
|
0150486358 | ||
|
|
878e9adeb6 | ||
|
|
afac7f57b0 | ||
|
|
cd374d7de8 | ||
|
|
56a2f0c21f | ||
|
|
f7e402320e | ||
|
|
79071bf0cc | ||
|
|
6d40f860e4 | ||
|
|
fcb7677cfc | ||
|
|
86dcf68f62 | ||
|
|
eddb96cb2e | ||
|
|
2df8d15d91 | ||
|
|
f515e7682a | ||
|
|
6e56bf1799 | ||
|
|
613ea5fc02 | ||
|
|
a9cd74b3fb | ||
|
|
bcd129a961 | ||
|
|
35eadafe3e | ||
|
|
74f4c09eb1 | ||
|
|
67ce55c047 | ||
|
|
ab9c1dcd4d | ||
|
|
f7225cdd01 | ||
|
|
65d95036c0 | ||
|
|
1904ab1352 | ||
|
|
77065246fc | ||
|
|
b6168089a7 | ||
|
|
249bc608b3 | ||
|
|
9c61825a17 | ||
|
|
f7c8728f20 | ||
|
|
7356c6cec6 | ||
|
|
7d11684731 | ||
|
|
86573ebbe9 | ||
|
|
e31f0c34a7 | ||
|
|
452f41108b | ||
|
|
d62d02201b | ||
|
|
cfe15cebd8 | ||
|
|
8133aa66f0 | ||
|
|
94175c1df1 | ||
|
|
82d5409957 | ||
|
|
07728aa425 | ||
|
|
29ad08648f | ||
|
|
a3a4e3922c | ||
|
|
76ff40f8bb | ||
|
|
c0fbcb7706 | ||
|
|
7e073fdfa0 | ||
|
|
1d0a95f022 | ||
|
|
9570ee1823 | ||
|
|
c5ae3d6b00 | ||
|
|
4967111a0e | ||
|
|
e27d1f1e5a | ||
|
|
df54d07169 | ||
|
|
efca592b17 | ||
|
|
95cd2c15cf | ||
|
|
00166e7917 | ||
|
|
ea435b7517 | ||
|
|
6d88ca7c8d | ||
|
|
d4087b2924 | ||
|
|
a01d52e62c | ||
|
|
252149bfdc | ||
|
|
cb2ae7ee35 | ||
|
|
10f68b951d | ||
|
|
0d555a596e | ||
|
|
d485286289 | ||
|
|
97dd8cdf97 | ||
|
|
97ec3584d8 | ||
|
|
e9a00903a9 | ||
|
|
9c6fe22012 | ||
|
|
741849397e | ||
|
|
679e1f09ad | ||
|
|
162ab2b949 | ||
|
|
c0b6dc6b75 | ||
|
|
848f03f4a4 | ||
|
|
ac821854ce | ||
|
|
1ae73c1c12 | ||
|
|
07a138cfe6 | ||
|
|
1d3a3dd6fd | ||
|
|
b33159e3d0 | ||
|
|
12bfc68272 | ||
|
|
c2e4eb9d38 | ||
|
|
5b8efe29f2 | ||
|
|
6811f6e586 | ||
|
|
14d55b289d |
@@ -6,11 +6,11 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"composer/installers": "^1.0.24",
|
"composer/installers": "^1.0.24",
|
||||||
"wikimedia/composer-merge-plugin": "^1.4",
|
"wikimedia/composer-merge-plugin": "^1.4",
|
||||||
|
"drupal/core": "^8.5",
|
||||||
"drupal/console": "^1.7",
|
"drupal/console": "^1.7",
|
||||||
"drush/drush": "^9"
|
"drush/drush": "^9"
|
||||||
},
|
},
|
||||||
"replace": {
|
"replace": {
|
||||||
"drupal/core": "^8.5"
|
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 11 KiB |
@@ -24,7 +24,7 @@ classList:
|
|||||||
|
|
||||||
ckeditor:
|
ckeditor:
|
||||||
remote: https://github.com/ckeditor/ckeditor-dev
|
remote: https://github.com/ckeditor/ckeditor-dev
|
||||||
version: "4.8.0"
|
version: "4.8.0+2018-04-18-security-patch"
|
||||||
license:
|
license:
|
||||||
name: GNU-GPL-2.0-or-later
|
name: GNU-GPL-2.0-or-later
|
||||||
url: https://github.com/ckeditor/ckeditor-dev/blob/4.8.0/LICENSE.md
|
url: https://github.com/ckeditor/ckeditor-dev/blob/4.8.0/LICENSE.md
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ class Drupal {
|
|||||||
/**
|
/**
|
||||||
* The current system version.
|
* The current system version.
|
||||||
*/
|
*/
|
||||||
const VERSION = '8.5.0';
|
const VERSION = '8.5.2';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Core API compatibility.
|
* Core API compatibility.
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ use Drupal\Core\File\MimeType\MimeTypeGuesser;
|
|||||||
use Drupal\Core\Http\TrustedHostsRequestFactory;
|
use Drupal\Core\Http\TrustedHostsRequestFactory;
|
||||||
use Drupal\Core\Installer\InstallerRedirectTrait;
|
use Drupal\Core\Installer\InstallerRedirectTrait;
|
||||||
use Drupal\Core\Language\Language;
|
use Drupal\Core\Language\Language;
|
||||||
|
use Drupal\Core\Security\RequestSanitizer;
|
||||||
use Drupal\Core\Site\Settings;
|
use Drupal\Core\Site\Settings;
|
||||||
use Drupal\Core\Test\TestDatabase;
|
use Drupal\Core\Test\TestDatabase;
|
||||||
use Symfony\Cmf\Component\Routing\RouteObjectInterface;
|
use Symfony\Cmf\Component\Routing\RouteObjectInterface;
|
||||||
@@ -542,6 +543,12 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function preHandle(Request $request) {
|
public function preHandle(Request $request) {
|
||||||
|
// Sanitize the request.
|
||||||
|
$request = RequestSanitizer::sanitize(
|
||||||
|
$request,
|
||||||
|
(array) Settings::get(RequestSanitizer::SANITIZE_WHITELIST, []),
|
||||||
|
(bool) Settings::get(RequestSanitizer::SANITIZE_LOG, FALSE)
|
||||||
|
);
|
||||||
|
|
||||||
$this->loadLegacyIncludes();
|
$this->loadLegacyIncludes();
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,99 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Drupal\Core\Security;
|
||||||
|
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sanitizes user input.
|
||||||
|
*/
|
||||||
|
class RequestSanitizer {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request attribute to mark the request as sanitized.
|
||||||
|
*/
|
||||||
|
const SANITIZED = '_drupal_request_sanitized';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the setting that configures the whitelist.
|
||||||
|
*/
|
||||||
|
const SANITIZE_WHITELIST = 'sanitize_input_whitelist';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the setting that determines if sanitized keys are logged.
|
||||||
|
*/
|
||||||
|
const SANITIZE_LOG = 'sanitize_input_logging';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Strips dangerous keys from user input.
|
||||||
|
*
|
||||||
|
* @param \Symfony\Component\HttpFoundation\Request $request
|
||||||
|
* The incoming request to sanitize.
|
||||||
|
* @param string[] $whitelist
|
||||||
|
* An array of keys to whitelist as safe. See default.settings.php.
|
||||||
|
* @param bool $log_sanitized_keys
|
||||||
|
* (optional) Set to TRUE to log an keys that are sanitized.
|
||||||
|
*
|
||||||
|
* @return \Symfony\Component\HttpFoundation\Request
|
||||||
|
* The sanitized request.
|
||||||
|
*/
|
||||||
|
public static function sanitize(Request $request, $whitelist, $log_sanitized_keys = FALSE) {
|
||||||
|
if (!$request->attributes->get(self::SANITIZED, FALSE)) {
|
||||||
|
// Process query string parameters.
|
||||||
|
$get_sanitized_keys = [];
|
||||||
|
$request->query->replace(static::stripDangerousValues($request->query->all(), $whitelist, $get_sanitized_keys));
|
||||||
|
if ($log_sanitized_keys && !empty($get_sanitized_keys)) {
|
||||||
|
trigger_error(sprintf('Potentially unsafe keys removed from query string parameters (GET): %s', implode(', ', $get_sanitized_keys)));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Request body parameters.
|
||||||
|
$post_sanitized_keys = [];
|
||||||
|
$request->request->replace(static::stripDangerousValues($request->request->all(), $whitelist, $post_sanitized_keys));
|
||||||
|
if ($log_sanitized_keys && !empty($post_sanitized_keys)) {
|
||||||
|
trigger_error(sprintf('Potentially unsafe keys removed from request body parameters (POST): %s', implode(', ', $post_sanitized_keys)));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cookie parameters.
|
||||||
|
$cookie_sanitized_keys = [];
|
||||||
|
$request->cookies->replace(static::stripDangerousValues($request->cookies->all(), $whitelist, $cookie_sanitized_keys));
|
||||||
|
if ($log_sanitized_keys && !empty($cookie_sanitized_keys)) {
|
||||||
|
trigger_error(sprintf('Potentially unsafe keys removed from cookie parameters: %s', implode(', ', $cookie_sanitized_keys)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($get_sanitized_keys) || !empty($post_sanitized_keys) || !empty($cookie_sanitized_keys)) {
|
||||||
|
$request->overrideGlobals();
|
||||||
|
}
|
||||||
|
$request->attributes->set(self::SANITIZED, TRUE);
|
||||||
|
}
|
||||||
|
return $request;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Strips dangerous keys from $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] = static::stripDangerousValues($input[$key], $whitelist, $sanitized_keys);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $input;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,12 +2,6 @@ name: Actions
|
|||||||
type: module
|
type: module
|
||||||
description: 'Perform tasks on specific events triggered within the system.'
|
description: 'Perform tasks on specific events triggered within the system.'
|
||||||
package: Core
|
package: Core
|
||||||
# version: VERSION
|
version: VERSION
|
||||||
# core: 8.x
|
core: 8.x
|
||||||
configure: entity.action.collection
|
configure: entity.action.collection
|
||||||
|
|
||||||
# Information added by Drupal.org packaging script on 2018-03-07
|
|
||||||
version: '8.5.0'
|
|
||||||
core: '8.x'
|
|
||||||
project: 'drupal'
|
|
||||||
datestamp: 1520457826
|
|
||||||
|
|||||||
@@ -2,15 +2,9 @@ name: 'Action bulk form test'
|
|||||||
type: module
|
type: module
|
||||||
description: 'Support module for action bulk form testing.'
|
description: 'Support module for action bulk form testing.'
|
||||||
package: Testing
|
package: Testing
|
||||||
# version: VERSION
|
version: VERSION
|
||||||
# core: 8.x
|
core: 8.x
|
||||||
dependencies:
|
dependencies:
|
||||||
- action
|
- action
|
||||||
- views
|
- views
|
||||||
- node
|
- node
|
||||||
|
|
||||||
# Information added by Drupal.org packaging script on 2018-03-07
|
|
||||||
version: '8.5.0'
|
|
||||||
core: '8.x'
|
|
||||||
project: 'drupal'
|
|
||||||
datestamp: 1520457826
|
|
||||||
|
|||||||
@@ -2,12 +2,6 @@ name: action_form_ajax_test
|
|||||||
type: module
|
type: module
|
||||||
description: 'module used for testing ajax in action config entity forms.'
|
description: 'module used for testing ajax in action config entity forms.'
|
||||||
package: Core
|
package: Core
|
||||||
# version: VERSION
|
version: VERSION
|
||||||
# core: 8.x
|
core: 8.x
|
||||||
hidden: true
|
hidden: true
|
||||||
|
|
||||||
# Information added by Drupal.org packaging script on 2018-03-07
|
|
||||||
version: '8.5.0'
|
|
||||||
core: '8.x'
|
|
||||||
project: 'drupal'
|
|
||||||
datestamp: 1520457826
|
|
||||||
|
|||||||
@@ -2,15 +2,9 @@ name: Aggregator
|
|||||||
type: module
|
type: module
|
||||||
description: 'Aggregates syndicated content (RSS, RDF, and Atom feeds) from external sources.'
|
description: 'Aggregates syndicated content (RSS, RDF, and Atom feeds) from external sources.'
|
||||||
package: Core
|
package: Core
|
||||||
# version: VERSION
|
version: VERSION
|
||||||
# core: 8.x
|
core: 8.x
|
||||||
configure: aggregator.admin_settings
|
configure: aggregator.admin_settings
|
||||||
dependencies:
|
dependencies:
|
||||||
- file
|
- file
|
||||||
- options
|
- options
|
||||||
|
|
||||||
# Information added by Drupal.org packaging script on 2018-03-07
|
|
||||||
version: '8.5.0'
|
|
||||||
core: '8.x'
|
|
||||||
project: 'drupal'
|
|
||||||
datestamp: 1520457826
|
|
||||||
|
|||||||
@@ -2,11 +2,5 @@ name: 'Aggregator module tests'
|
|||||||
type: module
|
type: module
|
||||||
description: 'Support module for aggregator related testing.'
|
description: 'Support module for aggregator related testing.'
|
||||||
package: Testing
|
package: Testing
|
||||||
# version: VERSION
|
version: VERSION
|
||||||
# core: 8.x
|
core: 8.x
|
||||||
|
|
||||||
# Information added by Drupal.org packaging script on 2018-03-07
|
|
||||||
version: '8.5.0'
|
|
||||||
core: '8.x'
|
|
||||||
project: 'drupal'
|
|
||||||
datestamp: 1520457826
|
|
||||||
|
|||||||
@@ -2,14 +2,8 @@ name: 'Aggregator test views'
|
|||||||
type: module
|
type: module
|
||||||
description: 'Provides default views for views aggregator tests.'
|
description: 'Provides default views for views aggregator tests.'
|
||||||
package: Testing
|
package: Testing
|
||||||
# version: VERSION
|
version: VERSION
|
||||||
# core: 8.x
|
core: 8.x
|
||||||
dependencies:
|
dependencies:
|
||||||
- aggregator
|
- aggregator
|
||||||
- views
|
- views
|
||||||
|
|
||||||
# Information added by Drupal.org packaging script on 2018-03-07
|
|
||||||
version: '8.5.0'
|
|
||||||
core: '8.x'
|
|
||||||
project: 'drupal'
|
|
||||||
datestamp: 1520457826
|
|
||||||
|
|||||||
@@ -2,12 +2,6 @@ name: 'Automated Cron'
|
|||||||
type: module
|
type: module
|
||||||
description: 'Provides an automated way to run cron jobs, by executing them at the end of a server response.'
|
description: 'Provides an automated way to run cron jobs, by executing them at the end of a server response.'
|
||||||
package: Core
|
package: Core
|
||||||
# version: VERSION
|
version: VERSION
|
||||||
# core: 8.x
|
core: 8.x
|
||||||
configure: system.cron_settings
|
configure: system.cron_settings
|
||||||
|
|
||||||
# Information added by Drupal.org packaging script on 2018-03-07
|
|
||||||
version: '8.5.0'
|
|
||||||
core: '8.x'
|
|
||||||
project: 'drupal'
|
|
||||||
datestamp: 1520457826
|
|
||||||
|
|||||||
@@ -2,12 +2,6 @@ name: Ban
|
|||||||
type: module
|
type: module
|
||||||
description: 'Enables banning of IP addresses.'
|
description: 'Enables banning of IP addresses.'
|
||||||
package: Core
|
package: Core
|
||||||
# version: VERSION
|
version: VERSION
|
||||||
# core: 8.x
|
core: 8.x
|
||||||
configure: ban.admin_page
|
configure: ban.admin_page
|
||||||
|
|
||||||
# Information added by Drupal.org packaging script on 2018-03-07
|
|
||||||
version: '8.5.0'
|
|
||||||
core: '8.x'
|
|
||||||
project: 'drupal'
|
|
||||||
datestamp: 1520457826
|
|
||||||
|
|||||||
@@ -2,13 +2,7 @@ name: 'HTTP Basic Authentication'
|
|||||||
type: module
|
type: module
|
||||||
description: 'Provides the HTTP Basic authentication provider'
|
description: 'Provides the HTTP Basic authentication provider'
|
||||||
package: Web services
|
package: Web services
|
||||||
# version: VERSION
|
version: VERSION
|
||||||
# core: 8.x
|
core: 8.x
|
||||||
dependencies:
|
dependencies:
|
||||||
- user
|
- user
|
||||||
|
|
||||||
# Information added by Drupal.org packaging script on 2018-03-07
|
|
||||||
version: '8.5.0'
|
|
||||||
core: '8.x'
|
|
||||||
project: 'drupal'
|
|
||||||
datestamp: 1520457826
|
|
||||||
|
|||||||
@@ -2,11 +2,5 @@ name: 'HTTP Basic Authentication test'
|
|||||||
type: module
|
type: module
|
||||||
description: 'Support module for HTTP Basic Authentication testing.'
|
description: 'Support module for HTTP Basic Authentication testing.'
|
||||||
package: Testing
|
package: Testing
|
||||||
# version: VERSION
|
version: VERSION
|
||||||
# core: 8.x
|
core: 8.x
|
||||||
|
|
||||||
# Information added by Drupal.org packaging script on 2018-03-07
|
|
||||||
version: '8.5.0'
|
|
||||||
core: '8.x'
|
|
||||||
project: 'drupal'
|
|
||||||
datestamp: 1520457826
|
|
||||||
|
|||||||
@@ -2,11 +2,5 @@ name: BigPipe
|
|||||||
type: module
|
type: module
|
||||||
description: 'Sends pages using the BigPipe technique that allows browsers to show them much faster.'
|
description: 'Sends pages using the BigPipe technique that allows browsers to show them much faster.'
|
||||||
package: Core
|
package: Core
|
||||||
# version: VERSION
|
version: VERSION
|
||||||
# core: 8.x
|
core: 8.x
|
||||||
|
|
||||||
# Information added by Drupal.org packaging script on 2018-03-07
|
|
||||||
version: '8.5.0'
|
|
||||||
core: '8.x'
|
|
||||||
project: 'drupal'
|
|
||||||
datestamp: 1520457826
|
|
||||||
|
|||||||
@@ -2,11 +2,5 @@ name: 'BigPipe regression test'
|
|||||||
type: module
|
type: module
|
||||||
description: 'Support module for BigPipe regression testing.'
|
description: 'Support module for BigPipe regression testing.'
|
||||||
package: Testing
|
package: Testing
|
||||||
# version: VERSION
|
version: VERSION
|
||||||
# core: 8.x
|
core: 8.x
|
||||||
|
|
||||||
# Information added by Drupal.org packaging script on 2018-03-07
|
|
||||||
version: '8.5.0'
|
|
||||||
core: '8.x'
|
|
||||||
project: 'drupal'
|
|
||||||
datestamp: 1520457826
|
|
||||||
|
|||||||
@@ -2,11 +2,5 @@ name: 'BigPipe test'
|
|||||||
type: module
|
type: module
|
||||||
description: 'Support module for BigPipe testing.'
|
description: 'Support module for BigPipe testing.'
|
||||||
package: Testing
|
package: Testing
|
||||||
# version: VERSION
|
version: VERSION
|
||||||
# core: 8.x
|
core: 8.x
|
||||||
|
|
||||||
# Information added by Drupal.org packaging script on 2018-03-07
|
|
||||||
version: '8.5.0'
|
|
||||||
core: '8.x'
|
|
||||||
project: 'drupal'
|
|
||||||
datestamp: 1520457826
|
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
name: 'BigPipe test theme'
|
name: 'BigPipe test theme'
|
||||||
type: theme
|
type: theme
|
||||||
description: 'Theme for testing BigPipe edge cases.'
|
description: 'Theme for testing BigPipe edge cases.'
|
||||||
# version: VERSION
|
version: VERSION
|
||||||
# core: 8.x
|
core: 8.x
|
||||||
|
|
||||||
# Information added by Drupal.org packaging script on 2018-03-07
|
|
||||||
version: '8.5.0'
|
|
||||||
core: '8.x'
|
|
||||||
project: 'drupal'
|
|
||||||
datestamp: 1520457826
|
|
||||||
|
|||||||