aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2022-10-27 14:33:31 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2022-10-31 16:13:28 +0100
commit8aea25b5b92dac105f7e862470ee0dcf0e876615 (patch)
tree3095f0a58eb70e1c21117ce9c3450a1e60e323ba /lib/private/Server.php
parentaa81b87f26552bc3d49de6cf0babfe6a79c21af5 (diff)
downloadnextcloud-server-8aea25b5b92dac105f7e862470ee0dcf0e876615.tar.gz
nextcloud-server-8aea25b5b92dac105f7e862470ee0dcf0e876615.zip
Add remote host validation API
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 1da1b614b5b..03aa75060df 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -105,8 +105,6 @@ use OC\Files\Type\Loader;
use OC\Files\View;
use OC\FullTextSearch\FullTextSearchManager;
use OC\Http\Client\ClientService;
-use OC\Http\Client\DnsPinMiddleware;
-use OC\Http\Client\LocalAddressChecker;
use OC\Http\Client\NegativeDnsCache;
use OC\IntegrityCheck\Checker;
use OC\IntegrityCheck\Helpers\AppLocator;
@@ -858,7 +856,7 @@ class Server extends ServerContainer implements IServerContainer {
$this->registerAlias(\OCP\Security\ISecureRandom::class, SecureRandom::class);
/** @deprecated 19.0.0 */
$this->registerDeprecatedAlias('SecureRandom', \OCP\Security\ISecureRandom::class);
-
+ $this->registerAlias(\OCP\Security\IRemoteHostValidator::class, \OC\Security\RemoteHostValidator::class);
$this->registerAlias(IVerificationToken::class, VerificationToken::class);
$this->registerAlias(ICrypto::class, Crypto::class);
@@ -890,22 +888,11 @@ class Server extends ServerContainer implements IServerContainer {
$this->registerAlias(ICertificateManager::class, CertificateManager::class);
$this->registerAlias(IClientService::class, ClientService::class);
- $this->registerService(LocalAddressChecker::class, function (ContainerInterface $c) {
- return new LocalAddressChecker(
- $c->get(LoggerInterface::class),
- );
- });
$this->registerService(NegativeDnsCache::class, function (ContainerInterface $c) {
return new NegativeDnsCache(
$c->get(ICacheFactory::class),
);
});
- $this->registerService(DnsPinMiddleware::class, function (ContainerInterface $c) {
- return new DnsPinMiddleware(
- $c->get(NegativeDnsCache::class),
- $c->get(LocalAddressChecker::class)
- );
- });
$this->registerDeprecatedAlias('HttpClientService', IClientService::class);
$this->registerService(IEventLogger::class, function (ContainerInterface $c) {
return new EventLogger($c->get(SystemConfig::class), $c->get(LoggerInterface::class), $c->get(Log::class));