-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix Signiture Does Not Match when mounting Amazon S3 external storage #9509
Conversation
For some reason the aws-sdk-php package does not caclulate the signiture correctly when accessing an object in a bucket with a name of '.'. When we are at the top of a S3 bucket there is a need(?) to have a directory name. Per standard Unix the name picked was '.' (dot or period). This choice exercises the aws-sdk bug. This fix is to add a field to the method to store the name to use instead of '.' which at this point is hard coded to '<root>'. We also add a private function 'cleanKey()' which will test for the '.' name and replace it with the variable. Finally all calls to manipulate objects where the path is not obviously not '.' are processed through cleanKey(). An example where we don't process through clean key would be 'Key' => $path.'/', Use correct relationship operator Per feed back use === instead of == use '/' instead of '<root>'
A new inspection was created. |
👍 great @ctjctj would be nice to hear if '/' works for you as well |
Tested here as well
|
👍 |
💣 Test Failed. 💣 |
WTF
|
@owncloud-bot retest this please |
looks good 👍 |
Unit test execution can be ignored - files_external is untested by jenkins -> merge |
@karlitschek I'll prepare the backport |
Fix Signiture Does Not Match when mounting Amazon S3 external storage
backport stable7: c02e95f |
@karlitschek @craigpg according to #6724 this issue applies to oc6 as well - I'll backport - ok? |
yes. backport please |
backport stable6: 3c3ebd5 |
Thank you everybody for your work on this. Fortunately for me I went from On Tue, Jul 8, 2014 at 9:08 AM, Thomas Müller notifications@github.com
|
For some reason the aws-sdk-php package does not caclulate the
signiture correctly when accessing an object in a bucket with a name of
'.'.
When we are at the top of a S3 bucket there is a need(?) to have a directory
name. Per standard Unix the name picked was '.' (dot or period). This
choice exercises the aws-sdk bug.
This fix is to add a field to the method to store the name to use instead of
'.' which at this point is hard coded to ''. We also add a private
function 'cleanKey()' which will test for the '.' name and replace it with
the variable. Finally all calls to manipulate objects where the path is
not obviously not '.' are processed through cleanKey().
An example where we don't process through clean key would be
'Key' => $path.'/',
Use correct relationship operator
Per feed back use === instead of ==
use '/' instead of ''