Skip to content

Commit 33d62f9

Browse files
authored
Merge branch 'master' into dependabot/npm_and_yarn/express-4.21.2
2 parents ab2acea + c5c9912 commit 33d62f9

File tree

4 files changed

+36
-27
lines changed

4 files changed

+36
-27
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:

frontend/express/public/javascripts/countly/countly.event.js

+26-21
Original file line numberDiff line numberDiff line change
@@ -89,29 +89,34 @@
8989
}))
9090
.then(
9191
function() {
92-
return $.when($.ajax({
93-
type: "GET",
94-
url: countlyCommon.API_PARTS.data.r,
95-
data: {
96-
"app_id": countlyCommon.ACTIVE_APP_ID,
97-
"method": "events",
98-
"event": _activeEvent,
99-
"segmentation": currentActiveSegmentation,
100-
"period": _period,
101-
"preventRequestAbort": true
102-
},
103-
dataType: "json",
104-
success: function(json) {
105-
if (currentActiveEvent === _activeEvent && currentActiveSegmentation === _activeSegmentation) {
106-
_activeLoadedEvent = _activeEvent;
107-
_activeLoadedSegmentation = _activeSegmentation;
108-
_activeEventDb = json;
109-
setMeta();
92+
if (_activeEvent) {
93+
return $.when($.ajax({
94+
type: "GET",
95+
url: countlyCommon.API_PARTS.data.r,
96+
data: {
97+
"app_id": countlyCommon.ACTIVE_APP_ID,
98+
"method": "events",
99+
"event": _activeEvent,
100+
"segmentation": currentActiveSegmentation,
101+
"period": _period,
102+
"preventRequestAbort": true
103+
},
104+
dataType: "json",
105+
success: function(json) {
106+
if (currentActiveEvent === _activeEvent && currentActiveSegmentation === _activeSegmentation) {
107+
_activeLoadedEvent = _activeEvent;
108+
_activeLoadedSegmentation = _activeSegmentation;
109+
_activeEventDb = json;
110+
setMeta();
111+
}
110112
}
111-
}
112-
})).then(function() {
113+
})).then(function() {
114+
return true;
115+
});
116+
}
117+
else {
113118
return true;
114-
});
119+
}
115120
}
116121
);
117122
}

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)