Skip to content

Commit 5edf549

Browse files
authored
Merge pull request #7489 from Countly/codex/merge-master-into-next-20260416
Codex/merge master into next 20260416
2 parents 303f22f + 7ba0675 commit 5edf549

45 files changed

Lines changed: 1623 additions & 1336 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ jobs:
4848
uses: actions/checkout@v6
4949

5050
- name: Log in to Docker Hub
51-
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2
51+
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121
5252
with:
5353
username: ${{ secrets.DOCKERHUB_USERNAME }}
5454
password: ${{ secrets.DOCKERHUB_TOKEN }}
5555

5656
- name: Build and push Docker image
57-
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294
57+
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f
5858
with:
5959
push: true
6060
file: ./Dockerfile-core

.github/workflows/docker-image.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ jobs:
2626
echo ${{ steps.vars.outputs.tag }}
2727
2828
- name: Log in to Docker Hub
29-
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2
29+
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121
3030
with:
3131
username: ${{ secrets.DOCKERHUB_USERNAME }}
3232
password: ${{ secrets.DOCKERHUB_TOKEN }}
3333

3434
- name: Build and push Docker image
35-
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294
35+
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f
3636
with:
3737
context: .
3838
push: true
@@ -57,13 +57,13 @@ jobs:
5757
echo ${{ steps.vars.outputs.tag }}
5858
5959
- name: Log in to Docker Hub
60-
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2
60+
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121
6161
with:
6262
username: ${{ secrets.DOCKERHUB_USERNAME }}
6363
password: ${{ secrets.DOCKERHUB_TOKEN }}
6464

6565
- name: Build and push Docker image
66-
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294
66+
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f
6767
with:
6868
push: true
6969
file: ./Dockerfile-api
@@ -88,13 +88,13 @@ jobs:
8888
echo ${{ steps.vars.outputs.tag }}
8989
9090
- name: Log in to Docker Hub
91-
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2
91+
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121
9292
with:
9393
username: ${{ secrets.DOCKERHUB_USERNAME }}
9494
password: ${{ secrets.DOCKERHUB_TOKEN }}
9595

9696
- name: Build and push Docker image
97-
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294
97+
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f
9898
with:
9999
push: true
100100
file: ./Dockerfile-frontend
@@ -119,13 +119,13 @@ jobs:
119119
echo ${{ steps.vars.outputs.tag }}
120120
121121
- name: Log in to Docker Hub
122-
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2
122+
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121
123123
with:
124124
username: ${{ secrets.DOCKERHUB_USERNAME }}
125125
password: ${{ secrets.DOCKERHUB_TOKEN }}
126126

127127
- name: Build and push Docker image
128-
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294
128+
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f
129129
with:
130130
push: true
131131
file: ./Dockerfile-core

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
11
## Version 25.03.X
2+
Enterprise Fixes:
3+
- [flow] Optimize timeline period query
4+
5+
Dependencies:
6+
- Bump follow-redirects from 1.15.11 to 1.16.0
7+
- Bump get-random-values from 4.1.1 to 4.1.2
8+
- Revert @vitejs/plugin-legacy from 8.0.1 to 7.2.1
9+
10+
## Version 25.03.42
211
Fixes:
12+
- [alerts] Fixed alert jobs using system's timezone instead of application's
313
- [core] Fixed duplicate conditional in form field template
414

15+
Enterprise Fixes:
16+
- [data-manager] Fix notification message after editing user property
17+
- [white-labeling] Update newsletter setting description
18+
19+
Dependencies:
20+
- Bump @vitejs/plugin-legacy from 7.2.1 to 8.0.1
21+
- Bump ejs from 5.0.1 to 5.0.2
22+
- Bump node-forge from 1.3.3 to 1.4.0 in /plugins/push
23+
524
## Version 25.03.41
625
Fixes:
726
- [push] Fix: Cannot create a push notification when configuration _id is a string
@@ -10,6 +29,26 @@ Fixes:
1029
Enterprise Fixes:
1130
- [journeys] Fix: prevent users entered stat to minus value for race conditions
1231
- [surveys] Fixed widget asset path with subdirectory
32+
- [journey-engin] Added new image handling mechanism for modal and half-modal content blocks
33+
34+
Dependencies:
35+
- Bump axios from 1.13.5 to 1.15.0
36+
- Bump basic-ftp from 5.2.0 to 5.2.1
37+
- Bump brace-expansion from 1.1.12 to 1.1.13
38+
- Bump brace-expansion from 2.0.2 to 2.0.3 in /plugins/hooks
39+
- Bump cypress from 15.13.0 to 15.13.1 in /ui-tests
40+
- Bump docker/login-action from 4.0.0 to 4.1.0 in the actions group
41+
- Bump file-type and jimp
42+
- Bump lodash from 4.17.23 to 4.18.1
43+
- Bump nodemailer from 8.0.2 to 8.0.5
44+
- Bump path-to-regexp from 0.1.12 to 0.1.13
45+
- Bump pdfjs-dist from 5.5.207 to 5.6.205 in /ui-tests
46+
- Bump picomatch from 4.0.3 to 4.0.4
47+
- Bump rate-limiter-flexible from 9.1.1 to 11.0.0
48+
- Bump sass from 1.98.0 to 1.99.0
49+
- Bump sass-embedded from 1.98.0 to 1.99.0
50+
- Bump swiper from 12.1.2 to 12.1.3
51+
- Bump vite from 7.3.1 to 7.3.2
1352

1453
## Version 25.03.40
1554
Fixes:

Dockerfile-core

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ USER root
2525
WORKDIR /opt/countly
2626
COPY . .
2727

