epinna/weevely3

Fix `:file_tar` compatibility with PHP8

ZanyMonk opened this issue · 0 comments

The file_tar module uses an old PHP lib called EasyTar.class. It's not to be found online and it is incompatible with PHP8, so it would be nice to replace it with a cleaner solution to compress/decompress tar files.

It appears to be possible with the native PHP class Phar:

// decompress from gz
$p = new PharData('files.tar.gz');
$p->decompress(); // creates files.tar

// unarchive from the tar
$phar = new PharData('files.tar');
$phar->extractTo('new_dir');

Let's try this !