diff --git a/lib/Controller/PushController.php b/lib/Controller/PushController.php index d990f2fe0..e2e70e6e5 100644 --- a/lib/Controller/PushController.php +++ b/lib/Controller/PushController.php @@ -70,17 +70,17 @@ public function registerDevice(string $pushTokenHash, string $devicePublicKey, s } if ( - !str_starts_with($devicePublicKey, '-----BEGIN PUBLIC KEY-----' . "\n") || - ((\strlen($devicePublicKey) !== 450 || strpos($devicePublicKey, "\n" . '-----END PUBLIC KEY-----') !== 425) && - (\strlen($devicePublicKey) !== 451 || strpos($devicePublicKey, "\n" . '-----END PUBLIC KEY-----' . "\n") !== 425)) + !str_starts_with($devicePublicKey, '-----BEGIN PUBLIC KEY-----' . "\n") + || ((\strlen($devicePublicKey) !== 450 || strpos($devicePublicKey, "\n" . '-----END PUBLIC KEY-----') !== 425) + && (\strlen($devicePublicKey) !== 451 || strpos($devicePublicKey, "\n" . '-----END PUBLIC KEY-----' . "\n") !== 425)) ) { return new DataResponse(['message' => 'INVALID_DEVICE_KEY'], Http::STATUS_BAD_REQUEST); } if ( - !filter_var($proxyServer, FILTER_VALIDATE_URL) || - \strlen($proxyServer) > 256 || - !preg_match('/^(https\:\/\/|http\:\/\/(localhost|[a-z0-9\.-]*\.(internal|local))(\:\d{0,5})?\/)/', $proxyServer) + !filter_var($proxyServer, FILTER_VALIDATE_URL) + || \strlen($proxyServer) > 256 + || !preg_match('/^(https\:\/\/|http\:\/\/(localhost|[a-z0-9\.-]*\.(internal|local))(\:\d{0,5})?\/)/', $proxyServer) ) { return new DataResponse(['message' => 'INVALID_PROXY_SERVER'], Http::STATUS_BAD_REQUEST); } diff --git a/vendor-bin/csfixer/composer.json b/vendor-bin/csfixer/composer.json index 1e3fbdf65..1692c7b96 100644 --- a/vendor-bin/csfixer/composer.json +++ b/vendor-bin/csfixer/composer.json @@ -7,6 +7,6 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.64", - "nextcloud/coding-standard": "^1.3" + "nextcloud/coding-standard": "^1.4.0" } } diff --git a/vendor-bin/csfixer/composer.lock b/vendor-bin/csfixer/composer.lock index bdb869bd1..b6865386c 100644 --- a/vendor-bin/csfixer/composer.lock +++ b/vendor-bin/csfixer/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "92bbce3d6deb2f1f0f7ef059115e0327", + "content-hash": "f7e6e5f9a596d39bfcdb6027d083b397", "packages": [], "packages-dev": [ { @@ -55,21 +55,21 @@ }, { "name": "nextcloud/coding-standard", - "version": "v1.3.2", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "9c719c4747fa26efc12f2e8b21c14a9a75c6ba6d" + "reference": "8e06808c1423e9208d63d1bd205b9a38bd400011" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/9c719c4747fa26efc12f2e8b21c14a9a75c6ba6d", - "reference": "9c719c4747fa26efc12f2e8b21c14a9a75c6ba6d", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/8e06808c1423e9208d63d1bd205b9a38bd400011", + "reference": "8e06808c1423e9208d63d1bd205b9a38bd400011", "shasum": "" }, "require": { "kubawerlos/php-cs-fixer-custom-fixers": "^3.22", - "php": "^7.3|^8.0", + "php": "^8.0", "php-cs-fixer/shim": "^3.17" }, "type": "library", @@ -89,11 +89,14 @@ } ], "description": "Nextcloud coding standards for the php cs fixer", + "keywords": [ + "dev" + ], "support": { "issues": "https://github.com/nextcloud/coding-standard/issues", - "source": "https://github.com/nextcloud/coding-standard/tree/v1.3.2" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.4.0" }, - "time": "2024-10-14T16:49:05+00:00" + "time": "2025-06-19T12:27:27+00:00" }, { "name": "php-cs-fixer/shim", @@ -150,11 +153,11 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, - "platform": [], - "platform-dev": [], + "platform": {}, + "platform-dev": {}, "platform-overrides": { "php": "8.1" },