From 7d55390963ef849367c0e0ee8447499466fa45ae Mon Sep 17 00:00:00 2001 From: Cihad Tekin Date: Fri, 10 Jan 2025 12:17:08 +0300 Subject: [PATCH 1/9] [core] Cannot load event data when there's an escaped character in all events list --- CHANGELOG.md | 1 + .../public/core/events/javascripts/countly.details.models.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87fc03fadee..7c0eb76adc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Version xx.xx.xx Fixes: +- [core] Fixed a bug causing events to not being loaded when there's an escaped character in the event name - [gridfs] fixes for moving to Promises Dependencies: diff --git a/frontend/express/public/core/events/javascripts/countly.details.models.js b/frontend/express/public/core/events/javascripts/countly.details.models.js index 0655fa7a4e7..eb7d8b1fb7a 100644 --- a/frontend/express/public/core/events/javascripts/countly.details.models.js +++ b/frontend/express/public/core/events/javascripts/countly.details.models.js @@ -886,6 +886,9 @@ return countlyAllEvents.service.fetchAllEventsData(context, period) .then(function(res) { if (res) { + if (Array.isArray(res.list)) { + res.list = res.list.map(eventName => _.unescape(eventName).replace(/'/g, "'")); + } context.commit("setAllEventsData", res); if ((!context.state.selectedEventName) || (res.map && res.map[context.state.selectedEventName] && !res.map[context.state.selectedEventName].is_visible) || (res.list && res.list.indexOf(context.state.selectedEventName) === -1)) { var appId = countlyCommon.ACTIVE_APP_ID; From 2b83fd071dfce906d80cfc369c6c41c7881eb387 Mon Sep 17 00:00:00 2001 From: Cihad Tekin Date: Fri, 10 Jan 2025 12:44:13 +0300 Subject: [PATCH 2/9] [core] Replaced _.unescape with countlyCommon.unescapeHtml --- .../public/core/events/javascripts/countly.details.models.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/express/public/core/events/javascripts/countly.details.models.js b/frontend/express/public/core/events/javascripts/countly.details.models.js index eb7d8b1fb7a..4b22ff19ae2 100644 --- a/frontend/express/public/core/events/javascripts/countly.details.models.js +++ b/frontend/express/public/core/events/javascripts/countly.details.models.js @@ -887,7 +887,7 @@ .then(function(res) { if (res) { if (Array.isArray(res.list)) { - res.list = res.list.map(eventName => _.unescape(eventName).replace(/'/g, "'")); + res.list = res.list.map(eventName => countlyCommon.unescapeHtml(eventName)); } context.commit("setAllEventsData", res); if ((!context.state.selectedEventName) || (res.map && res.map[context.state.selectedEventName] && !res.map[context.state.selectedEventName].is_visible) || (res.list && res.list.indexOf(context.state.selectedEventName) === -1)) { From 9497685f309427ef2a4da557a4c2c8101d2e9874 Mon Sep 17 00:00:00 2001 From: Cihad Tekin Date: Mon, 13 Jan 2025 11:55:57 +0300 Subject: [PATCH 3/9] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0e1f5a3385..f25d232a7d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Fixes: - [gridfs] fixes for moving to Promises +- [surveys] "Select one" text in the widget can be edited now Dependencies: - Bump sass from 1.81.0 to 1.83.1 From 2b28e35bdd687ddf7b502cb749fab2edcf4492c6 Mon Sep 17 00:00:00 2001 From: Cihad Tekin Date: Mon, 13 Jan 2025 15:39:27 +0300 Subject: [PATCH 4/9] [system-utility] better error handling when there's no profiler file --- plugins/system-utility/api/api.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/plugins/system-utility/api/api.js b/plugins/system-utility/api/api.js index f5e956ea63c..6711909080f 100644 --- a/plugins/system-utility/api/api.js +++ b/plugins/system-utility/api/api.js @@ -209,12 +209,17 @@ function stopWithTimeout(type, fromTimeout = false) { validate(params, async() => { try { const tarStream = await systemUtility.profilerFilesTarStream(); - params.res.writeHead(200, { - "Content-Type": "plain/text; charset=utf-8", - "Content-Disposition": "attachment; filename=profiler.tar" - }); - tarStream.on("end", () => params.res.end()); - tarStream.pipe(params.res); + if (tarStream === null) { + common.returnMessage(params, 404, "Profiler files not found"); + } + else { + params.res.writeHead(200, { + "Content-Type": "plain/text; charset=utf-8", + "Content-Disposition": "attachment; filename=profiler.tar" + }); + tarStream.on("end", () => params.res.end()); + tarStream.pipe(params.res); + } } catch (err) { log.e(err); From 7ba6fe03314a7a87dfb20be887b51ee8e84b2a77 Mon Sep 17 00:00:00 2001 From: Cihad Tekin Date: Mon, 13 Jan 2025 15:43:30 +0300 Subject: [PATCH 5/9] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0e1f5a3385..bc95438063d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Fixes: - [gridfs] fixes for moving to Promises +- [system-utility] Fixed: Mongo error (code: 26) in some Countly instances when the profiler gets run for the first time Dependencies: - Bump sass from 1.81.0 to 1.83.1 From a4bab7adae313d4feb35a2a5537fc69acc185de8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 01:42:58 +0000 Subject: [PATCH 6/9] Bump sass from 1.83.1 to 1.83.3 Bumps [sass](https://github.com/sass/dart-sass) from 1.83.1 to 1.83.3. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.83.1...1.83.3) --- updated-dependencies: - dependency-name: sass dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index f5dbcd3406c..d2d56a6df18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -60,7 +60,7 @@ "offline-geocoder": "git+https://github.com/Countly/offline-geocoder.git", "properties-parser": "0.6.0", "puppeteer": "^23.8.0", - "sass": "1.83.1", + "sass": "1.83.3", "tslib": "^2.6.3", "uglify-js": "3.19.3", "underscore": "1.13.7", @@ -11202,9 +11202,9 @@ "license": "MIT" }, "node_modules/sass": { - "version": "1.83.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.83.1.tgz", - "integrity": "sha512-EVJbDaEs4Rr3F0glJzFSOvtg2/oy2V/YrGFPqPY24UqcLDWcI9ZY5sN+qyO3c/QCZwzgfirvhXvINiJCE/OLcA==", + "version": "1.83.3", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.83.3.tgz", + "integrity": "sha512-t4gb+nTrUeaPb+xzdqDmaMyi8evP0QuUB8o57dYHZF/lIGniqZ/PR/iWGcWoS8vr46F9V7buXFv290fMV6vTIQ==", "dependencies": { "chokidar": "^4.0.0", "immutable": "^5.0.2", diff --git a/package.json b/package.json index 625cd3962e8..8bc1f0fe23e 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "offline-geocoder": "git+https://github.com/Countly/offline-geocoder.git", "properties-parser": "0.6.0", "puppeteer": "^23.8.0", - "sass": "1.83.1", + "sass": "1.83.3", "tslib": "^2.6.3", "uglify-js": "3.19.3", "underscore": "1.13.7", From acddd8b3a658e260f69744134e2876993764c49d Mon Sep 17 00:00:00 2001 From: John-Weak Date: Tue, 14 Jan 2025 13:54:19 +0530 Subject: [PATCH 7/9] [SER-2266][reports][fix] Allows report generation by bypassing the SSL error. --- CHANGELOG.md | 1 + api/utils/render.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eaecbece72..4f8a48fca2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Fixes: - [gridfs] fixes for moving to Promises - [system-utility] Fixed: Mongo error (code: 26) in some Countly instances when the profiler gets run for the first time - [surveys] "Select one" text in the widget can be edited now +- [reports] Fixes report generation failure due to SSL error Dependencies: - Bump sass from 1.81.0 to 1.83.1 diff --git a/api/utils/render.js b/api/utils/render.js index ba65f9d11cc..ee01d946878 100644 --- a/api/utils/render.js +++ b/api/utils/render.js @@ -67,7 +67,7 @@ exports.renderView = function(options, cb) { XDG_CONFIG_HOME: pathModule.resolve(__dirname, "../../.cache/chrome/tmp/.chromium"), XDG_CACHE_HOME: pathModule.resolve(__dirname, "../../.cache/chrome/tmp/.chromium") }, - args: ['--no-sandbox', '--disable-setuid-sandbox'], + args: ['--no-sandbox', '--disable-setuid-sandbox', '--ignore-certificate-errors'], ignoreHTTPSErrors: true, userDataDir: pathModule.resolve(__dirname, "../../dump/chrome") }; From e449a838dea96bc306535b84fcb2ea8790985832 Mon Sep 17 00:00:00 2001 From: John-Weak Date: Tue, 14 Jan 2025 14:00:11 +0530 Subject: [PATCH 8/9] changelog sorting --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f8a48fca2f..9f9cae2dc6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,10 @@ Fixes: - [core] Fixed a bug causing events to not being loaded when there's an escaped character in the event name - [gridfs] fixes for moving to Promises -- [system-utility] Fixed: Mongo error (code: 26) in some Countly instances when the profiler gets run for the first time -- [surveys] "Select one" text in the widget can be edited now - [reports] Fixes report generation failure due to SSL error +- [surveys] "Select one" text in the widget can be edited now +- [system-utility] Fixed: Mongo error (code: 26) in some Countly instances when the profiler gets run for the first time + Dependencies: - Bump sass from 1.81.0 to 1.83.1 From 58a6ecbd013cf9a6b5550072c525df91be0f71c2 Mon Sep 17 00:00:00 2001 From: Arturs Sosins Date: Tue, 14 Jan 2025 14:36:18 +0200 Subject: [PATCH 9/9] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f9cae2dc6a..fe69e3fe87b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ Fixes: Dependencies: -- Bump sass from 1.81.0 to 1.83.1 +- Bump sass from 1.81.0 to 1.83.3 - Bump countly-sdk-nodejs from 24.10.0 to 24.10.1 - Bump countly-sdk-web from 24.11.2 to 24.11.3 - Bump express-rate-limit from 7.4.1 to 7.5.0