Skip to content
Snippets Groups Projects
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
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment