We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b13fd02 commit c62b794Copy full SHA for c62b794
frontend/express/app.js
@@ -603,6 +603,10 @@ Promise.all([plugins.dbConnection(countlyConfig), plugins.dbConnection("countly_
603
app.use(function(req, res, next) {
604
var contentType = req.headers['content-type'];
605
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
+ }
610
var form = new formidable.IncomingForm();
611
form.uploadDir = __dirname + '/uploads';
612
form.parse(req, function(err, fields, files) {
0 commit comments