MantisBT: master 0b504b0a

Author Committer Branch Timestamp Parent
dregad dregad master 2026-09-05 12:43 master c494f763
Affected Issues  0036981: SOAP Own-Attachment Delete After Issue Access Is Lost
 0037365: `bug_file_delete.php` lets users delete their own attachments even if they can no longer access the Issue
Changeset

Prevent attachment delete by owner without issue access

When $g_allow_delete_own_attachments = ON, an attachment's owner was
able to delete it even when they no longer had no access to the Issue
(e.g. if it was moved to a private project).

Adding a check in IssueFileDeleteCommand::validate() to ensure that the
user can view the Issue.

Regrouped the 2 ifs into a single conditional expression, improved the
variables' names and negated the boolean logic, to make it easier to
understand.

Fixes 0036981, 0037365, GHSA-9p8q-vwgp-hx32

mod - core/commands/IssueFileDeleteCommand.php Diff File