Skip to content

Commit

Permalink
Fix issue with query.hasOwnProperty described nodejs/node#6289
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorbuyakovupw committed Sep 4, 2018
1 parent f528cd8 commit c5b831e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion notification-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function handleHTTPCall(request, response) {
let handler = handlerObject.handler;
let password = handlerObject.password;

if (password && (!query.hasOwnProperty("password") || query.password !== password)) {
if (password && !query["password"] || query.password !== password)) {
response.writeHead(401, {'Content-Type': "text/html"});
response.write("Unauthorized");
response.end();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-http-notification-server",
"version": "1.0.3",
"version": "1.0.4",
"description": "An http/https server inside Homebridge to receive notifications from external programs",
"license": "MIT",
"main": "notification-server.js",
Expand Down

0 comments on commit c5b831e

Please sign in to comment.