diff --git a/auth/authentication.js b/auth/authentication.js index 22e391b2..7feb7c0f 100644 --- a/auth/authentication.js +++ b/auth/authentication.js @@ -36,7 +36,7 @@ module.exports = { }, authenticateIfNoUserToken (channelName, channelPassword, user) { return new Promise((resolve, reject) => { - if (user) { + if (user || !channelName) { return resolve(true); } return resolve(module.exports.authenticateChannelCredentials(channelName, channelPassword)); diff --git a/public/assets/js/publishFileFunctions.js b/public/assets/js/publishFileFunctions.js index f1255d70..41922e08 100644 --- a/public/assets/js/publishFileFunctions.js +++ b/public/assets/js/publishFileFunctions.js @@ -135,8 +135,6 @@ const publishFileFunctions = { } else { that.showFilePublishFailure(JSON.parse(xhr.response).message); } - } else { - console.log('xhr.readyState', xhr.readyState, 'xhr.status', xhr.status); } }; // Initiate a multipart/form-data upload diff --git a/routes/api-routes.js b/routes/api-routes.js index 9df1bcb9..b6472216 100644 --- a/routes/api-routes.js +++ b/routes/api-routes.js @@ -137,7 +137,6 @@ module.exports = (app) => { logger.debug('publish request rejected, insufficient request parameters'); return res.status(400).json({success: false, message: error.message}); } - logger.debug(`/api/publish > name: ${name}, license: ${license} title: "${title}" description: "${description}" channelName: "${channelName}" channelPassword: "${channelPassword}" nsfw: "${nsfw}"`); // check channel authorization authenticateIfNoUserToken(channelName, channelPassword, user) .then(authenticated => {