From 90e9d552f0ccf8b149b4a0150a3291d0c1a7d18f Mon Sep 17 00:00:00 2001 From: Alexandre Girard Date: Mon, 21 Nov 2011 16:39:54 +0100 Subject: [PATCH] fix issue with newline in APIKEY.txt when checking api key --- node/handler/APIHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/handler/APIHandler.js b/node/handler/APIHandler.js index 57eeeb734..04464b086 100644 --- a/node/handler/APIHandler.js +++ b/node/handler/APIHandler.js @@ -70,7 +70,7 @@ var functions = { exports.handle = function(functionName, fields, req, res) { //check the api key! - if(fields["apikey"] != apikey) + if(fields["apikey"] != apikey.trim()) { res.send({code: 4, message: "no or wrong API Key", data: null}); return;