alexa-js / alexa-verifier-middleware

An express middleware that verifies HTTP requests sent to an Alexa skill are sent from Amazon.
MIT License
31 stars 6 forks source link

Signatures not properly verified with german umlauts #24

Closed arthurbra closed 7 years ago

arthurbra commented 7 years ago

Hi,

I'm implementing a custom skill for alexa (german language). If recognized slots contain german umlauts (i.e. Küche), then the signature can not be verified.

I've fixed the problem, if I explicitly use Buffer with a given encoding und pass a Buffer object to the verifier. ... var bodyData = []; req.on('data', function(data) { bodyData.push(new Buffer(data, "utf8")); req.rawBody += data; }) ... verifier(certUrl, signature, Buffer.concat(bodyData), function(er) { .... }

BTW: I'm using Node.js 4.2 on my Synology NAS (a newer version is not available).

Regards Arthur

dblock commented 7 years ago

This was already fixed, https://github.com/mreinstein/alexa-verifier/issues/19, can you check which version of alexa-verifier you're getting?

Also kudos on running this on a NAS! :)

arthurbra commented 7 years ago

I've updated alexa-verifier and now it works :-)

thanks.