Skip to content

Commit a33f060

Browse files
Merge pull request #6454 from Countly/master-v25.04.11-into-next
Update Next with Master v25.04.11
2 parents ca46845 + 759344b commit a33f060

File tree

80 files changed

+1450
-2429
lines changed

Some content is hidden

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

80 files changed

+1450
-2429
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,6 @@ updates:
174174
- dependencies
175175
versioning-strategy: increase-if-necessary
176176

177-
- package-ecosystem: npm
178-
directory: "/plugins/enterpriseinfo"
179-
schedule:
180-
interval: daily
181-
open-pull-requests-limit: 10
182-
labels:
183-
- dependencies
184-
versioning-strategy: increase-if-necessary
185-
186177
- package-ecosystem: npm
187178
directory: "/plugins/errorlogs"
188179
schedule:

.github/workflows/release_notice.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
run: echo "$GITHUB_CONTEXT"
1515
- name: Send custom JSON data to Slack workflow
1616
id: slack
17-
uses: slackapi/[email protected].0
17+
uses: slackapi/[email protected].1
1818
with:
1919
# This data can be any valid JSON from a previous step in the GitHub Action
2020
payload: |

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,49 @@
22
Dependencies:
33
- Remove SQLite
44

5+
## Version 25.03.11
6+
Fixes:
7+
- [core] Fix mongo connection url parsing
8+
- [core] Fix user analytics widget chart
9+
- [crashes] Fix free session and free user calculation
10+
- [dashboards] Delete associated widgets and reports when a dashboard is removed
11+
- [star-rating] Fix widget close post message
12+
13+
Enterprise Fixes:
14+
- [crash_symbolication] Remove auto symbolication setting
15+
- [drill] Fix drill meta get filter
16+
- [flows] Null checks on $size when calculating flows.
17+
- [surveys] Fix widget close post message
18+
19+
Dependencies:
20+
- Bump eslint-plugin-vue from 10.2.0 to 10.3.0
21+
- Bump form-data from 4.0.0 to 4.0.4 in /plugins/hooks
22+
- Bump nodemailer from 7.0.3 to 7.0.5
23+
- Bump on-headers and express-session
24+
- Bump puppeteer from 24.10.1 to 24.14.0
25+
- Bump sharp from 0.34.2 to 0.34.3
26+
- Bump supertest from 7.1.1 to 7.1.3
27+
28+
## Version 25.03.10
29+
Enterprise Fixes:
30+
- [okta] Fix body parser middleware version mismatch causing OKTA authentication break
31+
32+
## Version 25.03.9
33+
Features:
34+
- [core] Added support for prerelease and build fields in app version parsing
35+
36+
Fixes:
37+
- [core] Set up default headers for common return methods
38+
- [star-rating] Fix widget close button
39+
40+
Enterprise Fixes:
41+
- [active_directory] Fix for reading azure application tenant id from config
42+
- [active_directory] Fix for handling azure ad callback properly when request body empty
43+
- [drill] Disabling the view user profiles button on drill for queries going to the report manager
44+
- [drill] Fixed typo issue while getting segment values in drill widgets
45+
- [journeys] Fixed the issue where events added in Journey couldn't have their visibility updated in Data Manager plugin
46+
- [surveys] Fix widget close button
47+
548
## Version 25.03.8
649
Fixes:
750
- [core] Fix adding llm observability to cly-event-select component

Dockerfile-api

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,vi
66

77
ARG GEOIP=empty
88
EXPOSE 3001
9-
HEALTHCHECK --start-period=400s CMD curl --fail http://localhost:3001/o/ping || exit 1
9+
HEALTHCHECK --start-period=400s CMD bash -c '\
10+
if [ "$COUNTLY_CONFIG_API_API_SSL_ENABLED" = "true" ] || [ "$COUNTLY_CONFIG_API_API_SSL_ENABLED" = "\"true\"" ]; then \
11+
curl -k --fail https://localhost:3001/o/ping || exit 1; \
12+
else \
13+
curl --fail http://localhost:3001/o/ping || exit 1; \
14+
fi'
1015

1116
USER root
1217

Dockerfile-centos-api

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,vi
66

77
ARG GEOIP=empty
88
EXPOSE 3001
9-
HEALTHCHECK --start-period=400s CMD curl --fail http://localhost:3001/o/ping || exit 1
9+
HEALTHCHECK --start-period=400s CMD bash -c '\
10+
if [ "$COUNTLY_CONFIG_API_API_SSL_ENABLED" = "true" ] || [ "$COUNTLY_CONFIG_API_API_SSL_ENABLED" = "\"true\"" ]; then \
11+
curl -k --fail https://localhost:3001/o/ping || exit 1; \
12+
else \
13+
curl --fail http://localhost:3001/o/ping || exit 1; \
14+
fi'
1015

