Skip to content

Commit 45bc3d3

Browse files
authored
Merge branch 'next' into SER-1680
2 parents a39ffc7 + 29f8960 commit 45bc3d3

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ Enterprise fixes:
4747
- [nps] Fixed bug in the editor where the "internal name" field was not mandatory
4848
- [ratings] Fixed UI bug where "Internal name" was not a mandatory field
4949

50+
Security:
51+
- Fixing minor vulnerability that would allow for unauthorized file upload
52+
5053
## Version 24.05.16
5154
Fixes:
5255
- [core] Replaced "Users" with "Sessions" label on technology home widgets

frontend/express/app.js

+4
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,10 @@ Promise.all([plugins.dbConnection(countlyConfig), plugins.dbConnection("countly_
603603
app.use(function(req, res, next) {
604604
var contentType = req.headers['content-type'];
605605
if (req.method.toLowerCase() === 'post' && contentType && contentType.indexOf('multipart/form-data') >= 0) {
606+
if (!req.session?.uid || Date.now() > req.session?.expires) {
607+
res.status(401).send('Unauthorized');
608+
return;
609+
}
606610
var form = new formidable.IncomingForm();
607611
form.uploadDir = __dirname + '/uploads';
608612
form.parse(req, function(err, fields, files) {

frontend/express/public/core/device-and-type/javascripts/countly.views.js

+14
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,20 @@ var GridComponent = countlyVue.views.create({
443443
}
444444
return val;
445445
},
446+
onWidgetCommand: function(event) {
447+
if (event === 'add' || event === 'manage' || event === 'show') {
448+
this.graphNotesHandleCommand(event);
449+
return;
450+
}
451+
else if (event === 'zoom') {
452+
this.triggerZoom();
453+
return;
454+
}
455+
else {
456+
this.$emit('command', event);
457+
return;
458+
}
459+
},
446460
}
447461
});
448462

0 commit comments

Comments
 (0)