Allow any Random generator that implements ISecureRandom for setupCheck

Signed-off-by: Timo Förster <tfoerster@webfoersterei.de>
This commit is contained in:
Timo Förster 2018-07-30 17:28:08 +02:00
parent 006e150c87
commit 8d8189c932

View file

@ -42,7 +42,6 @@ use OC\DB\MissingIndexInformation;
use OC\IntegrityCheck\Checker; use OC\IntegrityCheck\Checker;
use OC\Lock\NoopLockingProvider; use OC\Lock\NoopLockingProvider;
use OC\MemoryInfo; use OC\MemoryInfo;
use OC\Security\SecureRandom;
use OCP\AppFramework\Controller; use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\DataDisplayResponse; use OCP\AppFramework\Http\DataDisplayResponse;
use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\DataResponse;
@ -56,6 +55,7 @@ use OCP\ILogger;
use OCP\IRequest; use OCP\IRequest;
use OCP\IURLGenerator; use OCP\IURLGenerator;
use OCP\Lock\ILockingProvider; use OCP\Lock\ILockingProvider;
use OCP\Security\ISecureRandom;
use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\GenericEvent; use Symfony\Component\EventDispatcher\GenericEvent;
@ -87,7 +87,7 @@ class CheckSetupController extends Controller {
private $dateTimeFormatter; private $dateTimeFormatter;
/** @var MemoryInfo */ /** @var MemoryInfo */
private $memoryInfo; private $memoryInfo;
/** @var SecureRandom */ /** @var ISecureRandom */
private $secureRandom; private $secureRandom;
public function __construct($AppName, public function __construct($AppName,
@ -104,7 +104,7 @@ class CheckSetupController extends Controller {
ILockingProvider $lockingProvider, ILockingProvider $lockingProvider,
IDateTimeFormatter $dateTimeFormatter, IDateTimeFormatter $dateTimeFormatter,
MemoryInfo $memoryInfo, MemoryInfo $memoryInfo,
SecureRandom $secureRandom) { ISecureRandom $secureRandom) {
parent::__construct($AppName, $request); parent::__construct($AppName, $request);
$this->config = $config; $this->config = $config;
$this->clientService = $clientService; $this->clientService = $clientService;