Skip to content

Commit

Permalink
Merge pull request #5914 from Countly/release.24.12
Browse files Browse the repository at this point in the history
Release.24.12
  • Loading branch information
ArtursKadikis authored Jan 14, 2025
2 parents e4a67d6 + 9f7f5bd commit d38e71a
Show file tree
Hide file tree
Showing 43 changed files with 2,318 additions and 4,119 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Deploy
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master, next ]
branches: [ master, next, release.24.10, release.24.12 ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
pull_request:
branches: [ master, next, release.24.10 ]
branches: [ master, next, release.24.10, release.24.12 ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
## Version 24.12.x

Fixes:
- [push] Fixed bug where IOS credentials get mixed up while sending messages from different apps at the same time
- [push] Fixed bug where it crashes in connection pool growth because of a type mismatch in an if condition

Features:
- [user-management] Global admins can now disable 2FA for individual users

Fixes:
- [gridfs] fixes for moving to Promises

Dependencies:
- Bump express from 4.21.1 to 4.21.2
- Bump mocha from 10.2.0 to 10.8.2
- Bump sass from 1.81.0 to 1.83.1
- 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
- Bump puppeteer from 23.10.4 to 23.11.1

## Version 24.12
Features:
Expand Down Expand Up @@ -129,6 +141,27 @@ Enterprise Features:
- [users] UI improvements
- [views] Added a quick transition to drill

## Version 24.05.20
Fixes:
- [push] Fixed bug where IOS credentials get mixed up while sending messages from different apps at the same time
- [push] Fixed bug where it crashes in connection pool growth because of a type mismatch in an if condition

Security:
- [cohorts] Prevent query injection on cohort creation

Dependencies:
- Bump countly-sdk-nodejs from 22.6.0 to 24.10.0
- Bump countly-sdk-web from 24.4.1 to 24.11.0
- Bump express from 4.21.1 to 4.21.2
- Bump form-data from 4.0.0 to 4.0.1
- Bump jimp from 0.22.12 to 1.6.0
- Bump jsdoc from 4.0.3 to 4.0.4
- Bump mocha from 10.2.0 to 10.8.2
- Bump mongodb from 4.9.1 to 4.17.2
- Bump nodemailer from 6.9.15 to 6.9.16
- Bump puppeteer from 23.8.0 to 23.9.0
- Bump tslib from 2.7.0 to 2.8.1

## Version 24.05.19
Fixes:
- [dashboards] Fixing issue where dashboard widgets go into single column
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile-api
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:hydrogen-bullseye-slim
FROM node:iron-bookworm-slim

ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,times-of-day,compliance-hub,alerts,onboarding,consolidate,remote-config,hooks,dashboards,sdk,data-manager,guides
# Countly Enterprise:
Expand All @@ -25,15 +25,14 @@ COPY . .

# install required dependencies which slim image doesn't have
RUN apt-get update && \
apt-get install -y iputils-ping procps net-tools telnet apt-transport-https curl wget git python2 make gcc g++ unzip && \
ln -s /usr/bin/python2.7 /usr/bin/python
apt-get install -y iputils-ping procps net-tools telnet apt-transport-https curl wget git make gcc g++ unzip xz-utils

RUN apt-get update && \
apt-get upgrade -y && \
cd /usr/src && \
wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz && \
tar -xf Python-3.8.12.tar.xz && \
apt-get install -y build-essential sudo zlib1g-dev libssl1.1 libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev && \
apt-get install -y build-essential sudo zlib1g-dev libssl3 libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev && \
cd Python-3.8.12 && \
./configure --enable-optimizations --enable-shared && \
make && \
Expand All @@ -51,14 +50,15 @@ RUN curl -s -L -o /tmp/tini.deb "https://github.com/krallin/tini/releases/downlo
# preinstall
cp -n ./api/config.sample.js ./api/config.js && \
cp -n ./frontend/express/config.sample.js ./frontend/express/config.js && \
HOME=/tmp npm install -g npm@latest && \
HOME=/tmp npm install --unsafe-perm=true --allow-root && \
HOME=/tmp npm install argon2 --build-from-source --unsafe-perm=true --allow-root && \
./bin/docker/preinstall.sh && \
bash /opt/countly/bin/scripts/detect.init.sh && \
\
# cleanup & chown
npm remove -y --no-save mocha nyc should supertest && \
apt-get remove -y git gcc g++ make automake autoconf libtool pkg-config unzip sqlite3 && \
apt-get remove -y git gcc g++ make automake autoconf libtool pkg-config unzip sqlite3 wget && \
apt-get install -y libgbm-dev libgbm1 gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
rm -rf test /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* /var/log/* /root/.npm && \
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile-centos-api
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN yum update -y
RUN curl -s -L -o /tmp/tini.rpm "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.rpm" && \
rpm -i /tmp/tini.rpm && \
\
curl -sL https://rpm.nodesource.com/setup_18.x | bash - && \
curl -sL https://rpm.nodesource.com/setup_20.x | bash - && \
yum install -y nodejs python3.8 python2 python38-libs python38-devel python38-pip nss libdrm libgbm cyrus-sasl* && \
ln -s /usr/bin/node /usr/bin/nodejs && \
unlink /usr/bin/python3 && \
Expand All @@ -53,6 +53,7 @@ RUN curl -s -L -o /tmp/tini.rpm "https://github.com/krallin/tini/releases/downlo
# preinstall
cp -n ./api/config.sample.js ./api/config.js && \
cp -n ./frontend/express/config.sample.js ./frontend/express/config.js && \
HOME=/tmp npm install -g npm@latest && \
HOME=/tmp npm install --unsafe-perm=true --allow-root && \
HOME=/tmp npm install argon2 --build-from-source --unsafe-perm=true --allow-root && \
./bin/docker/preinstall.sh && \
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile-centos-frontend
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN yum update -y
RUN curl -s -L -o /tmp/tini.rpm "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.rpm" && \
rpm -i /tmp/tini.rpm && \
\
curl -sL https://rpm.nodesource.com/setup_18.x | bash - && \
curl -sL https://rpm.nodesource.com/setup_20.x | bash - && \
yum install -y nodejs python3.8 python2 python38-libs python38-devel python38-pip nss libdrm libgbm cyrus-sasl* && \
ln -s /usr/bin/node /usr/bin/nodejs && \
unlink /usr/bin/python3 && \
Expand All @@ -52,6 +52,7 @@ RUN curl -s -L -o /tmp/tini.rpm "https://github.com/krallin/tini/releases/downlo
cp -n ./frontend/express/public/javascripts/countly/countly.config.sample.js ./frontend/express/public/javascripts/countly/countly.config.js && \
cp -n ./frontend/express/config.sample.js ./frontend/express/config.js && \
cp -n ./api/config.sample.js ./api/config.js && \
HOME=/tmp npm install -g npm@latest && \
HOME=/tmp npm install --unsafe-perm=true --allow-root && \
HOME=/tmp npm install argon2 --build-from-source --unsafe-perm=true --allow-root && \
./bin/docker/preinstall.sh && \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-core
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RUN useradd -r -M -U -d /opt/countly -s /bin/false countly && \
gcc g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev \
libevent-dev libjansson-dev libjemalloc-dev cython python3-dev python-setuptools && \
# node
wget -qO- https://deb.nodesource.com/setup_18.x | bash - && \
wget -qO- https://deb.nodesource.com/setup_20.x | bash - && \
# data_migration (mongo clients)
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add - && \
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list && \
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile-frontend
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:hydrogen-bullseye-slim
FROM node:iron-bookworm-slim

ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,times-of-day,compliance-hub,alerts,onboarding,consolidate,remote-config,hooks,dashboards,sdk,data-manager,guides
# Countly Enterprise:
Expand All @@ -21,15 +21,14 @@ WORKDIR /opt/countly
COPY . .
# install required dependencies which slim image doesn't have
RUN apt-get update && \
apt-get install -y iputils-ping net-tools telnet apt-transport-https procps curl wget git python2 make gcc g++ unzip && \
ln -s /usr/bin/python2.7 /usr/bin/python
apt-get install -y iputils-ping net-tools telnet apt-transport-https procps curl wget git make gcc g++ unzip xz-utils

RUN apt-get update && \
apt-get upgrade -y && \
cd /usr/src && \
wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz && \
tar -xf Python-3.8.12.tar.xz && \
apt-get install -y build-essential sudo zlib1g-dev libssl1.1 libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev && \
apt-get install -y build-essential sudo zlib1g-dev libssl3 libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev && \
cd Python-3.8.12 && \
./configure --enable-optimizations --enable-shared && \
make && \
Expand All @@ -48,6 +47,7 @@ RUN curl -s -L -o /tmp/tini.deb "https://github.com/krallin/tini/releases/downlo
cp -n ./api/config.sample.js ./api/config.js && \
cp -n ./frontend/express/config.sample.js ./frontend/express/config.js && \
cp -n ./frontend/express/public/javascripts/countly/countly.config.sample.js ./frontend/express/public/javascripts/countly/countly.config.js && \
HOME=/tmp npm install -g npm@latest && \
HOME=/tmp npm install --unsafe-perm=true --allow-root && \
HOME=/tmp npm install argon2 --build-from-source --unsafe-perm=true --allow-root && \
./bin/docker/preinstall.sh && \
Expand All @@ -56,7 +56,7 @@ RUN curl -s -L -o /tmp/tini.deb "https://github.com/krallin/tini/releases/downlo
\
# cleanup & chown
npm remove -y --no-save mocha nyc should supertest puppeteer && \
apt-get remove -y git gcc g++ make automake autoconf libtool pkg-config unzip sqlite3 && \
apt-get remove -y git gcc g++ make automake autoconf libtool pkg-config unzip sqlite3 wget && \
apt-get autoremove -y && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
rm -rf test /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* /var/log/* /root/.npm && \
Expand Down
4 changes: 2 additions & 2 deletions api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ plugins.connectToAllDatabases().then(function() {
password_rotation: 3,
password_autocomplete: true,
robotstxt: "User-agent: *\nDisallow: /",
dashboard_additional_headers: "X-Frame-Options:deny\nX-XSS-Protection:1; mode=block\nStrict-Transport-Security:max-age=31536000 ; includeSubDomains\nX-Content-Type-Options: nosniff",
api_additional_headers: "X-Frame-Options:deny\nX-XSS-Protection:1; mode=block\nAccess-Control-Allow-Origin:*",
dashboard_additional_headers: "X-Frame-Options:deny\nX-XSS-Protection:1; mode=block\nStrict-Transport-Security:max-age=31536000; includeSubDomains; preload\nX-Content-Type-Options: nosniff",
api_additional_headers: "X-Frame-Options:deny\nX-XSS-Protection:1; mode=block\nStrict-Transport-Security:max-age=31536000; includeSubDomains; preload\nAccess-Control-Allow-Origin:*",
dashboard_rate_limit_window: 60,
dashboard_rate_limit_requests: 500,
proxy_hostname: "",
Expand Down
8 changes: 7 additions & 1 deletion api/utils/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,13 @@ common.getDate = function(timestamp, timezone) {
* @returns {number} current day of the year
*/
common.getDOY = function(timestamp, timezone) {
var endDate = (timestamp) ? moment.unix(timestamp * 1000) : moment();
var endDate;
if (timestamp && timestamp.toString().length === 13) {
endDate = (timestamp) ? moment.unix(timestamp / 1000) : moment();
}
else {
endDate = (timestamp) ? moment.unix(timestamp) : moment();
}

if (timezone) {
endDate.tz(timezone);
Expand Down
Loading

0 comments on commit d38e71a

Please sign in to comment.