The Archive_Tar library uses some functions which do not support stream wrappers, particularly dirname.
When called from update_manager_archive_extract, it is possible to pass a directory of the form: temporary://folder-that-does-not-exists/otherfolder as the directory parameter. This will cause Archive_Tar->_checkDir to attempt to create the folder 'temporary:' (which it won't be able to do) since it uses dirname to determine the parent directories of the extract location, and create them if they don't exist.
This doesn't show up as a bug in core (currently) as all calls of update_manager_archive_extract first call _update_manager_extract_directory which will create the directory if it doesn't exist. However, I feel that for completeness and robustness' sakes, we should avoid calling archiver->extract on streamwrapper style paths.
I'm attaching a patch to update.manager.inc that will remove the one location I see right now.
Comment | File | Size | Author |
---|---|---|---|
#4 | drupal-realpath-1379082-4.patch | 555 bytes | mandar.harkare |
Comments
Comment #1
parthipanramesh CreditAttribution: parthipanramesh commentedGood! Patch does work fine.
Comment #2
David_Rothstein CreditAttribution: David_Rothstein commentedGuess that's reasonable, but would need to go into Drupal 8 first.
Comment #3
David_Rothstein CreditAttribution: David_Rothstein commentedAlso, the code comment needs a bit of work for grammar and to follow coding standards (https://drupal.org/coding-standards/docs#inline).
Comment #4
mandar.harkare CreditAttribution: mandar.harkare commentedComment #5
mandar.harkare CreditAttribution: mandar.harkare commentedComment #7
marvil07 CreditAttribution: marvil07 commentedSeems fine.
Comment #8
alexpottThis looks like a bug and tests would be great.
Comment #9
alexpottre #8 and therefore this issue needs work.
Comment #21
smustgrave CreditAttribution: smustgrave at Mobomo commentedThe function appears to have been updated several times
This current code before
$archiver->extract($directory);
appears to check the path.Do you still experience this issue?
Comment #22
quietone CreditAttribution: quietone at PreviousNext commentedConfirmation that this problem still exists has not been provided. And as pointed out in #21, there are not checks on the existence of the path.
Therefore, closing as outdated.