The Engagement Report tab wrote STAFF_REPORT_KEY into the iframe src for every user with "access CiviCRM", without checking contact permissions. Anyone could copy it from the DOM and read any org's report and files, bypassing Civi ACLs; the key never expired and landed in access logs. - Extension (0.4.0): Tab.php checks Contact_Permission::allow(VIEW) and mints sig = base64url(HMAC-SHA256(key, "webform-mw.staff-report.v1: <org>:<exp>")) with an 8h exp. The secret no longer leaves the server. - App: lib/staff-token.mjs verifies the token (constant-time, org must match, rejects expired or >12h tokens). /staff/report, /api/staff/report and /api/staff/file share staffAuthQuery(); client links carry exp/sig. - Legacy ?key= is still accepted (constant-time compare, logs a warning) so the app can deploy before the extension. Remove it once every Civi install runs extension 0.4.0. - PHP/Node signature compatibility is pinned by a PHP-generated vector.
37 lines
1.1 KiB
XML
37 lines
1.1 KiB
XML
<?xml version="1.0"?>
|
|
<extension key="webform-mw" type="module">
|
|
<file>webform_mw</file>
|
|
<name>WebForm-mw</name>
|
|
<description>
|
|
Adds an "Engagement Report" tab to Organization contact pages that embeds
|
|
the FCI Co-op Survey staff report (the WebForm-mw Next.js app) for the
|
|
organization. Read-only; the embedded app handles its own auth via a
|
|
shared staff secret.
|
|
</description>
|
|
<license>AGPL-3.0</license>
|
|
<maintainer>
|
|
<author>Food Co-op Initiative</author>
|
|
<email>survey@fci.coop</email>
|
|
</maintainer>
|
|
<urls>
|
|
<url desc="Main Extension Page">https://github.com/joelbrock/WebForm-mw</url>
|
|
</urls>
|
|
<releaseDate>2026-10-30</releaseDate>
|
|
<version>0.4.0</version>
|
|
<develStage>beta</develStage>
|
|
<compatibility>
|
|
<ver>5.50</ver>
|
|
</compatibility>
|
|
<comments>
|
|
Configuration is via PHP constants in civicrm.settings.php (or
|
|
environment variables on the CiviCRM server). See README.md.
|
|
</comments>
|
|
<classloader>
|
|
<psr0 prefix="CRM_" path=""/>
|
|
</classloader>
|
|
<civix>
|
|
<namespace>CRM/WebformMw</namespace>
|
|
<format>22.05.0</format>
|
|
</civix>
|
|
</extension>
|