diff --git a/src/js/ripple/crypt.js b/src/js/ripple/crypt.js index 0bdd6bbf..bd0ea75e 100644 --- a/src/js/ripple/crypt.js +++ b/src/js/ripple/crypt.js @@ -361,11 +361,19 @@ Crypt.getStringToSign = function(config, parsed, date, mechanism) { // Sort the properties of the JSON object into canonical form var canonicalData = JSON.stringify(copyObjectWithSortedKeys(config.data)); + // We're using URL parsing using browser functionality. Unfortunately the + // parsing result slightly differs in IE - it is missing a leading slash. + // XXX Proper fix would be to use a pure JS URL parser. + var pathname = parsed.pathname; + + // IE11 Workaround + if (pathname[0] !== '/') pathname = '/' + pathname; + // Canonical request using Amazon's v4 signature format // See: http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html var canonicalRequest = [ config.method || 'GET', - parsed.pathname || '', + pathname || '', parsed.search || '', // XXX Headers signing not supported '',