core security update
This commit is contained in:
@@ -19919,7 +19919,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '1',
|
||||
'name' => 'vocabulary 1 (i=0)',
|
||||
'description' => 'description of vocabulary 1 (i=0)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 1 (i=0)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '0',
|
||||
@@ -19932,7 +19932,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '2',
|
||||
'name' => 'vocabulary 2 (i=1)',
|
||||
'description' => 'description of vocabulary 2 (i=1)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 2 (i=1)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '1',
|
||||
@@ -19945,7 +19945,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '3',
|
||||
'name' => 'vocabulary 3 (i=2)',
|
||||
'description' => 'description of vocabulary 3 (i=2)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 3 (i=2)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '0',
|
||||
@@ -19958,7 +19958,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '4',
|
||||
'name' => 'vocabulary 4 (i=3)',
|
||||
'description' => 'description of vocabulary 4 (i=3)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 4 (i=3)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '1',
|
||||
@@ -19971,7 +19971,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '5',
|
||||
'name' => 'vocabulary 5 (i=4)',
|
||||
'description' => 'description of vocabulary 5 (i=4)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 5 (i=4)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '0',
|
||||
@@ -19984,7 +19984,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '6',
|
||||
'name' => 'vocabulary 6 (i=5)',
|
||||
'description' => 'description of vocabulary 6 (i=5)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 6 (i=5)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '1',
|
||||
@@ -19997,7 +19997,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '7',
|
||||
'name' => 'vocabulary 7 (i=6)',
|
||||
'description' => 'description of vocabulary 7 (i=6)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 7 (i=6)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '0',
|
||||
@@ -20010,7 +20010,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '8',
|
||||
'name' => 'vocabulary 8 (i=7)',
|
||||
'description' => 'description of vocabulary 8 (i=7)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 8 (i=7)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '1',
|
||||
@@ -20023,7 +20023,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '9',
|
||||
'name' => 'vocabulary 9 (i=8)',
|
||||
'description' => 'description of vocabulary 9 (i=8)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 9 (i=8)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '0',
|
||||
@@ -20036,7 +20036,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '10',
|
||||
'name' => 'vocabulary 10 (i=9)',
|
||||
'description' => 'description of vocabulary 10 (i=9)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 10 (i=9)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '1',
|
||||
@@ -20049,7 +20049,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '11',
|
||||
'name' => 'vocabulary 11 (i=10)',
|
||||
'description' => 'description of vocabulary 11 (i=10)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 11 (i=10)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '0',
|
||||
@@ -20062,7 +20062,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '12',
|
||||
'name' => 'vocabulary 12 (i=11)',
|
||||
'description' => 'description of vocabulary 12 (i=11)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 12 (i=11)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '1',
|
||||
@@ -20075,7 +20075,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '13',
|
||||
'name' => 'vocabulary 13 (i=12)',
|
||||
'description' => 'description of vocabulary 13 (i=12)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 13 (i=12)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '0',
|
||||
@@ -20088,7 +20088,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '14',
|
||||
'name' => 'vocabulary 14 (i=13)',
|
||||
'description' => 'description of vocabulary 14 (i=13)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 14 (i=13)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '1',
|
||||
@@ -20101,7 +20101,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '15',
|
||||
'name' => 'vocabulary 15 (i=14)',
|
||||
'description' => 'description of vocabulary 15 (i=14)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 15 (i=14)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '0',
|
||||
@@ -20114,7 +20114,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '16',
|
||||
'name' => 'vocabulary 16 (i=15)',
|
||||
'description' => 'description of vocabulary 16 (i=15)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 16 (i=15)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '1',
|
||||
@@ -20127,7 +20127,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '17',
|
||||
'name' => 'vocabulary 17 (i=16)',
|
||||
'description' => 'description of vocabulary 17 (i=16)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 17 (i=16)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '0',
|
||||
@@ -20140,7 +20140,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '18',
|
||||
'name' => 'vocabulary 18 (i=17)',
|
||||
'description' => 'description of vocabulary 18 (i=17)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 18 (i=17)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '1',
|
||||
@@ -20153,7 +20153,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '19',
|
||||
'name' => 'vocabulary 19 (i=18)',
|
||||
'description' => 'description of vocabulary 19 (i=18)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 19 (i=18)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '0',
|
||||
@@ -20166,7 +20166,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '20',
|
||||
'name' => 'vocabulary 20 (i=19)',
|
||||
'description' => 'description of vocabulary 20 (i=19)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 20 (i=19)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '1',
|
||||
@@ -20179,7 +20179,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '21',
|
||||
'name' => 'vocabulary 21 (i=20)',
|
||||
'description' => 'description of vocabulary 21 (i=20)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 21 (i=20)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '0',
|
||||
@@ -20192,7 +20192,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '22',
|
||||
'name' => 'vocabulary 22 (i=21)',
|
||||
'description' => 'description of vocabulary 22 (i=21)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 22 (i=21)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '1',
|
||||
@@ -20205,7 +20205,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '23',
|
||||
'name' => 'vocabulary 23 (i=22)',
|
||||
'description' => 'description of vocabulary 23 (i=22)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 23 (i=22)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '0',
|
||||
@@ -20218,7 +20218,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '24',
|
||||
'name' => 'vocabulary 24 (i=23)',
|
||||
'description' => 'description of vocabulary 24 (i=23)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 24 (i=23)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '1',
|
||||
|
@@ -127,6 +127,38 @@ db_insert('files')->fields(array(
|
||||
'status' => '1',
|
||||
'timestamp' => '1285708958',
|
||||
))
|
||||
// On some Drupal 6 sites, more than one file can have the same filepath. See
|
||||
// https://www.drupal.org/node/1260938.
|
||||
->values(array(
|
||||
'fid' => '12',
|
||||
'uid' => '1',
|
||||
'filename' => 'duplicate-name.png',
|
||||
'filepath' => 'sites/default/files/duplicate-name.png',
|
||||
'filemime' => 'image/png',
|
||||
'filesize' => '314',
|
||||
'status' => '1',
|
||||
'timestamp' => '1285708958',
|
||||
))
|
||||
->values(array(
|
||||
'fid' => '13',
|
||||
'uid' => '1',
|
||||
'filename' => 'duplicate-name.png',
|
||||
'filepath' => 'sites/default/files/duplicate-name.png',
|
||||
'filemime' => 'image/png',
|
||||
'filesize' => '315',
|
||||
'status' => '1',
|
||||
'timestamp' => '1285708958',
|
||||
))
|
||||
->values(array(
|
||||
'fid' => '14',
|
||||
'uid' => '1',
|
||||
'filename' => 'duplicate-name.png',
|
||||
'filepath' => 'sites/default/files/duplicate-name.png',
|
||||
'filemime' => 'image/png',
|
||||
'filesize' => '316',
|
||||
'status' => '1',
|
||||
'timestamp' => '1285708958',
|
||||
))
|
||||
->execute();
|
||||
|
||||
db_insert('node')->fields(array(
|
||||
@@ -196,6 +228,23 @@ db_insert('node')->fields(array(
|
||||
'sticky' => '0',
|
||||
'tnid' => '0',
|
||||
'translate' => '0',
|
||||
))
|
||||
->values(array(
|
||||
'nid' => '41',
|
||||
'vid' => '55',
|
||||
'type' => 'page',
|
||||
'language' => '',
|
||||
'title' => 'node title 41 revision 55',
|
||||
'uid' => '1',
|
||||
'status' => '1',
|
||||
'created' => '1285709012',
|
||||
'changed' => '1285709012',
|
||||
'comment' => '0',
|
||||
'promote' => '0',
|
||||
'moderate' => '0',
|
||||
'sticky' => '0',
|
||||
'tnid' => '0',
|
||||
'translate' => '0',
|
||||
))
|
||||
->execute();
|
||||
|
||||
@@ -253,6 +302,28 @@ db_insert('node_revisions')->fields(array(
|
||||
'log' => '',
|
||||
'timestamp' => '1285709012',
|
||||
'format' => '1',
|
||||
))
|
||||
->values(array(
|
||||
'nid' => '41',
|
||||
'vid' => '54',
|
||||
'uid' => '1',
|
||||
'title' => 'node title 41 revision 54',
|
||||
'body' => "Attachments:\r\nduplicate-name.png",
|
||||
'teaser' => "Attachments:\r\nduplicate-name.png",
|
||||
'log' => '',
|
||||
'timestamp' => '1285709012',
|
||||
'format' => '1',
|
||||
))
|
||||
->values(array(
|
||||
'nid' => '41',
|
||||
'vid' => '55',
|
||||
'uid' => '1',
|
||||
'title' => 'node title 41 revision 55',
|
||||
'body' => "Attachments:\r\nduplicate-name.png\r\nduplicate-name.png",
|
||||
'teaser' => "Attachments:\r\nduplicate-name.png\r\nduplicate-name.png",
|
||||
'log' => '',
|
||||
'timestamp' => '1285709012',
|
||||
'format' => '1',
|
||||
))
|
||||
->execute();
|
||||
|
||||
@@ -415,6 +486,30 @@ db_insert('upload')->fields(array(
|
||||
'list' => '1',
|
||||
'weight' => '0',
|
||||
))
|
||||
->values(array(
|
||||
'fid' => '12',
|
||||
'nid' => '41',
|
||||
'vid' => '54',
|
||||
'description' => 'duplicate-name.png',
|
||||
'list' => '1',
|
||||
'weight' => '0',
|
||||
))
|
||||
->values(array(
|
||||
'fid' => '13',
|
||||
'nid' => '41',
|
||||
'vid' => '55',
|
||||
'description' => 'first description',
|
||||
'list' => '0',
|
||||
'weight' => '0',
|
||||
))
|
||||
->values(array(
|
||||
'fid' => '14',
|
||||
'nid' => '41',
|
||||
'vid' => '55',
|
||||
'description' => 'second description',
|
||||
'list' => '1',
|
||||
'weight' => '0',
|
||||
))
|
||||
->execute();
|
||||
|
||||
// Add series of entries for invalid node vids to the {upload} table.
|
||||
@@ -431,7 +526,7 @@ for ($i = 30; $i < 250; $i += 2) {
|
||||
->values(array(
|
||||
'fid' => $i,
|
||||
'nid' => '40',
|
||||
'vid' => 24 + $i,
|
||||
'vid' => 26 + $i,
|
||||
'description' => 'crazy-basename.png',
|
||||
'list' => '1',
|
||||
'weight' => '0',
|
||||
@@ -440,7 +535,7 @@ for ($i = 30; $i < 250; $i += 2) {
|
||||
->values(array(
|
||||
'fid' => 2,
|
||||
'nid' => '40',
|
||||
'vid' => 24 + $i + 1,
|
||||
'vid' => 26 + $i + 1,
|
||||
'description' => 'crazy-basename.png',
|
||||
'list' => '1',
|
||||
'weight' => '0',
|
||||
|
@@ -74,9 +74,10 @@ class UpgradePathTaxonomyTestCase extends UpgradePathTestCase {
|
||||
$this->assertEqual($voc_keys, $inst_keys, 'Node type page has instances for every vocabulary.');
|
||||
|
||||
// Ensure instance variables are getting through.
|
||||
foreach ($instances as $instance) {
|
||||
$this->assertTrue(isset($instance['required']), 'The required setting was preserved during the upgrade path.');
|
||||
$this->assertTrue($instance['description'], 'The description was preserved during the upgrade path');
|
||||
foreach (array_unique($instances) as $instance) {
|
||||
$field_instance = field_info_instance('node', $instance, 'page');
|
||||
$this->assertTrue(isset($field_instance['required']), 'The required setting was preserved during the upgrade path.');
|
||||
$this->assertTrue($field_instance['description'], 'The description was preserved during the upgrade path');
|
||||
}
|
||||
|
||||
// Node type 'story' was not explicitly in $vocabulary->nodes but
|
||||
|
@@ -64,12 +64,35 @@ class UploadUpgradePathTestCase extends UpgradePathTestCase {
|
||||
}
|
||||
$this->assertIdentical($filenames, $recorded_filenames, 'The uploaded files are present in the same order after the upgrade.');
|
||||
}
|
||||
|
||||
// Test for the file with repeating basename to only have the streaming
|
||||
// path replaced.
|
||||
$node = node_load(40, 53);
|
||||
$repeated_basename_file = $node->upload[LANGUAGE_NONE][4];
|
||||
$this->assertEqual($repeated_basename_file['uri'], 'private://drupal-6/file/directory/path/crazy-basename.png', "The file with the repeated basename path only had the stream portion replaced");
|
||||
|
||||
// Ensure that filepaths are deduplicated.
|
||||
$node0 = node_load(41, 54);
|
||||
$node1 = node_load(41, 55);
|
||||
// Ensure that both revisions point to the same file ID.
|
||||
$items0 = field_get_items('node', $node0, 'upload');
|
||||
$this->assertEqual(count($items0), 1);
|
||||
$items1 = field_get_items('node', $node1, 'upload');
|
||||
$this->assertEqual(count($items1), 2);
|
||||
$this->assertEqual($items0[0]['fid'], $items1[0]['fid']);
|
||||
$this->assertEqual($items0[0]['fid'], $items1[1]['fid']);
|
||||
// The revision with more than one reference to the same file should retain
|
||||
// the original settings for each reference.
|
||||
$this->assertEqual($items1[0]['description'], 'first description');
|
||||
$this->assertEqual($items1[0]['display'], 0);
|
||||
$this->assertEqual($items1[1]['description'], 'second description');
|
||||
$this->assertEqual($items1[1]['display'], 1);
|
||||
// Ensure that the latest version of the files are used.
|
||||
$this->assertEqual($items1[0]['filesize'], 316);
|
||||
$this->assertEqual($items1[1]['filesize'], 316);
|
||||
// No duplicate files should remain on the Drupal 7 site.
|
||||
$this->assertEqual(0, db_query("SELECT COUNT(*) FROM {file_managed} GROUP BY uri HAVING COUNT(fid) > 1")->fetchField());
|
||||
|
||||
// Make sure the file settings were properly migrated.
|
||||
$d6_file_directory_temp = '/drupal-6/file/directory/temp';
|
||||
$d6_file_directory_path = '/drupal-6/file/directory/path';
|
||||
|
Reference in New Issue
Block a user