Jump to main content Jump to doc navigation

The MODX 2.8.2 and 2.8.3 releases contain several security improvements that may break parts of an existing site.

Note: The v2.8.2 release contained a few bugs. Most notably the ability to render static html was unintentionally removed and rich text editors like TinyMCE could no longer render the media browser. These issues were fixed in v2.8.3, released on May 28th.

Static resource paths

After upgrading to 2.8.2 all static resources are restricted to the assets directory by default unless you’ve previously configured resource_static_path. Static resources located anywhere else (core, outside the webroot, etc) will throw a 404 (#15656).

If you store static resources elsewhere, pick one option:

  1. (Recommended) Set resource_static_path to the absolute path of your static files — {core_path}files/ for core/files/, or {base_path} for files anywhere in the site root.
  2. (Not recommended) Enable resource_static_allow_absolute to allow any valid absolute path.

Important: enabling resource_static_allow_absolute, or configuring a too wide path in resource_static_path will allow a malicious manager user to access any file on the file system, including files that may not be meant to be disclosed, such as configuration files or server files. Either set it to a publicly accessible directory like assets, or a directory specific to static resources, so that no files can be read that a user should not have access to.

Before 2.8.2 the new_static_resource, new_weblink and new_symlink permissions only hid resource types in the resource tree toolbar. They were not enforced: a user could change an existing resource’s type, or set the resource type in the URL parameters.

In 2.8.2 those creation permissions are enforced, and new permissions control editing and deleting the resource types.

The core “Administrator”, “Content Editor” and “Developer” access policies include the new permissions by default. If you have your own policies and users are to manage static resources, weblinks or symlinks, add:

Permission What it allows
new_static_resource, new_weblink, new_symlink Creating a resource of that type; enforced since 2.8.2, no longer just a hidden toolbar button
edit_static_resource, edit_weblink, edit_symlink Editing an existing resource of that type
delete_static_resource, delete_weblink, delete_symlink Deleting a resource of that type
edit_document, delete_document Generic editing and deleting of documents, also required for the rows above

[[++table_prefix]] in @SELECT TV options

In 2.8.2, replace [[++table_prefix]] in TV options with [[+PREFIX]] (#15695). Version 2.8.3 restored the [[++table_prefix]] placeholder (#15714).

Custom Manager Themes

If you use a custom manager theme, the manager may stop working after the upgrade. The developer console may show errors caused by heightened security when loading the configuration (#15644).

Find the custom theme’s header.tpl file (e.g. manager/templates/mytheme/header.tpl) and replace the modx.config.js.php script reference from:

<script src="{$_config.connectors_url}modx.config.js.php?action={$smarty.get.a|default|htmlspecialchars}{if $_ctx}&wctx={$_ctx}{/if}"></script>

to the following, which adds the HTTP_MODAUTH token:

<script src="{$_config.connectors_url}modx.config.js.php?action={$smarty.get.a|default|htmlspecialchars}{if $_ctx}&wctx={$_ctx}{/if}&HTTP_MODAUTH={$_authToken|default|htmlspecialchars}"></script>

Support the team building MODX with a monthly donation.

The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.

Backers

  • modmore
  • STERC
  • Digital Penguin
  • Jens Wittmann – Gestaltung & Entwicklung
  • CrewMark
  • Fabian Christen
  • Sepia River Studios
  • Dannevang Digital
  • A. Moreno
  • Alex
  • Chris Fickling
  • Stéphane Jäggi
  • YJ
  • Murray Wood
  • JT Skaggs
  • Anton Tarasov
  • deJaya
  • Lefthandmedia
  • eydolan
  • Following Sea
  • Guido Gallenkamp
  • Raffy
  • Snow Creative
  • Nick Clark
  • Guest
  • Helen
  • krisznet
  • Yanni
  • Richard

Budget

$185 per month—let's make that $500!

Learn more