-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent CloudFrontClient->getSignedUrl() Results #38
Comments
Sorry to hear that you are having trouble with this. Thanks for trying to dig in with some details on the failure cases. I'll take a look at this and post back when I have more information. |
This issue is now fixed in master. It looks like there was an error the documentation on how a signed URL is created. I'll work with the documentation team to have this corrected. |
Thank you so much! My signed url's are working 100% of the time. Your effort is greatly appreciated. |
I'm having the same issue, and just downloaded the latest aws.phar file from http://aws.amazon.com/sdkforphp/. The SDK shows version 2.1.0 but the getSignedUrl() doesn't have this commit. Any ETA on when the aws.phar file will be updated? |
This has not yet been released. This will change will be present in the phar and PEAR package after the next release. We don't have a definitive timeframe for the next release, but it should be soon. In the meantime, you could grab the latest version of the SDK from master using Composer. |
Okay, thanks. Guess this is a good time to learn about Composer then. |
Hello, I am receiving inconsistent results when I call the getSignedUrl method from a CloudFrontClient object, similar to the following code:
$this->aws = AWS::factory(array(
'key' => '...',
'secret' => '...',
'region' => Region::CONSTANT
));
$cf_client = $this->aws->get('cloudfront');
$result= $cf_client->getSignedUrl(array(
'url' => 'http://test.test.com/test.jpg',
'expires' => (time() + 600)
));
It seems that the resulting url has about a 50% chance of successfully accessing the query-string-protected S3 bucket. An 'Access Denied' page is returned by the cloudfront endpoint when the url is unsuccessful. Furthermore, I looked into the RFC 2045 code for base64 encoding, and I noticed that the resulting URL is Never successful when the SSL signature ends with '==', or '__' after being url-encoded. This has something to do with how the octets are represented, but I am not too clear on the specifics. Any solution to this issue would be greatly appreciated!
The text was updated successfully, but these errors were encountered: