Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
sign final payload
Returned signature did not match payload as it was changed after
signing.

Signed-off-by: Martin Zimmermann <[email protected]>
  • Loading branch information
Martin Zimmermann committed Sep 28, 2021
commit a92a08e737bdefeedcd086700b8a100aede46f0a
2 changes: 1 addition & 1 deletion lib/Controller/PushController.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ public function registerDevice(string $pushTokenHash, string $devicePublicKey, s
$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([
Expand Down