1116
USER root
1217

Dockerfile-centos-frontend

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,vi
55
#ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,license,drill,funnels,retention_segments,flows,cohorts,surveys,remote-config,ab-testing,formulas,activity-map,concurrent_users,revenue,logger,systemlogs,populator,reports,crashes,push,geo,block,users,star-rating,slipping-away-users,compare,server-stats,dbviewer,crash_symbolication,crashes-jira,groups,white-labeling,alerts,times-of-day,compliance-hub,onboarding,active_users,performance-monitoring,config-transfer,consolidate,data-manager,hooks,dashboards,heatmaps,sdk,guides,journey_engine,content
66

77
EXPOSE 6001
8-
HEALTHCHECK --start-period=400s CMD curl --fail http://localhost:6001/ping || exit 1
8+
HEALTHCHECK --start-period=400s CMD bash -c '\
9+
if [ "$COUNTLY_CONFIG_FRONTEND_WEB_SSL_ENABLED" = "true" ] || [ "$COUNTLY_CONFIG_FRONTEND_WEB_SSL_ENABLED" = "\"true\"" ]; then \
10+
curl -k --fail https://localhost:6001/ping || exit 1; \
11+
else \
12+
curl --fail http://localhost:6001/ping || exit 1; \
13+
fi'
914

1015
USER root
1116

Dockerfile-frontend

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,vi
55
#ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,license,drill,funnels,retention_segments,flows,cohorts,surveys,remote-config,ab-testing,formulas,activity-map,concurrent_users,revenue,logger,systemlogs,populator,reports,crashes,push,geo,block,users,star-rating,slipping-away-users,compare,server-stats,dbviewer,crash_symbolication,crashes-jira,groups,white-labeling,alerts,times-of-day,compliance-hub,onboarding,active_users,performance-monitoring,config-transfer,consolidate,data-manager,hooks,dashboards,heatmaps,sdk,guides,journey_engine,content
66

77
EXPOSE 6001
8-
HEALTHCHECK --start-period=400s CMD curl --fail http://localhost:6001/ping || exit 1
8+
HEALTHCHECK --start-period=400s CMD bash -c '\
9+
if [ "$COUNTLY_CONFIG_FRONTEND_WEB_SSL_ENABLED" = "true" ] || [ "$COUNTLY_CONFIG_FRONTEND_WEB_SSL_ENABLED" = "\"true\"" ]; then \
10+
curl -k --fail https://localhost:6001/ping || exit 1; \
11+
else \
12+
curl --fail http://localhost:6001/ping || exit 1; \
13+
fi'
914

1015
USER root
1116

@@ -19,6 +24,7 @@ ENV COUNTLY_CONTAINER="frontend" \
1924

2025
WORKDIR /opt/countly
2126
COPY . .
27+
2228
# install required dependencies which slim image doesn't have
2329
RUN apt-get update && \
2430
apt-get install -y iputils-ping net-tools telnet apt-transport-https procps curl wget git make gcc g++ unzip xz-utils

