Permalink
Browse files

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

…ible hack)
  • Loading branch information...
1 parent 2bd8765 commit 4c8417edb40ad2f3d5d7e2168ae4b02a07365314 @pquerna committed Jun 4, 2010
Showing with 3 additions and 1 deletion.
  1. +2 −1 dislocate/interfaces/http.js
  2. +1 −0 test/add_service.js
@@ -98,7 +98,8 @@ function checkAuth(req, res, body, success, failure)
var proposed = req.headers["x-dislocate-signature"];
if (proposed !== undefined) {
- var good = auth.generateFromRequest(req, body);
+ /* TODO: this is bogus. Should NEVER reconvert the body to JSON again. */
+ var good = auth.generateFromRequest(req, JSON.stringify(body));
if (good.err !== false) {
log.info('sending failure');
View
@@ -20,6 +20,7 @@ var client = require('../dislocate/client');
var log = require('../dislocate/log');
var ps = require('../dislocate/pubsub')
var config = require('../dislocate/config');
+
(function() {
config.init();

0 comments on commit 4c8417e

Please sign in to comment.