Skip to content

[5.x] Antlers user content and config#14058

Merged
jasonvarga merged 8 commits into5.xfrom
antlers-user-content
Feb 24, 2026
Merged

[5.x] Antlers user content and config#14058
jasonvarga merged 8 commits into5.xfrom
antlers-user-content

Conversation

@jasonvarga
Copy link
Member

@jasonvarga jasonvarga commented Feb 24, 2026

This PR adds and uses a new method to parse Antlers to force it into user content mode which is safer and is what already happens for Antlers enabled fields. (This part has been reverted and made the default behavior in #14092)

It also changes the config variable available in the context to a safer subset. It still has a large number of sensible defaults but if you need to make more available, you can add to the config:

// config/statamic/system.php
'view_config_allowlist' => [
  '@default', // spreads the defaults into this array
  'package-name.config-name',
],

@jasonvarga jasonvarga marked this pull request as ready for review February 24, 2026 17:34
@jasonvarga jasonvarga merged commit 01ca084 into 5.x Feb 24, 2026
27 checks passed
@jasonvarga jasonvarga deleted the antlers-user-content branch February 24, 2026 18:30
@MrMooky
Copy link

MrMooky commented Mar 2, 2026

I know this has been merged already, but what's the reason not to support wildcard parameters like services.*? Right now, I have to list them manually like this:

'services.algolia.app_id',
'services.algolia.search_key',
'services.algolia.indexname_de',
'services.algolia.indexname_en',

This is fine for a few variables, but still, allowing wildcard configs to be used would be nice.

@afonic
Copy link

afonic commented Mar 2, 2026

Is there a way for a package to configure this? Because right now this seems like a huge breaking change.

@duncanmcclean
Copy link
Member

I know this has been merged already, but what's the reason not to support wildcard parameters like services.*? Right now, I have to list them manually like this:

Content editors shouldn't be able to expose API keys unless explicitly allowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants