humanmade / S3-Uploads

The WordPress Plugin to Store Uploads on Amazon S3
1.95k stars 392 forks source link

`LocalStreamWrapper->getLocalPath()` giving false negative on windows machines #600

Open rasmuswinter opened 2 years ago

rasmuswinter commented 2 years ago

getLocalPath uses forward slashes to construct the local file path for a file, then does a substring check against the real upload directory. On Windows, this directory contains backslashes, so the check fails and the function returns an empty string

Fixed in PR #636