28-
RUN useradd -r -M -U -d /opt/countly -s /bin/false countly && \
28+
RUN sed -i 's|http://|https://|g' /etc/apt/sources.list && \
29+
find /etc/apt/sources.list.d -name '*.list' -exec sed -i 's|http://|https://|g' {} + || true && \
30+
echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries && \
31+
useradd -r -M -U -d /opt/countly -s /bin/false countly && \
2932
apt-get update && \
3033
apt-get install -y \
3134
# standard

api/parts/data/exports.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,15 @@ exports.output = function(params, data, filename, type) {
208208

209209
if (type === "xlsx" || type === "xls") { //we have stream
210210
params.res.writeHead(200, headers);
211+
data.on("error", function(streamErr) {
212+
common.log("exports").e(streamErr);
213+
if (!params.res.headersSent) {
214+
common.returnMessage(params, 500, "Export stream error");
215+
}
216+
else {
217+
params.res.end();
218+
}
219+
});
211220
data.pipe(params.res);
212221
//common.returnRaw(params, 200, new Buffer(data, 'binary'), headers);
213222
}
@@ -403,6 +412,15 @@ exports.stream = function(params, stream, options) {
403412
else if (type === 'xlsx' || type === 'xls') {
404413
options.streamOptions.transform = transformFunction;
405414
var xc = new XLSXTransformStream();
415+
xc.on("error", function(streamErr) {
416+
common.log("exports").e(streamErr);
417+
if (!params.res.headersSent) {
418+
common.returnMessage(params, 500, "Export stream error");
419+
}
420+
else {
421+
params.res.end();
422+
}
423+
});
406424
xc.pipe(params.res);
407425
if (listAtEnd === false) {
408426
xc.write(paramList);

api/utils/common.js

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const mongodb = require('mongodb');
2525
const getRandomValues = require('get-random-values');
2626
const semver = require('semver');
2727
const _ = require('lodash');
28+
const path = require('path');
2829

2930
var matchHtmlRegExp = /"|'|&(?!amp;|quot;|#39;|lt;|gt;|#46;|#36;)|<|>/;
3031
var matchLessHtmlRegExp = /[<>]/;
@@ -2345,9 +2346,9 @@ common.clearClashingQueryOperations = function(query) {
23452346
}
23462347
}
23472348

2348-
for (var path in map) {
2349-
if (map[path] > 1) {
2350-
badPaths.push(path);
2349+
for (var fieldPath in map) {
2350+
if (map[fieldPath] > 1) {
2351+
badPaths.push(fieldPath);
23512352
}
23522353
}
23532354
if (badPaths.length > 0) {
@@ -2819,6 +2820,25 @@ common.sanitizeFilename = (filename, replacement = "") => {
28192820
.replace(/^\.+/, replacement);
28202821
};
28212822

2823+
/**
2824+
* Resolve an input path under a base directory and reject path traversal.
2825+
* @param {string} basePath - base directory for allowed paths
2826+
* @param {string} inputPath - user-supplied path segment or relative path
2827+
* @returns {string|null} contained absolute path or null
2828+
*/
2829+
common.resolvePathInBase = (basePath, inputPath) => {
2830+
basePath = path.resolve(basePath + "");
2831+
inputPath = (inputPath + "").replace(/\\/g, "/");
2832+
while (inputPath.indexOf("/") === 0) {
2833+
inputPath = inputPath.substring(1);
2834+
}
2835+
let resolvedPath = path.resolve(basePath, inputPath);
2836+
if (resolvedPath === basePath || resolvedPath.indexOf(basePath + path.sep) === 0) {
2837+
return resolvedPath;
2838+
}
2839+
return null;
2840+
};
2841+
28222842
common.sanitizeHTML = (html, extendedWhitelist) => {
28232843
const whiteList = {
28242844
a: ["target", "title"],
@@ -3499,4 +3519,4 @@ common.trimWhitespaceStartEnd = function(value) {
34993519
};
35003520

35013521
/** @type {import('../../types/common').Common} */
3502-
module.exports = common;
3522+
module.exports = common;

api/utils/requestProcessor.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,6 +1683,15 @@ const processRequest = (params) => {
16831683
common.returnMessage(params, 400, "Export doesn't exist");
16841684
}
16851685
else {
1686+
stream.on("error", function(streamErr) {
1687+
log.e(streamErr);
1688+
if (!params.res.headersSent) {
1689+
common.returnMessage(params, 500, "Export stream error");
1690+
}
1691+
else {
1692+
params.res.end();
1693+
}
1694+
});
16861695
params.res.writeHead(200, {
16871696
'Content-Type': 'application/x-gzip',
16881697
'Content-Length': size,
@@ -2260,6 +2269,15 @@ const processRequest = (params) => {
22602269
common.returnMessage(params, 400, "Export stream does not exist");
22612270
}
22622271
else {
2272+
stream.on("error", function(streamErr) {
2273+
log.e(streamErr);
2274+
if (!params.res.headersSent) {
2275+
common.returnMessage(params, 500, "Export stream error");
2276+
}
2277+
else {
2278+
params.res.end();
2279+
}
2280+
});
22632281
headers = {};
22642282
headers["Content-Type"] = countlyApi.data.exports.getType(type);
22652283
headers["Content-Disposition"] = "attachment;filename=" + encodeURIComponent(filename);

bin/countly.install_rhel.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ if [[ "$CENTOS_MAJOR" = "9" ]]; then
5353
else
5454
curl -L -O -J "https://box.tools.count.ly/public.php/dav/files/Wj8opzNdyE5DyDX/?accept=zip"
5555
sudo yum install -y raven-release.el8.noarch.rpm
56-
sudo yum install -y ipa-gothic-fonts
5756
fi
5857

5958
#Install dependancies required by the puppeteer

bin/scripts/device_list/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)