Problem/Motivation
When preventCrossSchemeAccess() was moved to a trait the reference to $this->config[] was kept, this works for S3fsStreamWrapper but does not work for S3fsFileService. This allows for a False Positive inside S3fsFileService if the public/private paths have been renamed. This additionally allows a False Negative if the path has been renamed however due to the need to prepare the destination directory which uses S3fsStreamWrapper the operation would general fail prior to uploading the file.
Inside of preventCrossSchemeAccess() a false positive could occur for s3://configured-prefix-something preventing creating paths that contained the public/private prefix.
Addtionaly there was a possible false negative on nested public under private (and vice versa) for creating the 'root' level directory however any file operations below that would trigger the exception.
Steps to reproduce
Proposed resolution
Commit patch with enhanced testing of the trait.
Comments
Comment #3
cmlara