Projet

Général

Profil

Révision 6b24a280

Ajouté par Assos Assos il y a presque 4 ans

-a

Voir les différences:

drupal7/CHANGELOG.txt
1
Drupal 7.xx, xxxx-xx-xx (development version)
1
Drupal 7.72, 2020-06-17
2 2
-----------------------
3
- Fixed security issues:
4
   - SA-CORE-2020-004
5

  
6
Drupal 7.71, 2020-06-03
7
-----------------------
8
- Fix for jQuery Form bug in Chromium-based browsers
9
- Full support for PHP 7.4
3 10

  
4 11
Drupal 7.70, 2020-05-19
5 12
-----------------------
drupal7/includes/batch.inc
478 478
        $queue->deleteQueue();
479 479
      }
480 480
    }
481
    // Clean-up the session. Not needed for CLI updates.
482
    if (isset($_SESSION)) {
483
      unset($_SESSION['batches'][$batch['id']]);
484
      if (empty($_SESSION['batches'])) {
485
        unset($_SESSION['batches']);
486
      }
487
    }
481 488
  }
482 489
  $_batch = $batch;
483 490
  $batch = NULL;
484 491

  
485
  // Clean-up the session. Not needed for CLI updates.
486
  if (isset($_SESSION)) {
487
    unset($_SESSION['batches'][$batch['id']]);
488
    if (empty($_SESSION['batches'])) {
489
      unset($_SESSION['batches']);
490
    }
491
  }
492

  
493 492
  // Redirect if needed.
