Skip to content

Commit 29f8960

Browse files
committed
Merge branch 'release.24.10' into next
2 parents 3a1ed3a + 2374e1a commit 29f8960

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
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

Lines changed: 4 additions & 0 deletions
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) {

0 commit comments

Comments
 (0)