Issues

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

Patch merged.

Watchout that now the code for Amazon Services lives in https://github.com/zendframework/ZendServiceAmazon