Skip to content

is_writable check isn't right #25

@harris1

Description

@harris1

Hello and thank you for Enable Media Replace,

I have an hopefully easy to fix issue. In upload.php, is_writable($current_file) should be is_writable(dirname($current_file)). unlink requires write access on the directory and doesn't even look at the file permissions.

A few sites have complicated permissions where the web-server doesn't have write access to the attachment files, but can remove them and add new attachments.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions