BookStackApp / system-cli

MIGRATED TO CODEBERG -- A simple CLI to manage BookStack instances
https://codeberg.org/bookstack/system-cli
MIT License
5 stars 0 forks source link

Restore: Common thrown error due to backup path #17

Open ssddanbrown opened 2 months ago

ssddanbrown commented 2 months ago

Getting a few reports of scenarios like the one here: https://www.reddit.com/r/BookStack/comments/1de66kq/using_the_bookstack_system_cli_restore_command/

 PHP Fatal error: Uncaught TypeError: Cli\Services\BackupZip::__construct(): Argument #1 ($filePath) must be of type string, bool given, called in phar:///var/www/bookstac k/bookstack-system-cli/src/Commands/RestoreCommand.php on line 52 and defined in phar:///var/www/bookstack/bookstack-system-cli/src/Services/BackupZip.php:10
0 phar:///var/www/bookstack/bookstack-system-cli/src/Commands/RestoreCommand.php(52): Cli\Services\BackupZip->__construct()

But also got reports of it working with a valid path. Might be an issue in path resolution, especially if relative? Either way, looks like better validation of backup path is needed.