494 493
  if ($_batch['progressive']) {
495 494
    // Revert the 'destination' that was saved in batch_process().
drupal7/includes/bootstrap.inc
8 8
/**
9 9
 * The current system version.
10 10
 */
11
define('VERSION', '7.70');
11
define('VERSION', '7.72');
12 12

  
13 13
/**
14 14
 * Core API compatibility.
drupal7/includes/common.inc
391 391
 */
392 392
function drupal_get_feeds($delimiter = "\n") {
393 393
  $feeds = drupal_add_feed();
394
  return implode($feeds, $delimiter);
394
  return implode($delimiter, $feeds);
395 395
}
396 396

  
397 397
/**
......
3743 3743
  }
3744 3744

  
3745 3745
  // Prefix with base and remove '../' segments where possible.
3746
  $path = $_base . $matches[1];
3746
  $path = $_base . (isset($matches[1]) ? $matches[1] : '');
3747 3747
  $last = '';
3748 3748
  while ($path != $last) {
3749 3749
    $last = $path;
......
6656 6656
  $children = array();
6657 6657
  $sortable = FALSE;
6658 6658
  foreach ($elements as $key => $value) {
6659
    if ($key === '' || $key[0] !== '#') {
6659
    if (is_int($key) || $key === '' || $key[0] !== '#') {
6660 6660
      $children[$key] = $value;
6661 6661
      if (is_array($value) && isset($value['#weight'])) {
6662 6662
        $sortable = TRUE;
drupal7/includes/filetransfer/filetransfer.inc
301 301
    $parts = explode('/', $path);
302 302
    $chroot = '';
303 303
    while (count($parts)) {
304
      $check = implode($parts, '/');
304
      $check = implode('/', $parts);
305 305
      if ($this->isFile($check . '/' . drupal_basename(__FILE__))) {
306 306
        // Remove the trailing slash.
307 307
        return substr($chroot, 0, -1);
drupal7/includes/form.inc
1135 1135
 * Helper function to call form_set_error() if there is a token error.
1136 1136
 */
1137 1137
function _drupal_invalid_token_set_form_error() {
1138
  $path = current_path();
1139
  $query = drupal_get_query_parameters();
1140
  $url = url($path, array('query' => $query));
1141

  
1142 1138
  // Setting this error will cause the form to fail validation.
1143
  form_set_error('form_token', t('The form has become outdated. Copy any unsaved work in the form below and then <a href="@link">reload this page</a>.', array('@link' => $url)));
1139
  form_set_error('form_token', t('The form has become outdated. Press the back button, copy any unsaved work in the form, and then reload the page.'));
1144 1140
}
1145 1141

  
1146 1142
/**
......
1181 1177
  if (!empty($form['#token'])) {
1182 1178
    if (!drupal_valid_token($form_state['values']['form_token'], $form['#token']) || !empty($form_state['invalid_token'])) {
1183 1179
      _drupal_invalid_token_set_form_error();
1180
      // Ignore all submitted values.
1181
      $form_state['input'] = array();
1182
      $_POST = array();
1183
      // Make sure file uploads do not get processed.
1184
      $_FILES = array();
1184 1185
      // Stop here and don't run any further validation handlers, because they
1185 1186
      // could invoke non-safe operations which opens the door for CSRF
1186 1187
      // vulnerabilities.
......
1848 1849
          _drupal_invalid_token_set_form_error();
1849 1850
          // This value is checked in _form_builder_handle_input_element().
1850 1851
          $form_state['invalid_token'] = TRUE;
1852
          // Ignore all submitted values.
1853
          $form_state['input'] = array();
1854
          $_POST = array();
1851 1855
          // Make sure file uploads do not get processed.
1852 1856
          $_FILES = array();
1853 1857
        }
drupal7/includes/menu.inc
2483 2483
    // untranslated paths). Afterwards, the most relevant path is picked from
2484 2484
    // the menus, ordered by menu preference.
2485 2485
    $item = menu_get_item($path);
2486
    if ($item === FALSE) {
2487
      return FALSE;
2488
    }
2486 2489
    $path_candidates = array();
2487 2490
    // 1. The current item href.
2488 2491
    $path_candidates[$item['href']] = $item['href'];
drupal7/includes/pager.inc
324 324
  $quantity = empty($variables['quantity']) ? 0 : $variables['quantity'];
325 325
  global $pager_page_array, $pager_total;
326 326

  
327
  // Nothing to do if there is no pager.
328
  if (!isset($pager_page_array[$element]) || !isset($pager_total[$element])) {
329
    return;
330
  }
331

  
332
  // Nothing to do if there is only one page.
333
  if ($pager_total[$element] <= 1) {
334
    return;
335
  }
336

  
327 337
  // Calculate various markers within this pager piece:
328 338
  // Middle is used to "center" pages around the current page.
329 339
  $pager_middle = ceil($quantity / 2);
......
455 465
  global $pager_page_array;
456 466
  $output = '';
457 467

  
468
  // Nothing to do if there is no pager.
469
  if (!isset($pager_page_array[$element])) {
470
    return;
471
  }
472

  
458 473
  // If we are anywhere but the first page
459 474
  if ($pager_page_array[$element] > 0) {
460 475
    $output = theme('pager_link', array('text' => $text, 'page_new' => pager_load_array(0, $element, $pager_page_array), 'element' => $element, 'parameters' => $parameters));
......
485 500
  global $pager_page_array;
486 501
  $output = '';
487 502

  
503
  // Nothing to do if there is no pager.
504
  if (!isset($pager_page_array[$element])) {
505
    return;
506
  }
507

  
488 508
  // If we are anywhere but the first page
489 509
  if ($pager_page_array[$element] > 0) {
490 510
    $page_new = pager_load_array($pager_page_array[$element] - $interval, $element, $pager_page_array);
......
524 544
  global $pager_page_array, $pager_total;
525 545
  $output = '';
526 546

  
547
  // Nothing to do if there is no pager.
548
  if (!isset($pager_page_array[$element]) || !isset($pager_total[$element])) {
549
    return;
550
  }
551

  
527 552
  // If we are anywhere but the last page
528 553
  if ($pager_page_array[$element] < ($pager_total[$element] - 1)) {
529 554
    $page_new = pager_load_array($pager_page_array[$element] + $interval, $element, $pager_page_array);
......
560 585
  global $pager_page_array, $pager_total;
561 586
  $output = '';
562 587

  
588
  // Nothing to do if there is no pager.
589
  if (!isset($pager_page_array[$element]) || !isset($pager_total[$element])) {
590
    return;
591
  }
592

  
563 593
  // If we are anywhere but the last page
564 594
  if ($pager_page_array[$element] < ($pager_total[$element] - 1)) {
565 595
    $output = theme('pager_link', array('text' => $text, 'page_new' => pager_load_array($pager_total[$element] - 1, $element, $pager_page_array), 'element' => $element, 'parameters' => $parameters));
drupal7/includes/path.inc
466 466
    $criteria = array('pid' => $criteria);
467 467
  }
468 468
  $path = path_load($criteria);
469
  $query = db_delete('url_alias');
470
  foreach ($criteria as $field => $value) {
471
    $query->condition($field, $value);
469
  if (isset($path['source'])) {
470
    $query = db_delete('url_alias');
471
    foreach ($criteria as $field => $value) {
472
      $query->condition($field, $value);
473
    }
474
    $query->execute();
475
    module_invoke_all('path_delete', $path);
476
    drupal_clear_path_cache($path['source']);
472 477
  }
473
  $query->execute();
474
  module_invoke_all('path_delete', $path);
475
  drupal_clear_path_cache($path['source']);
476 478
}
477 479

  
478 480
/**
drupal7/includes/request-sanitizer.inc
99 99
  protected static function stripDangerousValues($input, array $whitelist, array &$sanitized_keys) {
100 100
    if (is_array($input)) {
101 101
      foreach ($input as $key => $value) {
102
        if ($key !== '' && $key[0] === '#' && !in_array($key, $whitelist, TRUE)) {
102
        if ($key !== '' && is_string($key) && $key[0] === '#' && !in_array($key, $whitelist, TRUE)) {
103 103
          unset($input[$key]);
104 104
          $sanitized_keys[] = $key;
105 105
        }
drupal7/misc/ajax.js
198 198
    type: 'POST'
199 199
  };
200 200

  
201
  // For multipart forms (e.g., file uploads), jQuery Form targets the form
202
  // submission to an iframe instead of using an XHR object. The initial "src"
203
  // of the iframe, prior to the form submission, is set to options.iframeSrc.
204
  // "about:blank" is the semantically correct, standards-compliant, way to
205
  // initialize a blank iframe; however, some old IE versions (possibly only 6)
206
  // incorrectly report a mixed content warning when iframes with an
207
  // "about:blank" src are added to a parent document with an https:// origin.
208
  // jQuery Form works around this by defaulting to "javascript:false" instead,
209
  // but that breaks on Chrome 83, so here we force the semantically correct
210
  // behavior for all browsers except old IE.
211
  // @see https://www.drupal.org/project/drupal/issues/3143016
212
  // @see https://github.com/jquery-form/form/blob/df9cb101b9c9c085c8d75ad980c7ff1cf62063a1/jquery.form.js#L68
213
  // @see https://bugs.chromium.org/p/chromium/issues/detail?id=1084874
214
  // @see https://html.spec.whatwg.org/multipage/browsers.html#creating-browsing-contexts
215
  // @see https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy
216
  if (navigator.userAgent.indexOf("MSIE") === -1) {
217
    ajax.options.iframeSrc = 'about:blank';
218
  }
219

  
201 220
  // Bind the ajaxSubmit function to the element event.
202 221
  $(ajax.element).bind(element_settings.event, function (event) {
203 222
    if (!Drupal.settings.urlIsAjaxTrusted[ajax.url] && !Drupal.urlIsLocal(ajax.url)) {
drupal7/misc/typo3/phar-stream-wrapper/README.md
1 1
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/TYPO3/phar-stream-wrapper/badges/quality-score.png?b=v2)](https://scrutinizer-ci.com/g/TYPO3/phar-stream-wrapper/?branch=v2)
2 2
[![Travis CI Build Status](https://travis-ci.org/TYPO3/phar-stream-wrapper.svg?branch=v2)](https://travis-ci.org/TYPO3/phar-stream-wrapper)
3
[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/q4ls5tg4w1d6sf4i/branch/v2?svg=true)](https://ci.appveyor.com/project/ohader/phar-stream-wrapper)
3 4

  
4 5
# PHP Phar Stream Wrapper
5 6

  
......
21 22
`PharStreamWrapper` in TYPO3 versions 7.6.30 LTS, 8.7.17 LTS and 9.3.1 on 12th
22 23
July 2018.
23 24

  
24
* https://typo3.org/security/advisory/typo3-core-sa-2018-002/
25 25
* https://blog.secarma.co.uk/labs/near-phar-dangerous-unserialization-wherever-you-are
26 26
* https://youtu.be/GePBmsNJw6Y
27
* https://typo3.org/security/advisory/typo3-psa-2018-001/
28
* https://typo3.org/security/advisory/typo3-psa-2019-007/
29
* https://typo3.org/security/advisory/typo3-psa-2019-008/
27 30

  
28 31
## License
29 32

  
drupal7/misc/typo3/phar-stream-wrapper/composer.json
7 7
    "keywords": ["php", "phar", "stream-wrapper", "security"],
8 8
    "require": {
9 9
        "php": "^5.3.3|^7.0",
10
        "ext-fileinfo": "*",
11 10
        "ext-json": "*",
12 11
        "brumann/polyfill-unserialize": "^1.0"
13 12
    },
......
15 14
        "ext-xdebug": "*",
16 15
        "phpunit/phpunit": "^4.8.36"
17 16
    },
17
    "suggest": {
18
        "ext-fileinfo": "For PHP builtin file type guessing, otherwise uses internal processing"
19
    },
18 20
    "autoload": {
19 21
        "psr-4": {
20 22
            "TYPO3\\PharStreamWrapper\\": "src/"
drupal7/misc/typo3/phar-stream-wrapper/src/Helper.php
52 52

  
53 53
        while (count($parts)) {
54 54
            $currentPath = implode('/', $parts);
55
            if (@is_file($currentPath)) {
55
            if (@is_file($currentPath) && realpath($currentPath) !== false) {
56 56
                return $currentPath;
57 57
            }
58 58
            array_pop($parts);
......
106 106
     * @param string $path File path to process
107 107
     * @return string
108 108
     */
109
    private static function normalizeWindowsPath($path)
109
    public static function normalizeWindowsPath($path)
110 110
    {
111 111
        return str_replace('\\', '/', $path);
112 112
    }
drupal7/misc/typo3/phar-stream-wrapper/src/Phar/Reader.php
19 19
    private $fileName;
20 20

  
21 21
    /**
22
     * Mime-type in order to use zlib, bzip2 or no compression.
23
     * In case ext-fileinfo is not present only the relevant types
24
     * 'application/x-gzip' and 'application/x-bzip2' are assigned
25
     * to this class property.
26
     *
22 27
     * @var string
23 28
     */
24 29
    private $fileType;
......
139 144
     */
140 145
    private function resolveStream()
141 146
    {
142
        if ($this->fileType === 'application/x-gzip') {
147
        if ($this->fileType === 'application/x-gzip' || $this->fileType === 'application/gzip') {
143 148
            return 'compress.zlib://';
144 149
        } elseif ($this->fileType === 'application/x-bzip2') {
145 150
            return 'compress.bzip2://';
......
152 157
     */
153 158
    private function determineFileType()
154 159
    {
155
        $fileInfo = new \finfo();
156
        return $fileInfo->file($this->fileName, FILEINFO_MIME_TYPE);
160
        if (class_exists('\\finfo')) {
161
            $fileInfo = new \finfo();
162
            return $fileInfo->file($this->fileName, FILEINFO_MIME_TYPE);
163
        }
164
        return $this->determineFileTypeByHeader();
165
    }
166

  
167
    /**
168
     * In case ext-fileinfo is not present only the relevant types
169
     * 'application/x-gzip' and 'application/x-bzip2' are resolved.
170
     *
171
     * @return string
172
     */
173
    private function determineFileTypeByHeader()
174
    {
175
        $resource = fopen($this->fileName, 'r');
176
        if (!is_resource($resource)) {
177
            throw new ReaderException(
178
                sprintf('Resource %s could not be opened', $this->fileName),
179
                1557753055
180
            );
181
        }
182
        $header = fgets($resource, 4);
183
        fclose($resource);
184
        $mimeType = '';
185
        if (strpos($header, "\x42\x5a\x68") === 0) {
186
            $mimeType = 'application/x-bzip2';
187
        } elseif (strpos($header, "\x1f\x8b") === 0) {
188
            $mimeType = 'application/x-gzip';
189
        }
190
        return $mimeType;
157 191
    }
158 192

  
159 193
    /**
drupal7/misc/typo3/phar-stream-wrapper/src/PharStreamWrapper.php
476 476
    {
477 477
        $arguments = func_get_args();
478 478
        array_shift($arguments);
479
        $silentExecution = $functionName{0} === '@';
479
        $silentExecution = $functionName[0] === '@';
480 480
        $functionName = ltrim($functionName, '@');
481 481
        $this->restoreInternalSteamWrapper();
482 482

  
drupal7/misc/typo3/phar-stream-wrapper/src/Resolver/PharInvocationResolver.php
14 14
use TYPO3\PharStreamWrapper\Helper;
15 15
use TYPO3\PharStreamWrapper\Manager;
16 16
use TYPO3\PharStreamWrapper\Phar\Reader;
17
use TYPO3\PharStreamWrapper\Phar\ReaderException;
17 18
use TYPO3\PharStreamWrapper\Resolvable;
18 19

  
19 20
class PharInvocationResolver implements Resolvable
......
59 60
    {
60 61
        $hasPharPrefix = Helper::hasPharPrefix($path);
61 62
        if ($flags === null) {
62
            $flags = static::RESOLVE_REALPATH | static::RESOLVE_ALIAS | static::ASSERT_INTERNAL_INVOCATION;
63
            $flags = static::RESOLVE_REALPATH | static::RESOLVE_ALIAS;
63 64
        }
64 65

  
65 66
        if ($hasPharPrefix && $flags & static::RESOLVE_ALIAS) {
......
147 148
            }
148 149
            // ensure the possible alias name (how we have been called initially) matches
149 150
            // the resolved alias name that was retrieved by the current possible base name
150
            $reader = new Reader($currentBaseName);
151
            $currentAlias = $reader->resolveContainer()->getAlias();
152
            if ($currentAlias !== $possibleAlias) {
151
            try {
152
                $reader = new Reader($currentBaseName);
153
                $currentAlias = $reader->resolveContainer()->getAlias();
154
            } catch (ReaderException $exception) {
155
                // most probably that was not a Phar file
156
                continue;
157
            }
158
            if (empty($currentAlias) || $currentAlias !== $possibleAlias) {
153 159
                continue;
154 160
            }
155 161
            $this->addBaseName($currentBaseName);
......
215 221
        if (isset($this->baseNames[$baseName])) {
216 222
            return;
217 223
        }
218
        $this->baseNames[$baseName] = realpath($baseName);
224
        $this->baseNames[$baseName] = Helper::normalizeWindowsPath(
225
            realpath($baseName)
226
        );
219 227
    }
220 228

  
221 229
    /**
drupal7/modules/aggregator/aggregator.info
7 7
configure = admin/config/services/aggregator/settings
8 8
stylesheets[all][] = aggregator.css
9 9

  
10
; Information added by Drupal.org packaging script on 2020-05-20
11
version = "7.70"
10
; Information added by Drupal.org packaging script on 2020-06-17
11
version = "7.72"
12 12
project = "drupal"
13
datestamp = "1589989726"
13
datestamp = "1592419104"
drupal7/modules/aggregator/tests/aggregator_test.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/block/block.info
6 6
files[] = block.test
7 7
configure = admin/structure/block
8 8

  
9
; Information added by Drupal.org packaging script on 2020-05-20
10
version = "7.70"
9
; Information added by Drupal.org packaging script on 2020-06-17
10
version = "7.72"
11 11
project = "drupal"
12
datestamp = "1589989726"
12
datestamp = "1592419104"
drupal7/modules/block/block.module
263 263
  $all_regions = system_region_list($theme);
264 264

  
265 265
  $item = menu_get_item();
266
  if ($item['path'] != 'admin/structure/block/demo/' . $theme) {
266
  if ($item === FALSE || $item['path'] != 'admin/structure/block/demo/' . $theme) {
267 267
    // Load all region content assigned via blocks.
268 268
    foreach (array_keys($all_regions) as $region) {
269 269
      // Assign blocks to region.
......
283 283
  }
284 284
  else {
285 285
    // Append region description if we are rendering the regions demo page.
286
    $item = menu_get_item();
287 286
    if ($item['path'] == 'admin/structure/block/demo/' . $theme) {
288 287
      foreach (system_region_list($theme, REGIONS_VISIBLE, FALSE) as $region) {
289 288
        $description = '<div class="block-region">' . $all_regions[$region] . '</div>';
drupal7/modules/block/tests/block_test.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/block/tests/themes/block_test_theme/block_test_theme.info
13 13
regions[highlighted] = Highlighted
14 14
regions[help] = Help
15 15

  
16
; Information added by Drupal.org packaging script on 2020-05-20
17
version = "7.70"
16
; Information added by Drupal.org packaging script on 2020-06-17
17
version = "7.72"
18 18
project = "drupal"
19
datestamp = "1589989726"
19
datestamp = "1592419104"
drupal7/modules/blog/blog.info
5 5
core = 7.x
6 6
files[] = blog.test
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/book/book.info
7 7
configure = admin/content/book/settings
8 8
stylesheets[all][] = book.css
9 9

  
10
; Information added by Drupal.org packaging script on 2020-05-20
11
version = "7.70"
10
; Information added by Drupal.org packaging script on 2020-06-17
11
version = "7.72"
12 12
project = "drupal"
13
datestamp = "1589989726"
13
datestamp = "1592419104"
drupal7/modules/color/color.info
5 5
core = 7.x
6 6
files[] = color.test
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/color/color.module
734 734
 * Converts a hex color into an RGB triplet.
735 735
 */
736 736
function _color_unpack($hex, $normalize = FALSE) {
737
  if (strlen($hex) == 4) {
738
    $hex = $hex[1] . $hex[1] . $hex[2] . $hex[2] . $hex[3] . $hex[3];
737
  $hex = substr($hex, 1);
738
  if (strlen($hex) == 3) {
739
    $hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2];
739 740
  }
740 741
  $c = hexdec($hex);
741 742
  for ($i = 16; $i >= 0; $i -= 8) {
drupal7/modules/comment/comment.info
9 9
configure = admin/content/comment
10 10
stylesheets[all][] = comment.css
11 11

  
12
; Information added by Drupal.org packaging script on 2020-05-20
13
version = "7.70"
12
; Information added by Drupal.org packaging script on 2020-06-17
13
version = "7.72"
14 14
project = "drupal"
15
datestamp = "1589989726"
15
datestamp = "1592419104"
drupal7/modules/comment/comment.install
9 9
 * Implements hook_uninstall().
10 10
 */
11 11
function comment_uninstall() {
12
  // Delete comment_body field.
13
  field_delete_field('comment_body');
14

  
15 12
  // Remove variables.
16 13
  variable_del('comment_block_count');
17 14
  $node_types = array_keys(node_type_get_types());
drupal7/modules/comment/comment.test
6 6
 */
7 7

  
8 8
class CommentHelperCase extends DrupalWebTestCase {
9
  protected $super_user;
9 10
  protected $admin_user;
10 11
  protected $web_user;
11 12
  protected $node;
......
19 20
    parent::setUp($modules);
20 21

  
21 22
    // Create users and test node.
23
    $this->super_user = $this->drupalCreateUser(array('access administration pages', 'administer modules'));
22 24
    $this->admin_user = $this->drupalCreateUser(array('administer content types', 'administer comments', 'administer blocks', 'administer actions', 'administer fields'));
23 25
    $this->web_user = $this->drupalCreateUser(array('access comments', 'post comments', 'create article content', 'edit own comments'));
24 26
    $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'uid' => $this->web_user->uid));
......
2264 2266
    $this->assertFalse(comment_load($comment->id), 'The comment could not be loaded after the node was deleted.');
2265 2267
  }
2266 2268
}
2269

  
2270
/**
2271
 * Tests uninstalling the comment module.
2272
 */
2273
class CommentUninstallTestCase extends CommentHelperCase {
2274

  
2275
  public static function getInfo() {
2276
    return array(
2277
      'name' => 'Comment module uninstallation',
2278
      'description' => 'Tests that the comments module can be properly uninstalled.',
2279
      'group' => 'Comment',
2280
    );
2281
  }
2282

  
2283
  function testCommentUninstall() {
2284
    $this->drupalLogin($this->super_user);
2285

  
2286
    // Disable comment module.
2287
    $edit['modules[Core][comment][enable]'] = FALSE;
2288
    $this->drupalPost('admin/modules', $edit, t('Save configuration'));
2289
    $this->assertText(t('The configuration options have been saved.'), 'Comment module was disabled.');
2290

  
2291
    // Uninstall comment module.
2292
    $edit = array('uninstall[comment]' => 'comment');
2293
    $this->drupalPost('admin/modules/uninstall', $edit, t('Uninstall'));
2294
    $this->drupalPost(NULL, NULL, t('Uninstall'));
2295
    $this->assertText(t('The selected modules have been uninstalled.'), 'Comment module was uninstalled.');
2296

  
2297
    // Run cron and clear field cache so that comment fields and instances
2298
    // marked for deletion are actually removed.
2299
    $this->cronRun();
2300
    field_cache_clear();
2301

  
2302
    // Verify that comment fields have been removed.
2303
    $all_fields = array_keys(field_info_field_map());
2304
    $this->assertFalse(in_array('comment_body', $all_fields), 'Comment fields were removed by uninstall.');
2305

  
2306
    // Verify that comment field instances have been removed (or at least marked
2307
    // for deletion).
2308
    // N.B. field_read_instances does an INNER JOIN on field_config so if the
2309
    // comment_body row has been removed successfully from there no instances
2310
    // will be returned, but that does not guarantee that no rows are left over
2311
    // in the field_config_instance table.
2312
    $count = db_select('field_config_instance', 'fci')
2313
      ->condition('entity_type', 'comment')
2314
      ->condition('field_name', 'comment_body')
2315
      ->condition('deleted', 0)
2316
      ->countQuery()
2317
      ->execute()
2318
      ->fetchField();
2319
    $this->assertTrue($count == 0, 'Comment field instances were removed by uninstall.');
2320
  }
2321
}
drupal7/modules/contact/contact.info
6 6
files[] = contact.test
7 7
configure = admin/structure/contact
8 8

  
9
; Information added by Drupal.org packaging script on 2020-05-20
10
version = "7.70"
9
; Information added by Drupal.org packaging script on 2020-06-17
10
version = "7.72"
11 11
project = "drupal"
12
datestamp = "1589989726"
12
datestamp = "1592419104"
drupal7/modules/contextual/contextual.info
5 5
core = 7.x
6 6
files[] = contextual.test
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/dashboard/dashboard.info
7 7
dependencies[] = block
8 8
configure = admin/dashboard/customize
9 9

  
10
; Information added by Drupal.org packaging script on 2020-05-20
11
version = "7.70"
10
; Information added by Drupal.org packaging script on 2020-06-17
11
version = "7.72"
12 12
project = "drupal"
13
datestamp = "1589989726"
13
datestamp = "1592419104"
drupal7/modules/dblog/dblog.info
5 5
core = 7.x
6 6
files[] = dblog.test
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/field/field.info
11 11
required = TRUE
12 12
stylesheets[all][] = theme/field.css
13 13

  
14
; Information added by Drupal.org packaging script on 2020-05-20
15
version = "7.70"
14
; Information added by Drupal.org packaging script on 2020-06-17
15
version = "7.72"
16 16
project = "drupal"
17
datestamp = "1589989726"
17
datestamp = "1592419104"
drupal7/modules/field/modules/field_sql_storage/field_sql_storage.info
7 7
files[] = field_sql_storage.test
8 8
required = TRUE
9 9

  
10
; Information added by Drupal.org packaging script on 2020-05-20
11
version = "7.70"
10
; Information added by Drupal.org packaging script on 2020-06-17
11
version = "7.72"
12 12
project = "drupal"
13
datestamp = "1589989726"
13
datestamp = "1592419104"
drupal7/modules/field/modules/list/list.info
7 7
dependencies[] = options
8 8
files[] = tests/list.test
9 9

  
10
; Information added by Drupal.org packaging script on 2020-05-20
11
version = "7.70"
10
; Information added by Drupal.org packaging script on 2020-06-17
11
version = "7.72"
12 12
project = "drupal"
13
datestamp = "1589989726"
13
datestamp = "1592419104"
drupal7/modules/field/modules/list/tests/list_test.info
5 5
version = VERSION
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/field/modules/number/number.info
6 6
dependencies[] = field
7 7
files[] = number.test
8 8

  
9
; Information added by Drupal.org packaging script on 2020-05-20
10
version = "7.70"
9
; Information added by Drupal.org packaging script on 2020-06-17
10
version = "7.72"
11 11
project = "drupal"
12
datestamp = "1589989726"
12
datestamp = "1592419104"
drupal7/modules/field/modules/number/number.test
174 174
      ),
175 175
      'display' => array(
176 176
        'default' => array(
177
          'type' => 'number_float',
177
          'type' => 'number_decimal',
178 178
        ),
179 179
      ),
180 180
    );
drupal7/modules/field/modules/options/options.info
6 6
dependencies[] = field
7 7
files[] = options.test
8 8

  
9
; Information added by Drupal.org packaging script on 2020-05-20
10
version = "7.70"
9
; Information added by Drupal.org packaging script on 2020-06-17
10
version = "7.72"
11 11
project = "drupal"
12
datestamp = "1589989726"
12
datestamp = "1592419104"
drupal7/modules/field/modules/text/text.info
7 7
files[] = text.test
8 8
required = TRUE
9 9

  
10
; Information added by Drupal.org packaging script on 2020-05-20
11
version = "7.70"
10
; Information added by Drupal.org packaging script on 2020-06-17
11
version = "7.72"
12 12
project = "drupal"
13
datestamp = "1589989726"
13
datestamp = "1592419104"
drupal7/modules/field/tests/field_test.info
6 6
version = VERSION
7 7
hidden = TRUE
8 8

  
9
; Information added by Drupal.org packaging script on 2020-05-20
10
version = "7.70"
9
; Information added by Drupal.org packaging script on 2020-06-17
10
version = "7.72"
11 11
project = "drupal"
12
datestamp = "1589989726"
12
datestamp = "1592419104"
drupal7/modules/field/tests/field_test.storage.inc
455 455
function field_test_field_attach_delete_bundle($entity_type, $bundle, $instances) {
456 456
  $data = _field_test_storage_data();
457 457

  
458
  foreach ($instances as $field_name => $instance) {
459
    $field = field_info_field($field_name);
458
  foreach ($instances as $instance) {
459
    $field = field_info_field_by_id($instance['field_id']);
460 460
    if ($field['storage']['type'] == 'field_test_storage') {
461 461
      $field_data = &$data[$field['id']];
462 462
      foreach (array('current', 'revisions') as $sub_table) {
463 463
        foreach ($field_data[$sub_table] as &$row) {
464
          if ($row->bundle == $bundle_old) {
464
          if ($row->bundle == $bundle) {
465 465
            $row->deleted = TRUE;
466 466
          }
467 467
        }
drupal7/modules/field_ui/field_ui.admin.inc
1026 1026

  
1027 1027
    $instance['display'][$view_mode]['type'] = $formatter_type;
1028 1028
    $formatter = field_info_formatter_types($formatter_type);
1029
    // For hidden fields, $formatter will be NULL, but we expect an array later.
1030
    // To maintain BC, but avoid PHP 7.4 Notices, ensure $formatter is an array
1031
    // with a 'module' element.
1032
    $formatter['module'] = isset($formatter['module']) ? $formatter['module'] : '';
1029 1033
    $instance['display'][$view_mode]['module'] = $formatter['module'];
1030 1034
    $instance['display'][$view_mode]['settings'] = $settings;
1031 1035

  
drupal7/modules/field_ui/field_ui.info
6 6
dependencies[] = field
7 7
files[] = field_ui.test
8 8

  
9
; Information added by Drupal.org packaging script on 2020-05-20
10
version = "7.70"
9
; Information added by Drupal.org packaging script on 2020-06-17
10
version = "7.72"
11 11
project = "drupal"
12
datestamp = "1589989726"
12
datestamp = "1592419104"
drupal7/modules/field_ui/field_ui.module
265 265
 * Menu access callback for the 'view mode display settings' pages.
266 266
 */
267 267
function _field_ui_view_mode_menu_access($entity_type, $bundle, $view_mode, $access_callback) {
268
  // It's good practice to call func_get_args() at the beginning of a function
269
  // to avoid problems with function parameters being modified later. The
270
  // behavior of func_get_args() changed in PHP7.
271
  // @see https://www.php.net/manual/en/migration70.incompatible.php#migration70.incompatible.other.func-parameter-modified
272
  $all_args = func_get_args();
273

  
268 274
  // First, determine visibility according to the 'use custom display'
269 275
  // setting for the view mode.
270 276
  $bundle = field_extract_bundle($entity_type, $bundle);
......
275 281
  // part of _menu_check_access().
276 282
  if ($visibility) {
277 283
    // Grab the variable 'access arguments' part.
278
    $all_args = func_get_args();
279 284
    $args = array_slice($all_args, 4);
280 285
    $callback = empty($access_callback) ? 0 : trim($access_callback);
281 286
    if (is_numeric($callback)) {
drupal7/modules/file/file.info
6 6
dependencies[] = field
7 7
files[] = tests/file.test
8 8

  
9
; Information added by Drupal.org packaging script on 2020-05-20
10
version = "7.70"
9
; Information added by Drupal.org packaging script on 2020-06-17
10
version = "7.72"
11 11
project = "drupal"
12
datestamp = "1589989726"
12
datestamp = "1592419104"
drupal7/modules/file/tests/file.test
409 409
          'form_token' => 'invalid token',
410 410
        );
411 411
        $this->drupalPost($path, $edit, t('Save'));
412
        $this->assertText('The form has become outdated. Copy any unsaved work in the form below');
412
        $this->assertText('The form has become outdated.');
413 413
        $last_fid = $this->getLastFileId();
414 414
        $this->assertEqual($last_fid_prior, $last_fid, 'File was not saved when uploaded with an invalid form token.');
415 415

  
drupal7/modules/file/tests/file_module_test.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/filter/filter.api.php
202 202
 */
203 203
function callback_filter_prepare($text, $filter, $format, $langcode, $cache, $cache_id) {
204 204
  // Escape <code> and </code> tags.
205
  $text = preg_replace('|<code>(.+?)</code>|se', "[codefilter_code]$1[/codefilter_code]", $text);
205
  $text = preg_replace('|<code>(.+?)</code>|s', "[codefilter_code]$1[/codefilter_code]", $text);
206 206
  return $text;
207 207
}
208 208

  
......
234 234
 * @ingroup callbacks
235 235
 */
236 236
function callback_filter_process($text, $filter, $format, $langcode, $cache, $cache_id) {
237
  $text = preg_replace('|\[codefilter_code\](.+?)\[/codefilter_code\]|se', "<pre>$1</pre>", $text);
237
  $text = preg_replace('|\[codefilter_code\](.+?)\[/codefilter_code\]|s', "<pre>$1</pre>", $text);
238 238

  
239 239
  return $text;
240 240
}
drupal7/modules/filter/filter.info
7 7
required = TRUE
8 8
configure = admin/config/content/formats
9 9

  
10
; Information added by Drupal.org packaging script on 2020-05-20
11
version = "7.70"
10
; Information added by Drupal.org packaging script on 2020-06-17
11
version = "7.72"
12 12
project = "drupal"
13
datestamp = "1589989726"
13
datestamp = "1592419104"
drupal7/modules/forum/forum.info
9 9
configure = admin/structure/forum
10 10
stylesheets[all][] = forum.css
11 11

  
12
; Information added by Drupal.org packaging script on 2020-05-20
13
version = "7.70"
12
; Information added by Drupal.org packaging script on 2020-06-17
13
version = "7.72"
14 14
project = "drupal"
15
datestamp = "1589989726"
15
datestamp = "1592419104"
drupal7/modules/forum/forum.module
922 922
  );
923 923

  
924 924
  $order = _forum_get_topic_order($sortby);
925
  for ($i = 0; $i < count($forum_topic_list_header); $i++) {
925
  // Skip element with index 0 which is NULL.
926
  for ($i = 1; $i < count($forum_topic_list_header); $i++) {
926 927
    if ($forum_topic_list_header[$i]['field'] == $order['field']) {
927 928
      $forum_topic_list_header[$i]['sort'] = $order['sort'];
928 929
    }
drupal7/modules/help/help.info
5 5
core = 7.x
6 6
files[] = help.test
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/image/image.info
7 7
files[] = image.test
8 8
configure = admin/config/media/image-styles
9 9

  
10
; Information added by Drupal.org packaging script on 2020-05-20
11
version = "7.70"
10
; Information added by Drupal.org packaging script on 2020-06-17
11
version = "7.72"
12 12
project = "drupal"
13
datestamp = "1589989726"
13
datestamp = "1592419104"
drupal7/modules/image/tests/image_module_test.info
6 6
files[] = image_module_test.module
7 7
hidden = TRUE
8 8

  
9
; Information added by Drupal.org packaging script on 2020-05-20
10
version = "7.70"
9
; Information added by Drupal.org packaging script on 2020-06-17
10
version = "7.72"
11 11
project = "drupal"
12
datestamp = "1589989726"
12
datestamp = "1592419104"
drupal7/modules/locale/locale.info
6 6
files[] = locale.test
7 7
configure = admin/config/regional/language
8 8

  
9
; Information added by Drupal.org packaging script on 2020-05-20
10
version = "7.70"
9
; Information added by Drupal.org packaging script on 2020-06-17
10
version = "7.72"
11 11
project = "drupal"
12
datestamp = "1589989726"
12
datestamp = "1592419104"
drupal7/modules/locale/tests/locale_test.info
5 5
version = VERSION
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/menu/menu.info
6 6
files[] = menu.test
7 7
configure = admin/structure/menu
8 8

  
9
; Information added by Drupal.org packaging script on 2020-05-20
10
version = "7.70"
9
; Information added by Drupal.org packaging script on 2020-06-17
10
version = "7.72"
11 11
project = "drupal"
12
datestamp = "1589989726"
12
datestamp = "1592419104"
drupal7/modules/node/node.info
9 9
configure = admin/structure/types
10 10
stylesheets[all][] = node.css
11 11

  
12
; Information added by Drupal.org packaging script on 2020-05-20
13
version = "7.70"
12
; Information added by Drupal.org packaging script on 2020-06-17
13
version = "7.72"
14 14
project = "drupal"
15
datestamp = "1589989726"
15
datestamp = "1592419104"
drupal7/modules/node/tests/node_access_test.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/node/tests/node_test.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/node/tests/node_test_exception.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/openid/openid.info
5 5
core = 7.x
6 6
files[] = openid.test
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/openid/tests/openid_test.info
6 6
dependencies[] = openid
7 7
hidden = TRUE
8 8

  
9
; Information added by Drupal.org packaging script on 2020-05-20
10
version = "7.70"
9
; Information added by Drupal.org packaging script on 2020-06-17
10
version = "7.72"
11 11
project = "drupal"
12
datestamp = "1589989726"
12
datestamp = "1592419104"
drupal7/modules/overlay/overlay.info
4 4
version = VERSION
5 5
core = 7.x
6 6

  
7
; Information added by Drupal.org packaging script on 2020-05-20
8
version = "7.70"
7
; Information added by Drupal.org packaging script on 2020-06-17
8
version = "7.72"
9 9
project = "drupal"
10
datestamp = "1589989726"
10
datestamp = "1592419104"
drupal7/modules/path/path.info
6 6
files[] = path.test
7 7
configure = admin/config/search/path
8 8

  
9
; Information added by Drupal.org packaging script on 2020-05-20
10
version = "7.70"
9
; Information added by Drupal.org packaging script on 2020-06-17
10
version = "7.72"
11 11
project = "drupal"
12
datestamp = "1589989726"
12
datestamp = "1592419104"
drupal7/modules/php/php.info
5 5
core = 7.x
6 6
files[] = php.test
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/poll/poll.info
6 6
files[] = poll.test
7 7
stylesheets[all][] = poll.css
8 8

  
9
; Information added by Drupal.org packaging script on 2020-05-20
10
version = "7.70"
9
; Information added by Drupal.org packaging script on 2020-06-17
10
version = "7.72"
11 11
project = "drupal"
12
datestamp = "1589989726"
12
datestamp = "1592419104"
drupal7/modules/profile/profile.info
11 11
; See user_system_info_alter().
12 12
hidden = TRUE
13 13

  
14
; Information added by Drupal.org packaging script on 2020-05-20
15
version = "7.70"
14
; Information added by Drupal.org packaging script on 2020-06-17
15
version = "7.72"
16 16
project = "drupal"
17
datestamp = "1589989726"
17
datestamp = "1592419104"
drupal7/modules/rdf/rdf.info
5 5
core = 7.x
6 6
files[] = rdf.test
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/rdf/tests/rdf_test.info
6 6
hidden = TRUE
7 7
dependencies[] = blog
8 8

  
9
; Information added by Drupal.org packaging script on 2020-05-20
10
version = "7.70"
9
; Information added by Drupal.org packaging script on 2020-06-17
10
version = "7.72"
11 11
project = "drupal"
12
datestamp = "1589989726"
12
datestamp = "1592419104"
drupal7/modules/search/search.extender.inc
219 219
      }
220 220
      $phrase = FALSE;
221 221
      // Strip off phrase quotes.
222
      if ($match[2]{0} == '"') {
222
      if ($match[2][0] == '"') {
223 223
        $match[2] = substr($match[2], 1, -1);
224 224
        $phrase = TRUE;
225 225
        $this->simple = FALSE;
drupal7/modules/search/search.info
8 8
configure = admin/config/search/settings
9 9
stylesheets[all][] = search.css
10 10

  
11
; Information added by Drupal.org packaging script on 2020-05-20
12
version = "7.70"
11
; Information added by Drupal.org packaging script on 2020-06-17
12
version = "7.72"
13 13
project = "drupal"
14
datestamp = "1589989726"
14
datestamp = "1592419104"
drupal7/modules/search/search.module
1172 1172
      }
1173 1173
      else {
1174 1174
        $info = search_simplify_excerpt_match($key, $text, $included[$key], $boundary);
1175
        if ($info['where']) {
1175
        if (isset($info['where'])) {
1176 1176
          $p = $info['where'];
1177 1177
          if ($info['keyword']) {
1178 1178
            $foundkeys[] = $info['keyword'];
drupal7/modules/search/tests/search_embedded_form.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
drupal7/modules/search/tests/search_extra_type.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2020-05-20
9
version = "7.70"
8
; Information added by Drupal.org packaging script on 2020-06-17
9
version = "7.72"
10 10
project = "drupal"
11
datestamp = "1589989726"
11
datestamp = "1592419104"
... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.

Formats disponibles : Unified diff