Opened 7 years ago
Last modified 4 years ago
#42838 new defect (bug)
Manipulating uploads and images can break when using stream wrappers
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | has-patch needs-refresh |
Focuses: | Cc: |
Description
When using PHP stream wrappers for storing uploads into object storages (like S3 or Google Cloud Storage) some things break because in this context a directory merely a path which ends in a '/'.
PHP's builtin dirname
always returns the path without the trailing slash. On regular filesystems this is not a problem since a
and a/
are equivalent, but in the context of object storages this pose some issues.
I'm attaching a patch which always add a trailing slash when the code expects to work with directories.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.