From 887a86e927325b6222a237a66b1da87943dae951 Mon Sep 17 00:00:00 2001 From: Shawn K Date: Mon, 12 Nov 2018 14:12:31 -0600 Subject: [PATCH 1/2] Update autoblockPublishMiddleware.js --- server/middleware/autoblockPublishMiddleware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/middleware/autoblockPublishMiddleware.js b/server/middleware/autoblockPublishMiddleware.js index 42e9076c..503fef51 100644 --- a/server/middleware/autoblockPublishMiddleware.js +++ b/server/middleware/autoblockPublishMiddleware.js @@ -2,7 +2,7 @@ const fs = require('fs'); const logger = require('winston'); const { publishing: { publishingChannelWhitelist } } = require('@config/siteConfig'); -const ipBanFile = './config/ipBan.txt'; +const ipBanFile = './site/config/ipBan.txt'; const forbiddenMessage = '

Forbidden

If you are seeing this by mistake, please contact us using https://chat.lbry.io/'; let ipCounts = {}; -- 2.45.2 From 079c9ef784b57adbdc29284ff80dc990dd5530e9 Mon Sep 17 00:00:00 2001 From: Shawn K Date: Mon, 12 Nov 2018 14:21:07 -0600 Subject: [PATCH 2/2] Update autoblockPublishMiddleware.js --- server/middleware/autoblockPublishMiddleware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/middleware/autoblockPublishMiddleware.js b/server/middleware/autoblockPublishMiddleware.js index 503fef51..4c4456fb 100644 --- a/server/middleware/autoblockPublishMiddleware.js +++ b/server/middleware/autoblockPublishMiddleware.js @@ -58,7 +58,7 @@ const autoblockPublishBodyMiddleware = (req, res, next) => { let ip = (req.headers['x-forwarded-for'] || req.connection.remoteAddress).split(/,\s?/)[0]; const { channelName } = req.body; - if (channelName && publishingChannelWhitelist.indexOf(channelName) !== -1) { + if (channelName && publishingChannelWhitelist.indexOf(channelName.toLowerCase()) !== -1) { delete ipCounts[ip]; } } -- 2.45.2