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:
authorMartin Zimmermann <martin.zimmermann@bytepoets.com>2021-09-28 14:20:14 +0300
committerJoas Schilling <coding@schilljs.com>2021-10-18 15:25:21 +0300
commit109637905a571aa7f5dc68d4b2133593ef813742 (patch)
treea306b82dc262323947bb61394f19681661d9ee74 /lib
parentf8c325399c1aaf2be48a17440cfa6eb26ab209a6 (diff)
sign final payload
Returned signature did not match payload as it was changed after signing. Signed-off-by: Martin Zimmermann <martin.zimmermann@bytepoets.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/PushController.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Controller/PushController.php b/lib/Controller/PushController.php
index 9a24bc7..544c17b 100644
--- a/lib/Controller/PushController.php
+++ b/lib/Controller/PushController.php
@@ -118,8 +118,8 @@ class PushController extends OCSController {
$key = $this->identityProof->getKey($user);
$deviceIdentifier = json_encode([$user->getCloudId(), $token->getId()]);
- openssl_sign($deviceIdentifier, $signature, $key->getPrivate(), OPENSSL_ALGO_SHA512);
$deviceIdentifier = base64_encode(hash('sha512', $deviceIdentifier, true));
+ openssl_sign($deviceIdentifier, $signature, $key->getPrivate(), OPENSSL_ALGO_SHA512);
$appType = 'unknown';
if ($this->request->isUserAgent([