Skip to content

Commit 2814634

Browse files
authored
docs(legal+guide): update contributor guide, legal terms, and backup path sanitization (#449)
* docs(legal+guide): update contributor guide, legal terms, and backup path sanitization * Update ContentPolicy.vue * Update PrivacyPolicy.vue * style: fix trailing whitespace in PrivacyPolicy.vue
1 parent 20b8476 commit 2814634

5 files changed

Lines changed: 734 additions & 675 deletions

File tree

‎app/Console/Commands/BackupToDrive.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ public function __construct(protected GoogleDriveBackupService $driveService)
2929
parent::__construct();
3030

3131
$timestamp = now()->format('Y-m-d_His');
32+
$rawVersion = config('app.version') ?: 'v1.0.0';
33+
$version = trim(preg_replace('/[^A-Za-z0-9._-]+/', '_', $rawVersion), '_') ?: 'v1.0.0';
3234

3335
$this->backupDir = storage_path('app/backups');
3436
$this->databaseDumpPath = $this->backupDir.'/database.sql.gz';
3537
$this->s3TarPath = $this->backupDir.'/s3.tar';
36-
$this->finalArchivePath = $this->backupDir."/hsc-stack-backup-{$timestamp}.tar.gz";
38+
$this->finalArchivePath = $this->backupDir."/backup_{$version}_{$timestamp}.tar.gz";
3739
}
3840

3941
public function handle(): int

0 commit comments

Comments
 (0)