Skip to content

Commit ed5737f

Browse files
author
Cihad Tekin
committed
[push] a combination of bundle, keyid and team is added into hash to prevent collisions for apns credentials
1 parent 7fc22b9 commit ed5737f

File tree

1 file changed

+2
-1
lines changed
  • plugins/push/api/send/platforms

1 file changed

+2
-1
lines changed

plugins/push/api/send/platforms/i.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,8 @@ const CREDS = {
298298
return ['Not a private key in P8 format in base64-encoded string'];
299299
}
300300

301-
this._data.hash = FORGE.md.sha256.create().update(this._data.key).digest().toHex();
301+
const message = this._data.key + this._data.bundle + this._data.keyid + this._data.team;
302+
this._data.hash = FORGE.md.sha256.create().update(message).digest().toHex();
302303
}
303304

304305
/**

0 commit comments

Comments
 (0)