Skip to content

Commit 5b146c2

Browse files
committed
Merge branch '7.x' into 7.x-symfony
2 parents 8c61166 + e091df1 commit 5b146c2

File tree

87 files changed

+1504
-245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1504
-245
lines changed

CHANGELOG.txt

+62-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,70 @@
11

2-
Drupal 7.35, xxxx-xx-xx (development version)
2+
Drupal 7.37, xxxx-xx-xx (development version)
33
-----------------------
4+
- Added a description to the "Administer text formats and filters" permission
5+
on the Permissions page (string change).
6+
7+
Drupal 7.36, 2015-04-01
8+
-----------------------
9+
- Added a 'file_public_schema' variable which allows modules that define
10+
publicly-accessible streams in hook_stream_wrappers() to bypass file download
11+
access checks when processing managed file upload fields.
12+
- Fixed a bug that caused database query tags not to be added to search-related
13+
database queries under many circumstances, and which prevented the
14+
corresponding hook_query_TAG_alter() implementations from being called.
15+
- Fixed the "for" attribute on managed file upload field labels to improve
16+
accessibility (minor markup change).
17+
- Added a 'javascript_always_use_jquery' variable which can be set to FALSE by
18+
sites that may not need jQuery loaded on all pages, and a 'requires_jquery'
19+
option to drupal_add_js() which modules can set to FALSE when adding
20+
JavaScript files that have no dependency on jQuery (API addition:
21+
https://www.drupal.org/node/2462717).
22+
- Fixed incorrect foreign keys in the User module's role_permission and
23+
users_roles database tables.
24+
- Changed permission descriptions throughout Drupal core to consistently link
25+
to relevant administrative pages, regardless of whether the user viewing the
26+
Permissions page can view the page being linked to (minor UI change).
27+
- Fixed the drupal_add_region_content() function so that it actually adds
28+
content to the page.
29+
- Added an 'image_suppress_itok_output' variable to allow sites already using
30+
the existing 'image_allow_insecure_derivatives' variable to also prevent
31+
security tokens from appearing in image derivative URLs.
32+
- Fixed double-escaping of theme names in the Block module administrative
33+
interface (minor string change).
34+
- Added basic support for Xdebug when running automated tests.
35+
- Fixed a bug which caused previewing a node to remove elements from the node
36+
being edited. With this fix, calling node_preview() will no longer modify the
37+
passed-in node object (minor API change).
38+
- Added a user_has_role() function to check whether a user has a particular
39+
role (API addition: https://www.drupal.org/node/2462411).
40+
- Fixed installation failures when an opcode cache is enabled.
41+
- Fixed a bug in the Drupal 6 to Drupal 7 upgrade path which caused private
42+
files to be inaccessible.
43+
- Fixed a bug in the Drupal 6 to Drupal 7 upgrade path which caused user
44+
pictures to be lost.
45+
- Fixed missing language code in hook_field_attach_view_alter() when it is
46+
invoked from field_view_field().
47+
- Stopped sending ETag and Last-Modified headers for uncached page requests,
48+
since they break caching for certain Varnish and Nginx configurations.
49+
- Changed the Simpletest module to allow PSR-4 test classes to be used in
50+
Drupal 7.
51+
- Fixed a fatal error that occurred when using the Comment module's "Unpublish
52+
comment containing keyword(s)" action.
53+
- Changed the "lang" attribute on language links to "xml:lang" so it validates
54+
as XHTML (minor markup change).
55+
- Prevented the form API from allowing arrays to be submitted for various form
56+
elements, such as textfields, textareas, and password fields (API change:
57+
https://www.drupal.org/node/2462723).
458
- Fixed a bug in the Contact module which caused the global user object to have
559
the incorrect name and e-mail address during the remainder of the page
660
request after the contact form is submitted.
61+
- Numerous small bug fixes.
62+
- Numerous API documentation improvements.
63+
- Additional automated test coverage.
64+
65+
Drupal 7.35, 2015-03-18
66+
----------------------
67+
- Fixed security issues (multiple vulnerabilities). See SA-CORE-2015-001.
768

869
Drupal 7.34, 2014-11-19
970
----------------------

MAINTAINERS.txt

-7
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ Ajax system
2727
- Earl Miles 'merlinofchaos' http://drupal.org/user/26979
2828

2929
Base system
30-
- Károly Négyesi 'chx' http://drupal.org/user/9446
3130
- Damien Tournoud 'DamZ' http://drupal.org/user/22211
3231
- Moshe Weitzman 'moshe weitzman' http://drupal.org/user/23
3332

@@ -39,7 +38,6 @@ Cache system
3938
- Nathaniel Catchpole 'catch' http://drupal.org/user/35733
4039

4140
Cron system
42-
- Károly Négyesi 'chx' http://drupal.org/user/9446
4341
- Derek Wright 'dww' http://drupal.org/user/46549
4442

4543
Database system
@@ -55,10 +53,8 @@ Database system
5553

5654
- Sqlite driver
5755
- Damien Tournoud 'DamZ' http://drupal.org/user/22211
58-
- Károly Négyesi 'chx' http://drupal.org/user/9446
5956

6057
Database update system
61-
- Károly Négyesi 'chx' http://drupal.org/user/9446
6258
- Ashok Modi 'BTMash' http://drupal.org/user/60422
6359

6460
Entity system
@@ -71,7 +67,6 @@ File system
7167
- Aaron Winborn 'aaron' http://drupal.org/user/33420
7268

7369
Form system
74-
- Károly Négyesi 'chx' http://drupal.org/user/9446
7570
- Alex Bronstein 'effulgentsia' http://drupal.org/user/78040
7671
- Wolfgang Ziegler 'fago' http://drupal.org/user/16747
7772
- Daniel F. Kudwien 'sun' http://drupal.org/user/54136
@@ -105,7 +100,6 @@ Markup
105100

106101
Menu system
107102
- Peter Wolanin 'pwolanin' http://drupal.org/user/49851
108-
- Károly Négyesi 'chx' http://drupal.org/user/9446
109103

110104
Path system
111105
- Dave Reid 'davereid' http://drupal.org/user/53892
@@ -261,7 +255,6 @@ Shortcut module
261255

262256
Simpletest module
263257
- Jimmy Berry 'boombatower' http://drupal.org/user/214218
264-
- Károly Négyesi 'chx' http://drupal.org/user/9446
265258

266259
Statistics module
267260
- Tim Millwood 'timmillwood' http://drupal.org/user/227849

includes/ajax.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
*
212212
* When returning an Ajax command array, it is often useful to have
213213
* status messages rendered along with other tasks in the command array.
214-
* In that case the the Ajax commands array may be constructed like this:
214+
* In that case the Ajax commands array may be constructed like this:
215215
* @code
216216
* $commands = array();
217217
* $commands[] = ajax_command_replace(NULL, $output);

includes/bootstrap.inc

+68-30
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* The current system version.
1010
*/
11-
define('VERSION', '7.35-dev');
11+
define('VERSION', '7.37-dev');
1212

1313
/**
1414
* Core API compatibility.
@@ -529,9 +529,8 @@ function timer_stop($name) {
529529
* Returns the appropriate configuration directory.
530530
*
531531
* Returns the configuration path based on the site's hostname, port, and
532-
* pathname. Uses find_conf_path() to find the current configuration directory.
533-
* See default.settings.php for examples on how the URL is converted to a
534-
* directory.
532+
* pathname. See default.settings.php for examples on how the URL is converted
533+
* to a directory.
535534
*
536535
* @param bool $require_settings
537536
* Only configuration directories with an existing settings.php file
@@ -1223,23 +1222,10 @@ function drupal_send_headers($default_headers = array(), $only_default = FALSE)
12231222
* fresh page on every request. This prevents authenticated users from seeing
12241223
* locally cached pages.
12251224
*
1226-
* Also give each page a unique ETag. This will force clients to include both
1227-
* an If-Modified-Since header and an If-None-Match header when doing
1228-
* conditional requests for the page (required by RFC 2616, section 13.3.4),
1229-
* making the validation more robust. This is a workaround for a bug in Mozilla
1230-
* Firefox that is triggered when Drupal's caching is enabled and the user
1231-
* accesses Drupal via an HTTP proxy (see
1232-
* https://bugzilla.mozilla.org/show_bug.cgi?id=269303): When an authenticated
1233-
* user requests a page, and then logs out and requests the same page again,
1234-
* Firefox may send a conditional request based on the page that was cached
1235-
* locally when the user was logged in. If this page did not have an ETag
1236-
* header, the request only contains an If-Modified-Since header. The date will
1237-
* be recent, because with authenticated users the Last-Modified header always
1238-
* refers to the time of the request. If the user accesses Drupal via a proxy
1239-
* server, and the proxy already has a cached copy of the anonymous page with an
1240-
* older Last-Modified date, the proxy may respond with 304 Not Modified, making
1241-
* the client think that the anonymous and authenticated pageviews are
1242-
* identical.
1225+
* ETag and Last-Modified headers are not set per default for authenticated
1226+
* users so that browsers do not send If-Modified-Since headers from
1227+
* authenticated user pages. drupal_serve_page_from_cache() will set appropriate
1228+
* ETag and Last-Modified headers for cached pages.
12431229
*
12441230
* @see drupal_page_set_cache()
12451231
*/
@@ -1252,9 +1238,7 @@ function drupal_page_header() {
12521238

12531239
$default_headers = array(
12541240
'Expires' => 'Sun, 19 Nov 1978 05:00:00 GMT',
1255-
'Last-Modified' => gmdate(DATE_RFC7231, REQUEST_TIME),
12561241
'Cache-Control' => 'no-cache, must-revalidate, post-check=0, pre-check=0',
1257-
'ETag' => '"' . REQUEST_TIME . '"',
12581242
);
12591243
drupal_send_headers($default_headers);
12601244
}
@@ -1636,14 +1620,14 @@ function request_uri() {
16361620
* information about the passed-in exception is used.
16371621
* @param $variables
16381622
* Array of variables to replace in the message on display. Defaults to the
1639-
* return value of drupal_decode_exception().
1623+
* return value of _drupal_decode_exception().
16401624
* @param $severity
16411625
* The severity of the message, as per RFC 3164.
16421626
* @param $link
16431627
* A link to associate with the message.
16441628
*
16451629
* @see watchdog()
1646-
* @see drupal_decode_exception()
1630+
* @see _drupal_decode_exception()
16471631
*/
16481632
function watchdog_exception($type, Exception $exception, $message = NULL, $variables = array(), $severity = WATCHDOG_ERROR, $link = NULL) {
16491633

@@ -2414,6 +2398,26 @@ function _drupal_bootstrap_variables() {
24142398
// Load bootstrap modules.
24152399
require_once DRUPAL_ROOT . '/includes/module.inc';
24162400
module_load_all(TRUE);
2401+
2402+
// Sanitize the destination parameter (which is often used for redirects) to
2403+
// prevent open redirect attacks leading to other domains. Sanitize both
2404+
// $_GET['destination'] and $_REQUEST['destination'] to protect code that
2405+
// relies on either, but do not sanitize $_POST to avoid interfering with
2406+
// unrelated form submissions. The sanitization happens here because
2407+
// url_is_external() requires the variable system to be available.
2408+
if (isset($_GET['destination']) || isset($_REQUEST['destination'])) {
2409+
require_once DRUPAL_ROOT . '/includes/common.inc';
2410+
// If the destination is an external URL, remove it.
2411+
if (isset($_GET['destination']) && url_is_external($_GET['destination'])) {
2412+
unset($_GET['destination']);
2413+
unset($_REQUEST['destination']);
2414+
}
2415+
// If there's still something in $_REQUEST['destination'] that didn't come
2416+
// from $_GET, check it too.
2417+
if (isset($_REQUEST['destination']) && (!isset($_GET['destination']) || $_REQUEST['destination'] != $_GET['destination']) && url_is_external($_REQUEST['destination'])) {
2418+
unset($_REQUEST['destination']);
2419+
}
2420+
}
24172421
}
24182422

24192423
/**
@@ -2550,7 +2554,7 @@ function drupal_installation_attempted() {
25502554
*
25512555
* This would include implementations of hook_install(), which could run
25522556
* during the Drupal installation phase, and might also be run during
2553-
* non-installation time, such as while installing the module from the the
2557+
* non-installation time, such as while installing the module from the
25542558
* module administration page.
25552559
*
25562560
* Example usage:
@@ -3079,10 +3083,13 @@ function _registry_check_code($type, $name = NULL) {
30793083
// This function may get called when the default database is not active, but
30803084
// there is no reason we'd ever want to not use the default database for
30813085
// this query.
3082-
$file = Database::getConnection('default', 'default')->query("SELECT filename FROM {registry} WHERE name = :name AND type = :type", array(
3083-
':name' => $name,
3084-
':type' => $type,
3085-
))
3086+
$file = Database::getConnection('default', 'default')
3087+
->select('registry', 'r', array('target' => 'default'))
3088+
->fields('r', array('filename'))
3089+
// Use LIKE here to make the query case-insensitive.
3090+
->condition('r.name', db_like($name), 'LIKE')
3091+
->condition('r.type', $type)
3092+
->execute()
30863093
->fetchField();
30873094

30883095
// Flag that we've run a lookup query and need to update the cache.
@@ -3420,3 +3427,34 @@ function drupal_check_memory_limit($required, $memory_limit = NULL) {
34203427
// - The memory limit is greater than the memory required for the operation.
34213428
return ((!$memory_limit) || ($memory_limit == -1) || (parse_size($memory_limit) >= parse_size($required)));
34223429
}
3430+
3431+
/**
3432+
* Invalidates a PHP file from any active opcode caches.
3433+
*
3434+
* If the opcode cache does not support the invalidation of individual files,
3435+
* the entire cache will be flushed.
3436+
*
3437+
* @param string $filepath
3438+
* The absolute path of the PHP file to invalidate.
3439+
*/
3440+
function drupal_clear_opcode_cache($filepath) {
3441+
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300) {
3442+
// Below PHP 5.3, clearstatcache does not accept any function parameters.
3443+
clearstatcache();
3444+
}
3445+
else {
3446+
clearstatcache(TRUE, $filepath);
3447+
}
3448+
3449+
// Zend OPcache.
3450+
if (function_exists('opcache_invalidate')) {
3451+
opcache_invalidate($filepath, TRUE);
3452+
}
3453+
// APC.
3454+
if (function_exists('apc_delete_file')) {
3455+
// apc_delete_file() throws a PHP warning in case the specified file was
3456+
// not compiled yet.
3457+
// @see http://php.net/apc-delete-file
3458+
@apc_delete_file($filepath);
3459+
}
3460+
}

0 commit comments

Comments
 (0)