Files
WebForm-mw/civi-extension
Joel Brock 0a19b57a86 Harden the extension upload endpoint (CSRF, record ACL, mime allowlist)
civicrm/webform-mw/upload accepted any session-authenticated POST, called
civicrm_api3('Attachment','create') (which skips permission checks from
PHP) against any contact/activity id, and stored any client mime type.

- Require X-Requested-With: XMLHttpRequest (already sent by the app), so
  cross-site form posts can't ride a logged-in staff session.
- Require EDIT permission on the target contact/activity.
- Enforce the same mime allowlist as the app's /api/upload route.
2026-10-30 11:18:10 -07:00
..