Repository navigation
web/elements: compile ak-mdx API content as CommonMark (cherry-pick #24524 to version-2026.5) - #27121
Conversation
`<ak-mdx>` renders two kinds of source: documentation that is authored
in-tree and bundled with the web interface (`url`), and content that
comes back from the API (`content`) - user and group notes, and
blueprint descriptions.
Both were compiled as MDX. MDX evaluates expressions (`{...}`) and ESM
imports/exports of a source when the compiled module runs, so API
content was evaluated as code. The DOMPurify pass in front of the
compiler works at the HTML level and does not see either construct.
Compile `content` as CommonMark instead, so no part of it is evaluated,
and keep MDX for the bundled documentation. Reported privately as
GHSA-5vfm-49hj-h95w.
…#24524) Render <ak-mdx> with content that calls a probe from an expression and from an ESM export, and assert the probe never runs, while Markdown still renders. Co-authored-by: Teffen Ellis <[email protected]>
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
2a214d5 to
9224f8c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## version-2026.5 #27121 +/- ##
==================================================
+ Coverage 93.41% 93.59% +0.18%
==================================================
Files 1056 1056
Lines 63071 63071
Branches 400 400
==================================================
+ Hits 58920 59034 +114
+ Misses 4151 4037 -114
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-9224f8ce87ffc4a9ec65921cd01627c9b80112d6
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-9224f8ce87ffc4a9ec65921cd01627c9b80112d6Afterwards, run the upgrade commands from the latest release notes. |
Cherry-pick of #24524 to
version-2026.5branch.Original PR: #24524
Original Author: @kah-ja
Cherry-picked commit: aeb0989
Details
This PR also carries the fix from #24524's original commit, which could not land on
mainbecause #21949 removedak-mdx.tsxthere.content(user and group notes, blueprint descriptions) as CommonMark, so no part of it is evaluated.url.