Skip to content

Commit 77308b2

Browse files
Merge pull request #5850 from Countly/SER-2173-push-apns-credentials-being-mixed-up-for-different-apps
[SER-2173] Push: apns credentials being mixed up for different apps
2 parents 04027a8 + bb129c8 commit 77308b2

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

CHANGELOG.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
## Version 24.05.XX
2+
Fixes:
3+
- [push] Fixed bug where IOS credentials get mixed up while sending messages from different apps at the same time
4+
- [push] Fixed bug where it crashes in connection pool growth because of a type mismatch in an if condition
25

36
Dependencies:
4-
- Bump puppeteer from 23.8.0 to 23.9.0
5-
- Bump nodemailer from 6.9.15 to 6.9.16
7+
- Bump countly-sdk-nodejs from 22.6.0 to 24.10.0
68
- Bump countly-sdk-web from 24.4.1 to 24.11.0
7-
- Bump tslib from 2.7.0 to 2.8.1
89
- Bump form-data from 4.0.0 to 4.0.1
910
- Bump jimp from 0.22.12 to 1.6.0
1011
- Bump jsdoc from 4.0.3 to 4.0.4
11-
- Bump countly-sdk-nodejs from 22.6.0 to 24.10.0
12+
- Bump nodemailer from 6.9.15 to 6.9.16
13+
- Bump puppeteer from 23.8.0 to 23.9.0
14+
- Bump tslib from 2.7.0 to 2.8.1
1215

1316
## Version 24.05.19
1417
Fixes:

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
/**

plugins/push/api/send/pool.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ class Pool extends Duplex {
290290
let unsent = this.state.messages().filter(m => mids.indexOf(m._id.toString()) === -1);
291291
if (unsent.length) {
292292
this.log.i('Sending unsent messages to %s: %j', connection.worker.threadId, unsent);
293-
connection.write(encode(FRAME.CONNECT, unsent.map(id => this.state.messages().filter(m => m._id.toString() === id)[0])));
293+
connection.write(encode(FRAME.CONNECT, unsent.map(_m => this.state.messages().filter(m => m._id.toString() === _m._id.toString())[0])));
294294
}
295295
return connection;
296296
}

0 commit comments

Comments
 (0)