2020-10-08 09:02:51 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2020-12-16 08:54:15 -05:00
|
|
|
|
2020-10-08 09:02:51 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2020-10-08 09:02:51 -04:00
|
|
|
*/
|
|
|
|
|
namespace OC\Repair;
|
|
|
|
|
|
|
|
|
|
use OC\Security\Bruteforce\CleanupJob;
|
|
|
|
|
use OCP\BackgroundJob\IJobList;
|
|
|
|
|
use OCP\Migration\IOutput;
|
|
|
|
|
use OCP\Migration\IRepairStep;
|
|
|
|
|
|
|
|
|
|
class AddBruteForceCleanupJob implements IRepairStep {
|
2025-11-17 09:32:54 -05:00
|
|
|
public function __construct(
|
|
|
|
|
protected IJobList $jobList,
|
|
|
|
|
) {
|
2020-10-08 09:02:51 -04:00
|
|
|
}
|
|
|
|
|
|
2025-11-24 03:17:34 -05:00
|
|
|
public function getName(): string {
|
2020-10-08 09:02:51 -04:00
|
|
|
return 'Add job to cleanup the bruteforce entries';
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-24 03:17:34 -05:00
|
|
|
public function run(IOutput $output): void {
|
2020-10-08 09:02:51 -04:00
|
|
|
$this->jobList->add(CleanupJob::class);
|
|
|
|
|
}
|
|
|
|
|
}
|