mirror of
https://github.com/projectsend/projectsend.git
synced 2026-09-23 20:06:20 +00:00
e9496dc357
An infected file now goes somewhere rather than nowhere. Staff holding the new release_quarantined_files permission get a Quarantine screen listing what was refused, who uploaded it, and what the scanner called it. They can delete it as they always could, or release it — which needs a written reason, a password confirmation on top of the permission, and lands in the activity log under their name. Only the administrator role holds that permission by default. Deciding a threat report is wrong is a different judgement from deciding a file is no longer needed, which is why it is not delete_files. Two notifications, two audiences: staff who can act on it, and the person who uploaded it — for whom this is how they learn their own machine has something on it. The people the file was shared with are deliberately not told about a file they never received. `projectsend:scan-files` runs hourly: it re-queues files still waiting, and re-scans the ones that went out unscanned while the scanner was unreachable, since it may be back. With --existing it also works through a library uploaded before scanning was switched on, paced by a setting so it does not starve today's uploads. A file that was downloadable before it was caught says so on the screen, with its download count, because that is the case where somebody may already have a copy.
29 lines
1.4 KiB
PHP
29 lines
1.4 KiB
PHP
<?php
|
|
|
|
use Illuminate\Foundation\Inspiring;
|
|
use Illuminate\Support\Facades\Artisan;
|
|
use Illuminate\Support\Facades\Schedule;
|
|
|
|
Artisan::command('inspire', function () {
|
|
$this->comment(Inspiring::quote());
|
|
})->purpose('Display an inspiring quote');
|
|
|
|
Schedule::command('projectsend:purge-erasures')->daily();
|
|
// Hourly, not daily: this one frees disk that an account is holding
|
|
// against its own upload limits, so the gap between a session going stale
|
|
// and the sweep noticing is a gap where somebody cannot upload. Daily made
|
|
// that gap up to two days wide.
|
|
Schedule::command('projectsend:purge-stale-uploads')->hourly();
|
|
Schedule::command('projectsend:purge-zip-downloads')->daily();
|
|
Schedule::command('projectsend:check-for-updates')->daily();
|
|
Schedule::command('projectsend:fetch-news')->daily();
|
|
// Hourly, not daily: a file stuck waiting for a scanner is a file nobody
|
|
// can download, and an installation set to hold has no other way forward.
|
|
Schedule::command('projectsend:scan-files')->hourly();
|
|
Schedule::command('projectsend:purge-expired-files')->daily();
|
|
Schedule::command('projectsend:purge-orphan-files')->daily();
|
|
Schedule::command('projectsend:purge-api-request-logs')->daily();
|
|
Schedule::command('projectsend:purge-failed-jobs')->daily();
|
|
Schedule::command('projectsend:purge-notifications')->daily();
|
|
Schedule::command('projectsend:refresh-mail-oauth-tokens')->daily();
|