summaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Middleware
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-01-20 11:45:08 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-01-20 11:45:08 +0100
commitf5c361cf44739058b79f322576a1bad2d8c142d9 (patch)
treea22217c6995751023112832d191d213e494e2fbc /lib/private/AppFramework/Middleware
parent37bb33c5799b834dfef3fb73936bd0e5a4773fb8 (diff)
downloadnextcloud-server-f5c361cf44739058b79f322576a1bad2d8c142d9.tar.gz
nextcloud-server-f5c361cf44739058b79f322576a1bad2d8c142d9.zip
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/AppFramework/Middleware')
-rw-r--r--lib/private/AppFramework/Middleware/CompressionMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/MiddlewareDispatcher.php1
-rw-r--r--lib/private/AppFramework/Middleware/OCSMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/Security/CORSMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/Security/CSPMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php11
-rw-r--r--lib/private/AppFramework/Middleware/SessionMiddleware.php1
10 files changed, 5 insertions, 15 deletions
diff --git a/lib/private/AppFramework/Middleware/CompressionMiddleware.php b/lib/private/AppFramework/Middleware/CompressionMiddleware.php
index 5128afa8cad..530c270c7bc 100644
--- a/lib/private/AppFramework/Middleware/CompressionMiddleware.php
+++ b/lib/private/AppFramework/Middleware/CompressionMiddleware.php
@@ -35,7 +35,6 @@ use OCP\AppFramework\Middleware;
use OCP\IRequest;
class CompressionMiddleware extends Middleware {
-
/** @var bool */
private $useGZip;
diff --git a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
index adf17e53caa..35eb0098eed 100644
--- a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
+++ b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
@@ -39,7 +39,6 @@ use OCP\AppFramework\Middleware;
* This class is used to store and run all the middleware in correct order
*/
class MiddlewareDispatcher {
-
/**
* @var array array containing all the middlewares
*/
diff --git a/lib/private/AppFramework/Middleware/OCSMiddleware.php b/lib/private/AppFramework/Middleware/OCSMiddleware.php
index 4c2dbd0f828..955b15f80c8 100644
--- a/lib/private/AppFramework/Middleware/OCSMiddleware.php
+++ b/lib/private/AppFramework/Middleware/OCSMiddleware.php
@@ -39,7 +39,6 @@ use OCP\AppFramework\OCSController;
use OCP\IRequest;
class OCSMiddleware extends Middleware {
-
/** @var IRequest */
private $request;
diff --git a/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php b/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php
index d956ce58912..f20bd333452 100644
--- a/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php
+++ b/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php
@@ -35,7 +35,6 @@ use OCP\IRequest;
use OCP\ISession;
class PublicShareMiddleware extends Middleware {
-
/** @var IRequest */
private $request;
diff --git a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
index dd964915006..2476f4ec9b3 100644
--- a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
@@ -118,7 +118,6 @@ class CORSMiddleware extends Middleware {
if (isset($this->request->server['HTTP_ORIGIN']) &&
$this->reflector->hasAnnotation('CORS')) {
-
// allow credentials headers must not be true or CSRF is possible
// otherwise
foreach ($response->getHeaders() as $header => $value) {
diff --git a/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php b/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php
index 1eea52d620c..ae0dc1f134e 100644
--- a/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php
@@ -36,7 +36,6 @@ use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Middleware;
class CSPMiddleware extends Middleware {
-
/** @var ContentSecurityPolicyManager */
private $contentSecurityPolicyManager;
/** @var ContentSecurityPolicyNonceManager */
diff --git a/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php b/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php
index 534ff56cced..418d4185184 100644
--- a/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php
@@ -33,7 +33,6 @@ use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Middleware;
class FeaturePolicyMiddleware extends Middleware {
-
/** @var FeaturePolicyManager */
private $policyManager;
diff --git a/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php b/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php
index 0ab5d061c44..e6d35dc66f2 100644
--- a/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php
@@ -31,7 +31,6 @@ use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Middleware;
class SameSiteCookieMiddleware extends Middleware {
-
/** @var Request */
private $request;
diff --git a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
index e0f36231b68..eb8c1b8dc43 100644
--- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
@@ -137,7 +137,6 @@ class SecurityMiddleware extends Middleware {
* @suppress PhanUndeclaredClassConstant
*/
public function beforeController($controller, $methodName) {
-
// this will set the current navigation entry of the app, use this only
// for normal HTML requests and not for AJAX requests
$this->navigationManager->setActiveEntry($this->appName);
@@ -207,11 +206,11 @@ class SecurityMiddleware extends Middleware {
* This allows oauth apps (e.g. moodle) to use the OCS endpoints
*/
if (!$this->request->passesCSRFCheck() && !(
- $controller instanceof OCSController && (
- $this->request->getHeader('OCS-APIREQUEST') === 'true' ||
- strpos($this->request->getHeader('Authorization'), 'Bearer ') === 0
- )
- )) {
+ $controller instanceof OCSController && (
+ $this->request->getHeader('OCS-APIREQUEST') === 'true' ||
+ strpos($this->request->getHeader('Authorization'), 'Bearer ') === 0
+ )
+ )) {
throw new CrossSiteRequestForgeryException();
}
}
diff --git a/lib/private/AppFramework/Middleware/SessionMiddleware.php b/lib/private/AppFramework/Middleware/SessionMiddleware.php
index 32ac2b17ae5..af195df0de9 100644
--- a/lib/private/AppFramework/Middleware/SessionMiddleware.php
+++ b/lib/private/AppFramework/Middleware/SessionMiddleware.php
@@ -32,7 +32,6 @@ use OCP\AppFramework\Middleware;
use OCP\ISession;
class SessionMiddleware extends Middleware {
-
/** @var ControllerMethodReflector */
private $reflector;