mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-11 07:00:51 +01:00
Merge branch 'master' into develop
This commit is contained in:
@@ -108,6 +108,12 @@ module.exports = function (Meta) {
|
||||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
|
||||
if (filePath.endsWith('.min.js')) {
|
||||
minified = { code: buffer.toString() };
|
||||
return cb();
|
||||
}
|
||||
|
||||
try {
|
||||
minified = uglifyjs.minify(buffer.toString(), {
|
||||
fromString: true,
|
||||
|
||||
@@ -174,7 +174,7 @@ function checkMaintenance(socket, callback) {
|
||||
function validateSession(socket, callback) {
|
||||
var req = socket.request;
|
||||
if (!req.signedCookies || !req.signedCookies[nconf.get('sessionKey')]) {
|
||||
return callback(new Error('[[error:invalid-session]]'));
|
||||
return callback();
|
||||
}
|
||||
db.sessionStore.get(req.signedCookies[nconf.get('sessionKey')], function (err, sessionData) {
|
||||
if (err || !sessionData) {
|
||||
|
||||
Reference in New Issue
Block a user