From 1d99d3eacbd626a63d97507817178b48a1b5ef91 Mon Sep 17 00:00:00 2001 From: Kenneth Ormandy Date: Fri, 27 Nov 2015 16:49:59 -0800 Subject: [PATCH] Should abort with all 4xx status --- lib/middleware/deploy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/middleware/deploy.js b/lib/middleware/deploy.js index c643314..c09d5d1 100644 --- a/lib/middleware/deploy.js +++ b/lib/middleware/deploy.js @@ -204,8 +204,8 @@ module.exports = function(req, next){ // done handshake.on("end", next) - handshake.on("response", function(rsp){ - if (rsp.statusCode == 403) { + handshake.on("response", function (rsp) { + if (parseInt(rsp.statusCode.toString()[0], 10) === 4) { helpers.log() helpers.log(" Aborted".yellow + " - you must be granted access to publish to", req.domain) helpers.log()