Skip to content

Commit 281d114

Browse files
committed
Bump version to 3.12.2
1 parent f2817c0 commit 281d114

16 files changed

Lines changed: 230 additions & 48 deletions

File tree

.docker/Dockerfile.rhel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM registry.access.redhat.com/ubi8/nodejs-12
22

3-
ENV RC_VERSION 3.12.1
3+
ENV RC_VERSION 3.12.2
44

55
MAINTAINER buildmaster@rocket.chat
66

.github/history-manual.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,21 @@
6363
"contributors": [
6464
"sampaiodiego"
6565
]
66+
}],
67+
"3.12.2": [{
68+
"title": "[FIX] Bump Livechat widget",
69+
"userLogin": "sampaiodiego",
70+
"contributors": [
71+
"sampaiodiego"
72+
]
73+
}, {
74+
"title": "[FIX] Security Hotfix (https://docs.rocket.chat/guides/security/security-updates)",
75+
"userLogin": "sampaiodiego",
76+
"contributors": [
77+
"sampaiodiego",
78+
"g-thome",
79+
"KevLehman",
80+
"matheusbsilva137"
81+
]
6682
}]
6783
}

.github/history.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56681,6 +56681,50 @@
5668156681
]
5668256682
}
5668356683
]
56684+
},
56685+
"3.8.9": {
56686+
"node_version": "12.18.4",
56687+
"npm_version": "6.14.8",
56688+
"apps_engine_version": "1.19.0",
56689+
"mongo_versions": [
56690+
"3.4",
56691+
"3.6",
56692+
"4.0"
56693+
],
56694+
"pull_requests": []
56695+
},
56696+
"3.10.7": {
56697+
"node_version": "12.18.4",
56698+
"npm_version": "6.14.8",
56699+
"apps_engine_version": "1.21.0-alpha.4235",
56700+
"mongo_versions": [
56701+
"3.4",
56702+
"3.6",
56703+
"4.0"
56704+
],
56705+
"pull_requests": []
56706+
},
56707+
"3.11.3": {
56708+
"node_version": "12.18.4",
56709+
"npm_version": "6.14.8",
56710+
"apps_engine_version": "1.22.2",
56711+
"mongo_versions": [
56712+
"3.4",
56713+
"3.6",
56714+
"4.0"
56715+
],
56716+
"pull_requests": []
56717+
},
56718+
"3.12.2": {
56719+
"node_version": "12.18.4",
56720+
"npm_version": "6.14.8",
56721+
"apps_engine_version": "1.23.0",
56722+
"mongo_versions": [
56723+
"3.4",
56724+
"3.6",
56725+
"4.0"
56726+
],
56727+
"pull_requests": []
5668456728
}
5668556729
}
5668656730
}

.snapcraft/resources/prepareRocketChat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
curl -SLf "https://releases.rocket.chat/3.12.1/download/" -o rocket.chat.tgz
3+
curl -SLf "https://releases.rocket.chat/3.12.2/download/" -o rocket.chat.tgz
44

55
tar xf rocket.chat.tgz --strip 1
66

.snapcraft/snap/snapcraft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# 5. `snapcraft snap`
88

99
name: rocketchat-server
10-
version: 3.12.1
10+
version: 3.12.2
1111
summary: Rocket.Chat server
1212
description: Have your own Slack like online chat, built with Meteor. https://rocket.chat/
1313
confinement: strict

HISTORY.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11

