summaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2014-11-26 17:34:44 +0000
committerJohn McLear <john@mclear.co.uk>2014-11-26 17:34:44 +0000
commit16f3ebb3ba4066ffb2856e378010e5ea6d843b8d (patch)
treea769390cc69aa0fffae88f3948069ac1fdb3dac2 /src/node
parent88b3d99fbd8c73fe585c46879a20715a9705fcb7 (diff)
downloadetherpad-lite-16f3ebb3ba4066ffb2856e378010e5ea6d843b8d.zip
handle auth fails
Diffstat (limited to 'src/node')
-rw-r--r--src/node/handler/APIHandler.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node/handler/APIHandler.js b/src/node/handler/APIHandler.js
index 9adc2418..a26dd2cf 100644
--- a/src/node/handler/APIHandler.js
+++ b/src/node/handler/APIHandler.js
@@ -450,6 +450,7 @@ exports.handle = function(apiVersion, functionName, fields, req, res)
if(fields["apikey"] != apikey.trim())
{
+ res.statusCode = 401;
res.send({code: 4, message: "no or wrong API Key", data: null});
return;
}