Skip to content

Permissions & Security

Mystique defines zero custom ProcessWire RBAC permissions and inherits ProcessWire’s native template and field-level permissions (page-edit, field-* context permissions, and superuser module administration).

Surface Protection Mechanism
Selector & SQL Queries Subfield identifiers must match /^[A-Za-z0-9_][A-Za-z0-9_-]*$/ (invalid names throw WireException). All selector values use PDO parameter binding, and SubfieldMigrationTools::renameSubfieldData() escapes table identifiers inside a database transaction.
AJAX Media Uploads MystiqueFileAjaxHandler enforces $user->isLoggedin(), $session->CSRF->hasValidToken(), !$config->demo, $hostPage->editable($field), and ProcessWire’s native WireUpload + $sanitizer->validateFile() upload scanners.
Page Reference Values MystiqueValue::extractPositivePageIds() accepts strictly positive integer IDs and rejects arbitrary strings or selector-injection payloads.
Config & @fieldset: Paths Finder and ResourceRegistry reject symlinks and any path resolving outside site/templates/ or site/modules/. Circular @fieldset: imports throw WireException.
JSON Import Limits When allowImport is enabled on a field, InputfieldMystique enforces a strict 1 MiB payload size limit and maximum JSON nesting depth of 64.
XSS Output Encoding Enabling useEntityEncode automatically encodes plain text subfields with $sanitizer->entities() when $page->of(true), while preserving rich HTML subfields (TINYMCE, CKEDITOR).

When $config->demo is enabled in site/config.php, MystiqueFileAjaxHandler blocks AJAX media uploads and deletions cleanly so public demo instances cannot be abused for file storage.

Next steps