Commit c1b5d37d authored by catch's avatar catch
Browse files

Issue #2681505 by benjy: Arbitrary files are created when migrating users with an empty picture

parent 134c533f
......@@ -47,7 +47,7 @@ protected function getEntityCounts() {
'editor' => 2,
'field_config' => 61,
'field_storage_config' => 42,
'file' => 4,
'file' => 0,
'filter_format' => 8,
'image_style' => 5,
'migration' => 105,
......
......@@ -26,6 +26,7 @@ process:
plugin: migration
migration: d6_user_picture_file
source: uid
no_stub: true
destination:
plugin: entity:user
md5_passwords: true
......
......@@ -117,6 +117,10 @@ public function testUser() {
$file = File::load($user->user_picture->target_id);
$this->assertIdentical(basename($source->picture), $file->getFilename());
}
else {
// Ensure the user does not have a picture.
$this->assertFalse($user->user_picture->target_id, sprintf('User %s does not have a picture', $user->id()));
}
// Use the API to check if the password has been salted and re-hashed to
// conform to Drupal >= 7 for non-admin users.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment