Secure Liquid authoring and add LiquidField - #19820
Open
sebastienros wants to merge 1 commit into
Open
sebastienros wants to merge 1 commit into
sebastienros wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
|
This pull request has merge conflicts. Please resolve those before requesting a review. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Liquid templates are executable content, while HTML and Markdown should remain ordinary authored source with sanitization applied only to their final rendered output. This implements the Orchard Core 4.0 portion of the long-term separation described in #19817.
Changes
ManageLiquidTemplatespermission, grants it to Administrator and Editor by default, preserves existing Editor access through migration, and requires it server-side for Liquid parts, fields, Templates, Admin Templates, and template preview.LiquidFieldwith editing, validation, rendering, indexing, GraphQL, migrations, source-safe embedding, and documentation.RenderLiquidsettings from HTML and Markdown parts and fields while retaining shortcodes.HtmlMenuItemPartat the public rendering boundary by sanitizing a clone and rejecting unsafe or malformed URL schemes without mutating stored content.RenderLiquidenabled without rewriting settings or content.Migration notes
Existing Liquid syntax in HTML and Markdown remains stored but is no longer executed. Definitions that previously enabled
RenderLiquidmust be migrated manually toLiquidPartorLiquidField; startup warnings identify each affected content type, part, and field.Validation
dotnet build src/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj -f net10.0 --no-restoreRelated to #19817.