ZF2-409: After upgrading from beta4 to beta5 the S3 service stopped working
Description
After upgrading from beta4 to beta5 the S3 service stopped working: all the operations (for example, getBuckets) leads to an error in the response of the service: 'The request signature we calculated does not match the signature you provided. Check your key and signing method.'
In beta4 it works.
I've checked the difference between beta4 and beta5 and found the calculating of signature was changed in addSignature method of S3 class.
In beta4 it was:
$signature = base64_encode(Hmac::compute($this->_getSecretKey(), 'sha1', utf8_encode($sig_str), Hmac::OUTPUT_BINARY));
In beta5 it is:
$signature = base64_encode(Hmac::compute($this->_getSecretKey(), 'sha1', utf8_encode($sig_str), true));
Could you please explain why the last argument of Hmac::compute was changed in this way? Or if it was made by mistake could you roll back this?
Comments
Posted by Maks 3w (maks3w) on 2012-07-19T12:22:23.000+0000
Created PT https://github.com/zendframework/…
Posted by Maks 3w (maks3w) on 2012-07-23T16:09:37.000+0000
Patch merged.
Watchout that now the code for Amazon Services lives in https://github.com/zendframework/ZendServiceAmazon