Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notifications.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-04-19 10:51:25 +0300
committerJoas Schilling <coding@schilljs.com>2017-04-19 10:51:25 +0300
commitad83ef61d2b9a3942a18db2c0a2a99bbf0470c10 (patch)
tree665f49f53e128a830b35dbca16d90ce745c53c2b /lib
parent8ae1023e60ca188a12caf5b3abf51261a4332ad7 (diff)
Wrong demorgan
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/PushController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Controller/PushController.php b/lib/Controller/PushController.php
index 089428a..274fc00 100644
--- a/lib/Controller/PushController.php
+++ b/lib/Controller/PushController.php
@@ -90,8 +90,8 @@ class PushController extends OCSController {
}
if (
- (strlen($devicePublicKey) !== 450 && strpos($devicePublicKey, "\n" . '-----END PUBLIC KEY-----') !== 425) ||
- (strlen($devicePublicKey) !== 451 && strpos($devicePublicKey, "\n" . '-----END PUBLIC KEY-----' . "\n") !== 425) ||
+ ((strlen($devicePublicKey) !== 450 || strpos($devicePublicKey, "\n" . '-----END PUBLIC KEY-----') !== 425) &&
+ (strlen($devicePublicKey) !== 451 || strpos($devicePublicKey, "\n" . '-----END PUBLIC KEY-----' . "\n") !== 425)) ||
strpos($devicePublicKey, '-----BEGIN PUBLIC KEY-----' . "\n") !== 0) {
return new JSONResponse(['message' => 'INVALID_DEVICE_KEY'], Http::STATUS_BAD_REQUEST);
}