diff options
author | Joas Schilling <coding@schilljs.com> | 2017-04-19 10:51:25 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-04-19 10:51:25 +0300 |
commit | ad83ef61d2b9a3942a18db2c0a2a99bbf0470c10 (patch) | |
tree | 665f49f53e128a830b35dbca16d90ce745c53c2b /lib/Controller/PushController.php | |
parent | 8ae1023e60ca188a12caf5b3abf51261a4332ad7 (diff) |
Wrong demorgan
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Controller/PushController.php')
-rw-r--r-- | lib/Controller/PushController.php | 4 |
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); } |