Description: Drop secure-compare dependency
Author: sandra uwah <sandrauwah282@gmail.com>
Forwarded: not-needed
--- a/lib/http-server.js
+++ b/lib/http-server.js
@@ -5,8 +5,7 @@
   httpServerCore = require('./core'),
   auth = require('basic-auth'),
   httpProxy = require('http-proxy'),
-  corser = require('corser'),
-  secureCompare = require('secure-compare');
+  corser = require('corser');
 
 //
 // Remark: backwards compatibility for previous
@@ -22,6 +21,17 @@
   return new HttpServer(options);
 };
 
+function compare (a, b) {
+  var mismatch = a.length === b.length ? 0 : 1;
+  if (mismatch) {
+    b = a;
+  };
+  for (var i = 0, il = a.length; i < il; ++i) {
+    mismatch |= (a.charCodeAt(i) ^ b.charCodeAt(i));
+  }
+  return mismatch === 0;
+};
+
 /**
  * Constructor function for the HttpServer object
  * which is responsible for serving static files along
@@ -85,8 +95,8 @@
       if (credentials) {
         // if credentials is defined, name and pass are guaranteed to be string
         // type
-        var usernameEqual = secureCompare(options.username.toString(), credentials.name);
-        var passwordEqual = secureCompare(options.password.toString(), credentials.pass);
+        var usernameEqual = compare(options.username.toString(), credentials.name);
+        var passwordEqual = compare(options.password.toString(), credentials.pass);
         if (usernameEqual && passwordEqual) {
           return res.emit('next');
         }
