diff --git a/lib/modules/authenticator/index.js b/lib/modules/authenticator/index.js index c3dfe594d..2dc83b36a 100644 --- a/lib/modules/authenticator/index.js +++ b/lib/modules/authenticator/index.js @@ -18,10 +18,14 @@ class Authenticator { generateRequestHash(req) { let cnonce = req.headers['x-embark-cnonce']; let hash = new keccak(); + let url = req.url; + let queryParamIndex = url.indexOf('?'); + url = url.substring(0, queryParamIndex !== -1 ? queryParamIndex : url.length) + hash.update(cnonce); hash.update(this.authToken); hash.update(req.method); - hash.update(req.url); + hash.update(url); return hash.digest('hex'); }