2+
# 3.12.2
3+
`2021-03-26 · 2 🐛 · 4 👩‍💻👨‍💻`
4+
5+
### Engine versions
6+
- Node: `12.18.4`
7+
- NPM: `6.14.8`
8+
- MongoDB: `3.4, 3.6, 4.0`
9+
- Apps-Engine: `1.23.0`
10+
11+
### 🐛 Bug fixes
12+
13+
14+
- Bump Livechat widget
15+
16+
- Security Hotfix (https://docs.rocket.chat/guides/security/security-updates)
17+
18+
### 👩‍💻👨‍💻 Core Team 🤓
19+
20+
- [@KevLehman](https://github.com/KevLehman)
21+
- [@g-thome](https://github.com/g-thome)
22+
- [@matheusbsilva137](https://github.com/matheusbsilva137)
23+
- [@sampaiodiego](https://github.com/sampaiodiego)
24+
225
# 3.12.1
326
`2021-03-08 · 1 🚀 · 2 🐛 · 3 👩‍💻👨‍💻`
427

app/api/server/v1/users.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,8 @@ API.v1.addRoute('users.2fa.sendEmailCode', {
722722
const userId = this.userId || Users[method](emailOrUsername, { fields: { _id: 1 } })?._id;
723723

724724
if (!userId) {
725-
throw new Meteor.Error('error-invalid-user', 'Invalid user');
725+
this.logger.error('[2fa] User was not found when requesting 2fa email code');
726+
return API.v1.success();
726727
}
727728

728729
emailCheck.sendEmailCode(getUserForCheck(userId));

app/emoji-custom/server/methods/insertOrUpdateEmoji.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ Meteor.methods({
4545
emojiData.aliases = [];
4646
}
4747

48+
emojiData.extension = emojiData.extension === 'svg+xml' ? 'png' : emojiData.extension;
49+
4850
let matchingResults = [];
4951

5052
if (emojiData._id) {

app/emoji-custom/server/methods/uploadEmojiCustom.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,35 @@
11
import { Meteor } from 'meteor/meteor';
22
import limax from 'limax';
3+
import sharp from 'sharp';
34

45
import { hasPermission } from '../../../authorization';
56
import { RocketChatFile } from '../../../file';
67
import { RocketChatFileEmojiCustomInstance } from '../startup/emoji-custom';
78
import { api } from '../../../../server/sdk/api';
89

10+
const getFile = async (file, extension) => {
11+
if (extension !== 'svg+xml') {
12+
return file;
13+
}
14+
15+
return sharp(file)
16+
.png()
17+
.toBuffer();
18+
};
19+
920
Meteor.methods({
10-
uploadEmojiCustom(binaryContent, contentType, emojiData) {
21+
async uploadEmojiCustom(binaryContent, contentType, emojiData) {
1122
if (!hasPermission(this.userId, 'manage-emoji')) {
1223
throw new Meteor.Error('not_authorized');
1324
}
1425

1526
emojiData.name = limax(emojiData.name, { replacement: '_' });
1627
// delete aliases for notification purposes. here, it is a string rather than an array
1728
delete emojiData.aliases;
18-
const file = new Buffer(binaryContent, 'binary');
29+
30+
const file = await getFile(Buffer.from(binaryContent, 'binary'), emojiData.extension);
31+
32+
emojiData.extension = emojiData.extension === 'svg+xml' ? 'png' : emojiData.extension;
1933

2034
const rs = RocketChatFile.bufferToStream(file);
2135
RocketChatFileEmojiCustomInstance.deleteFile(encodeURIComponent(`${ emojiData.name }.${ emojiData.extension }`));

app/mailer/server/api.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import stripHtml from 'string-strip-html';
88

99
import { settings } from '../../settings/server';
1010
import { escapeHTML } from '../../../lib/escapeHTML';
11+
import { replaceVariables } from './utils.js';
1112

1213
let contentHeader;
1314
let contentFooter;
@@ -25,7 +26,7 @@ settings.get('Language', (key, value) => {
2526
});
2627

2728
export const replacekey = (str, key, value = '') => str.replace(new RegExp(`(\\[${ key }\\]|__${ key }__)`, 'igm'), escapeHTML(value));
28-
export const translate = (str) => str.replace(/\{ ?([^\} ]+)(( ([^\}]+))+)? ?\}/gmi, (match, key) => TAPi18n.__(key, { lng }));
29+
export const translate = (str) => replaceVariables(str, (match, key) => TAPi18n.__(key, { lng }));
2930
export const replace = function replace(str, data = {}) {
3031
if (!str) {
3132
return '';

0 commit comments

Comments
 (0)