Permissions & Security
ProcessReactExportProfile enforces strict separation of privileges across viewing, running exports, downloading ZIP archives, and deleting profiles.
All 4 RBAC Permissions
Section titled “All 4 RBAC Permissions”| Permission Constant | Permission Name | Granted Capabilities |
|---|---|---|
ProcessReactExportProfile::PERMISSION_VIEW |
react-export-profile |
Open Setup -> Export Site Profile, inspect profiles library, presets, and pre-flight audit reports. |
ProcessReactExportProfile::PERMISSION_RUN |
react-export-profile-run |
Start and step chunked exports (./chunk/), verify profiles, upload installer screenshots (./upload/), and save/manage presets (./action/). |
ProcessReactExportProfile::PERMISSION_DOWNLOAD |
react-export-profile-download |
Stream path-contained exported profile ZIP archives (./download/). |
ProcessReactExportProfile::PERMISSION_DELETE |
react-export-profile-delete |
Delete exported profile directories and ZIP archives. |
Superuser-Only & High-Risk Plan Escalations
Section titled “Superuser-Only & High-Risk Plan Escalations”ExportPlan::requiresSuperuser() automatically blocks non-superusers from enabling high-risk export options such as:
- Exporting raw user accounts (
--include-users) - Disabling automatic secret scrubbing (
--no-scrub-secrets) - Injecting custom PHP into the generated post-install finish script (
allowCustomFinishPhp)
Additionally, ExportProfileRuntime::redactPathsForNonSuperuser() strips absolute host filesystem paths from audit and profile payloads returned to non-superuser clients.
Request Limits, CSRF & Audit Logging
Section titled “Request Limits, CSRF & Audit Logging”| Control | Constant / Value | Purpose |
|---|---|---|
| Maximum JSON body | MAX_JSON_BODY_BYTES = 524288 (512 KB) |
Caps JSON POST bodies on ./action/ and ./chunk/. |
| Maximum JSON depth | MAX_JSON_DEPTH = 16 |
Prevents deeply nested JSON exhaustion. |
| Maximum JSON elements | MAX_JSON_ELEMENTS = 8192 |
Caps recursive element counts in submitted plans. |
| Maximum screenshot size | MAX_SCREENSHOT_BYTES = 5242880 (5 MB) |
Caps PNG/JPG/WEBP/GIF installer preview uploads on ./upload/. |
| CSRF validation | $session->CSRF->validate() |
Enforced on ./action/, ./chunk/, and ./upload/. |
| Audit log channel | AUDIT_LOG_CHANNEL = 'react-export-profile-audit' |
Records every export start, completion, download, verification, and deletion via ExportProfileRuntime::audit(). |