Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add in a hack to make the http server generate the correct hmac (terr…

…ible hack)
  • Loading branch information...
commit 4c8417edb40ad2f3d5d7e2168ae4b02a07365314 1 parent 2bd8765
Paul Querna authored
3  dislocate/interfaces/http.js
@@ -98,7 +98,8 @@ function checkAuth(req, res, body, success, failure)
98 98
 
99 99
   var proposed = req.headers["x-dislocate-signature"];
100 100
   if (proposed !== undefined) {
101  
-    var good = auth.generateFromRequest(req, body);
  101
+    /* TODO: this is bogus. Should NEVER reconvert the body to JSON again. */
  102
+    var good = auth.generateFromRequest(req, JSON.stringify(body));
102 103
 
103 104
     if (good.err !== false) {
104 105
       log.info('sending failure');
1  test/add_service.js
@@ -20,6 +20,7 @@ var client = require('../dislocate/client');
20 20
 var log = require('../dislocate/log');
21 21
 var ps = require('../dislocate/pubsub')
22 22
 var config = require('../dislocate/config');
  23
+
23 24
 (function() {
24 25
 
25 26
   config.init();

0 notes on commit 4c8417e

Please sign in to comment.
Something went wrong with that request. Please try again.