You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
api/attachmentsdelete/index.php was calling attAuthOwnerAllowed() with the wrong signature: it passed the table name string as the 3rd argument, but the function expects an array context from attAuthResolveContext(). This caused the auth check to fail closed for every request.
Fix
Replaced the call with attAuthCheckOwner($db, $user, $realTable, $fkId, true) (write=true for deletion). This resolves the context correctly and applies appropriate permission checks.
Verification
Admin session: POST /api/attachmentsdelete/index.php?action=delete with valid id/table/fk_id returns 200 {"status":"ok",...}