api/config.sample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ var countlyConfig = {
7373
enabled: false,
7474
key: "/path/to/ssl/private.key",
7575
cert: "/path/to/ssl/certificate.crt",
76-
ca: "/path/to/ssl/ca_bundle.crt" // Optional: for client certificate verification
76+
// ca: "/path/to/ssl/ca_bundle.crt" // Optional: for client certificate verification, uncomment to activate
7777
}
7878
},
7979
/**

api/parts/data/usage.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,16 @@ plugins.register("/sdk/user_properties", async function(ob) {
11171117
userProps.av_major = versionComponents.major;
11181118
userProps.av_minor = versionComponents.minor;
11191119
userProps.av_patch = versionComponents.patch;
1120+
userProps.av_prerel = versionComponents.prerelease;
1121+
userProps.av_build = versionComponents.build;
1122+
}
1123+
else {
1124+
log.w("Invalid app version format: %s", params.qstring.metrics._app_version);
1125+
userProps.av_major = null;
1126+
userProps.av_minor = null;
1127+
userProps.av_patch = null;
1128+
userProps.av_rel = null;
1129+
userProps.av_build = null;
11201130
}
11211131
}
11221132
}

api/utils/common.js

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ function escape_html_entities(key, value, more) {
176176
common.getJSON = getJSON;
177177

178178
common.log = logger;
179+
const log = logger('api:utils:common');
179180

180181
common.dbMap = {
181182
'events': 'e',
@@ -1307,16 +1308,23 @@ common.returnRaw = function(params, returnCode, body, heads) {
13071308
}
13081309
return;
13091310
}
1311+
const defaultHeaders = {};
13101312
//set provided in configuration headers
1311-
var headers = {};
1313+
let headers = {};
13121314
if (heads) {
13131315
for (var i in heads) {
13141316
headers[i] = heads[i];
13151317
}
13161318
}
13171319
if (params && params.res && params.res.writeHead && !params.blockResponses) {
13181320
if (!params.res.finished) {
1319-
params.res.writeHead(returnCode, headers);
1321+
try {
1322+
params.res.writeHead(returnCode, headers);
1323+
}
1324+
catch (err) {
1325+
log.e(`Error writing header in 'returnRaw' ${err}`);
1326+
params.res.writeHead(returnCode, defaultHeaders);
1327+
}
13201328
if (body) {
13211329
params.res.write(body);
13221330
}
@@ -1347,9 +1355,10 @@ common.returnMessage = function(params, returnCode, message, heads, noResult = f
13471355
return;
13481356
}
13491357
//set provided in configuration headers
1350-
var headers = {
1358+
const defaultHeaders = {
13511359
'Content-Type': 'application/json; charset=utf-8'
13521360
};
1361+
let headers = { ...defaultHeaders };
13531362
var add_headers = (plugins.getConfig("security").api_additional_headers || "").replace(/\r\n|\r|\n/g, "\n").split("\n");
13541363
var parts;
13551364
for (let i = 0; i < add_headers.length; i++) {
@@ -1373,7 +1382,13 @@ common.returnMessage = function(params, returnCode, message, heads, noResult = f
13731382
}
13741383
if (params && params.res && params.res.writeHead && !params.blockResponses) {
13751384
if (!params.res.finished) {
1376-
params.res.writeHead(returnCode, headers);
1385+
try {
1386+
params.res.writeHead(returnCode, headers);
1387+
}
1388+
catch (err) {
1389+
log.e(`Error writing header in 'returnMessage' ${err}`);
1390+
params.res.writeHead(returnCode, defaultHeaders);
1391+
}
13771392
if (params.qstring.callback) {
13781393
params.res.write(params.qstring.callback + '(' + JSON.stringify({result: message}, escape_html_entities) + ')');
13791394
}
@@ -1415,9 +1430,10 @@ common.returnOutput = function(params, output, noescape, heads) {
14151430
return;
14161431
}
14171432
//set provided in configuration headers
1418-
var headers = {
1433+
const defaultHeaders = {
14191434
'Content-Type': 'application/json; charset=utf-8'
14201435
};
1436+
let headers = { ...defaultHeaders };
14211437
var add_headers = (plugins.getConfig("security").api_additional_headers || "").replace(/\r\n|\r|\n/g, "\n").split("\n");
14221438
var parts;
14231439
for (let i = 0; i < add_headers.length; i++) {
@@ -1442,7 +1458,13 @@ common.returnOutput = function(params, output, noescape, heads) {
14421458
}
14431459
if (params && params.res && params.res.writeHead && !params.blockResponses) {
14441460
if (!params.res.finished) {
1445-
params.res.writeHead(200, headers);
1461+
try {
1462+
params.res.writeHead(200, headers);
1463+
}
1464+
catch (err) {
1465+
log.e(`Error writing header in 'returnMessage' ${err}`);
1466+
params.res.writeHead(200, defaultHeaders);
1467+
}
14461468
if (params.qstring.callback) {
14471469
params.res.write(params.qstring.callback + '(' + JSON.stringify(output, escape) + ')');
14481470
}
@@ -2069,19 +2091,16 @@ common.parseAppVersion = function(version) {
20692091
version = String(version);
20702092
}
20712093

2072-
// Ensure version has at least one decimal point
2073-
if (version.indexOf('.') === -1) {
2074-
version += '.0';
2075-
}
2076-
2077-
const parsedVersion = semver.valid(semver.coerce(version));
2078-
if (parsedVersion) {
2079-
const versionObj = semver.parse(parsedVersion);
2094+
const isValid = semver.valid(semver.coerce(version, {includePrerelease: true}));
2095+
if (isValid) {
2096+
const versionObj = semver.parse(semver.coerce(version, {includePrerelease: true}));
20802097
if (versionObj) {
20812098
return {
20822099
major: versionObj.major,
20832100
minor: versionObj.minor,
20842101
patch: versionObj.patch,
2102+
prerelease: versionObj.prerelease,
2103+
build: versionObj.build,
20852104
original: version,
20862105
success: true
20872106
};

0 commit comments

Comments
 (0)