Skip to content

Commit

Permalink
Move security checks to core module
Browse files Browse the repository at this point in the history
  • Loading branch information
voltan committed Nov 4, 2024
1 parent 8a8b96a commit e857736
Show file tree
Hide file tree
Showing 23 changed files with 16 additions and 1,525 deletions.
2 changes: 0 additions & 2 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
Service\ExportService::class => Factory\Service\ExportServiceFactory::class,
Service\TranslatorService::class => Factory\Service\TranslatorServiceFactory::class,
Service\InstallerService::class => Factory\Service\InstallerServiceFactory::class,
Security\Account\AccountLoginAttempts::class => Factory\Security\AccountLoginAttemptsFactory::class,
Security\Account\AccountLocked::class => Factory\Security\AccountLockedFactory::class,
Handler\Admin\Profile\AddHandler::class => Factory\Handler\Admin\Profile\AddHandlerFactory::class,
Handler\Admin\Profile\EditHandler::class => Factory\Handler\Admin\Profile\EditHandlerFactory::class,
Handler\Admin\Profile\ListHandler::class => Factory\Handler\Admin\Profile\ListHandlerFactory::class,
Expand Down
2 changes: 1 addition & 1 deletion src/Factory/Middleware/AuthenticationMiddlewareFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace User\Factory\Middleware;

use Core\Security\Account\AccountLocked;
use Laminas\ServiceManager\Factory\FactoryInterface;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
Expand All @@ -10,7 +11,6 @@
use Psr\Http\Message\StreamFactoryInterface;
use User\Handler\ErrorHandler;
use User\Middleware\AuthenticationMiddleware;
use User\Security\Account\AccountLocked;
use User\Service\AccountService;
use User\Service\CacheService;
use User\Service\TokenService;
Expand Down
34 changes: 0 additions & 34 deletions src/Factory/Security/AccountLockedFactory.php

This file was deleted.

36 changes: 0 additions & 36 deletions src/Factory/Security/AccountLoginAttemptsFactory.php

This file was deleted.

4 changes: 2 additions & 2 deletions src/Factory/Service/AccountServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace User\Factory\Service;

use Core\Security\Account\AccountLocked;
use Core\Security\Account\AccountLoginAttempts;
use Laminas\ServiceManager\Factory\FactoryInterface;
use Notification\Service\NotificationService;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
use User\Repository\AccountRepositoryInterface;
use User\Security\Account\AccountLocked;
use User\Security\Account\AccountLoginAttempts;
use User\Service\AccountService;
use User\Service\AvatarService;
use User\Service\CacheService;
Expand Down
2 changes: 1 addition & 1 deletion src/Middleware/AuthenticationMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace User\Middleware;

use Core\Security\Account\AccountLocked;
use Fig\Http\Message\StatusCodeInterface;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
Expand All @@ -10,7 +11,6 @@
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use User\Handler\ErrorHandler;
use User\Security\Account\AccountLocked;
use User\Service\AccountService;
use User\Service\CacheService;
use User\Service\TokenService;
Expand Down
20 changes: 10 additions & 10 deletions src/Middleware/SecurityMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

namespace User\Middleware;

use Core\Security\Request\Injection as RequestSecurityInjection;
use Core\Security\Request\InputSizeLimit as RequestSecurityInputSizeLimit;
use Core\Security\Request\InputValidation as RequestSecurityInputValidation;
use Core\Security\Request\Ip as RequestSecurityIp;
use Core\Security\Request\Method as RequestSecurityMethod;
use Core\Security\Request\RequestLimit as RequestSecurityRequestLimit;
use Core\Security\Request\Xss as RequestSecurityXss;
use Core\Security\Response\Compress as ResponseCompress;
use Core\Security\Response\Escape as ResponseEscape;
use Core\Security\Response\Headers as ResponseHeaders;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\StreamFactoryInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use User\Handler\ErrorHandler;
use User\Security\Request\Injection as RequestSecurityInjection;
use User\Security\Request\InputSizeLimit as RequestSecurityInputSizeLimit;
use User\Security\Request\InputValidation as RequestSecurityInputValidation;
use User\Security\Request\Ip as RequestSecurityIp;
use User\Security\Request\Method as RequestSecurityMethod;
use User\Security\Request\RequestLimit as RequestSecurityRequestLimit;
use User\Security\Request\Xss as RequestSecurityXss;
use User\Security\Response\Compress as ResponseCompress;
use User\Security\Response\Escape as ResponseEscape;
use User\Security\Response\Headers as ResponseHeaders;
use User\Service\CacheService;
use User\Service\UtilityService;

Expand Down
131 changes: 0 additions & 131 deletions src/Security/Account/AccountLocked.php

This file was deleted.

Loading

0 comments on commit e857736

Please sign in to comment.