This is a security release to address a denial of service vulnerability in the AttributesExtension.
Added
Added a new table_of_contents/max_placeholder_entries option to limit how many table of contents entries a document may render across all of its placeholders (#1134)
Added Cursor::matchInPlace(), which matches a regular expression at the cursor's position within the line using PCRE's native offset semantics instead of copying the remainder (#1145)
\G anchors at the cursor, ^ anchors at the start of the line, and lookbehinds and \b see the characters actually preceding the cursor; this keeps scanning loops linear and enables left-context assertions that match() cannot express
Added RegexHelper::PARTIAL_LINK_TITLE_UNANCHORED and RegexHelper::PARTIAL_LINK_DESTINATION_BRACES, unanchored fragments so each call site can supply its own anchor
Added a default_attributes configuration format which pairs the node attribute map with a new strict_callables option: ['default_attributes' => ['attributes' => [...], 'strict_callables' => true]]. With strict_callables enabled, only closures and invokable objects are treated as callbacks, so strings and arrays are always used as literal attribute values. Callbacks written as string or array callables can be wrapped with Closure::fromCallable(). The original format - passing the node map directly - is still accepted, and defaults strict_callables to false.
Added a new slug_normalizer/reserved option which treats the given slugs as already-used, so colliding headings receive an incremental numeric suffix just like duplicate headings do (#1080)
Changed
Changed the TableOfContents extension to render the table of contents once and share it across all placeholders instead of cloning it into each one (#1134)
A custom renderer registered for the TableOfContents node is no longer called once per placeholder, so it must return the same markup each time it is called for a given document (#1134)
The first placeholder receives the table of contents itself, so a document still contains a TableOfContents node for listeners which locate and reposition it (#1143)
$environment->getConfiguration()->get('default_attributes') now returns the normalized structure with attributes and strict_callables keys instead of the node map; read default_attributes/attributes to get the map. Configuration written in either format continues to work unchanged.
Deprecated
Deprecated RegexHelper::PARTIAL_LINK_TITLE and RegexHelper::REGEX_LINK_DESTINATION_BRACES; use the unanchored variants with an explicit anchor instead
Deprecated the default_attributes strict_callables option, which will be removed in 3.0 when only closures and invokable objects will ever be treated as callbacks.
Fixed
Fixed default_attributes values which happen to match the name of a PHP function - such as 'class' => 'link', 'header', 'key', 'range', or 'current' - being invoked as callbacks, producing errors like link() expects exactly 2 arguments, 1 given. Enable strict_callables to treat strings and arrays as literal attribute values (#1123)
Fixed the DefaultAttributesExtension re-testing every configured value with is_callable() once per matching node, which asked the autoloader whether the first element of each array value named a real class every single time
Fixed a default_attributes value which PHP treats as callable reporting its failure from inside whichever function it collided with; the error now names the attribute and node class responsible, and keeps the original error as its previous exception
Fixed custom UniqueSlugNormalizerInterface implementations being wrapped by the built-in UniqueSlugNormalizer and never receiving the documented clearHistory() calls, which caused slug history to leak across documents when slug_normalizer/unique was set to 'document' (#1080)
Custom implementations are now trusted to enforce uniqueness themselves, per the interface contract; the extra deduplication layer the wrapper used to provide is no longer applied on top of them
Fixed the AttributesExtension re-merging and re-filtering everything a node had already collected each time another attribute node was applied to it, causing long runs of distinctly-named attributes to be resolved in quadratic time, which could be abused to cause a denial of service - this completes the fix for GHSA-jjv6-8j6v-6j52, which covered only the class attribute (GHSA-8rr7-cvq3-gmfh)
Fixed the AttributesExtension re-merging everything an attribute block had already collected on each of its continuation lines, causing long runs of distinctly-named attributes on consecutive lines to be resolved in quadratic time, which could be abused to cause a denial of service (GHSA-8rr7-cvq3-gmfh)
This release fixes a regression introduced in 2.9.0 which changed the behavior of Cursor::match() for certain regular expression patterns.
Changed
Improved performance of reading single characters from multibyte lines
Improved performance of locating the next non-space character on lines without tabs
Optimized Cursor::advanceToNextNonSpaceOrNewline() to scan the line in place instead of copying everything left in the block on every call
Optimized inline link destination parsing to scan the line in place, so its cost follows the length of the destination rather than the length of everything left in the block
Fixed
Fixed a regression introduced in 2.9.0 where Cursor::match() treated text before the cursor as part of the match subject (#1145). Patterns were matched against the whole line at an offset, which silently changed the meaning of \b, \B, \A, lookbehinds, a ^ anywhere other than the very start of the pattern, and a leading ^ combined with the m modifier. match() once again matches against the remainder, exactly as it did in 2.8; the core parsers keep the optimized in-place matching via a new internal method with PCRE's native offset semantics, anchoring their patterns at the cursor with \G
Fixed heading permalinks rendered with aria-hidden="true" remaining in the keyboard tab order; they are now also given tabindex="-1", as a focusable element removed from the accessibility tree has no accessible name to announce when focused (WCAG 4.1.2)
Fixed cloning a node breaking the link from the original node's children back to their parent, silently corrupting the document that node belonged to; detaching or inserting around those children afterwards could drop nodes from the tree
Fixed cloned nodes sharing their data with the node they were cloned from, so that setting an attribute on either one also set it on the other
This is a security release to address multiple denial of service vulnerabilities and one cross-site scripting (XSS) vulnerability.
Changed
Shortcut and collapsed reference links ([label] and [label][]) now apply the spec's 999-character link label limit when resolving the label, matching the limit already enforced when parsing reference definitions and when resolving the [text][label] form. A label longer than 999 characters which collapsed to a shorter, defined label once whitespace was normalized will no longer resolve; this matches cmark's behavior.
Fixed
Fixed attribute names prefixed with a form feed (such as {<FF>onclick="..."}) bypassing both the on* event handler filter and the allow_unsafe_links protection, as browsers treat that byte as whitespace and parse the name as a genuine onclick or href (GHSA-f8fg-pg57-v4j8)
Fixed catastrophic backtracking in the fenced code block start pattern, causing a single line of backticks to be scanned in quadratic time, which could be abused to cause a denial of service (GHSA-j8pm-gj4c-rq4x)
Fixed shortcut reference link lookups normalizing arbitrarily long labels once a single reference definition is present, causing nested brackets to be resolved in quadratic time, which could be abused to cause a denial of service (GHSA-j8pm-gj4c-rq4x)
Fixed delimiter processors keying the opener-search cache on the raw closer run length, leaving the cache key space unbounded and causing emphasis, strikethrough, and highlight runs to be processed in super-linear time, which could be abused to cause a denial of service (GHSA-j8pm-gj4c-rq4x)
Fixed the SmartPunctExtension recopying the whole preceding text node when replacing each unpaired quote, causing documents with many apostrophes to be processed in quadratic time, which could be abused to cause a denial of service (GHSA-jjv6-8j6v-6j52)
Fixed the AttributesExtension scanning the remaining siblings of every block-level attribute node, causing long runs of adjacent attribute blocks to be resolved in quadratic time, which could be abused to cause a denial of service - this completes the fix for GHSA-g2gp-3wwq-f4ph, which covered only inline attributes (GHSA-jjv6-8j6v-6j52)
Fixed the AttributesExtension rebuilding the accumulated class list on every merge, causing long runs of .class attributes to be resolved in quadratic time, which could be abused to cause a denial of service (GHSA-jjv6-8j6v-6j52)
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
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.
This PR contains the following updates:
Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
KnpLabs/php-github-api (knplabs/github-api)v3.16.1
Compare Source
Fixed
- Fix handling of 422 responses where errors is a string (GrahamCampbell) #1164
thephpleague/commonmark (league/commonmark)v2.10.0
Compare Source
This is a security release to address a denial of service vulnerability in the AttributesExtension.
Added
Changed
Deprecated
Fixed
v2.9.2
Compare Source
This release fixes a regression introduced in 2.9.0 which changed the behavior of Cursor::match() for certain regular expression patterns.
Changed
Fixed
v2.9.1
Compare Source
This is a security release to address multiple denial of service vulnerabilities and one cross-site scripting (XSS) vulnerability.
Changed
Fixed
- Fixed attribute names prefixed with a form feed (such as {<FF>onclick="..."}) bypassing both the on* event handler filter and the allow_unsafe_links protection, as browsers treat that byte as whitespace and parse the name as a genuine onclick or href (GHSA-f8fg-pg57-v4j8)
- Fixed catastrophic backtracking in the fenced code block start pattern, causing a single line of backticks to be scanned in quadratic time, which could be abused to cause a denial of service (GHSA-j8pm-gj4c-rq4x)
- Fixed shortcut reference link lookups normalizing arbitrarily long labels once a single reference definition is present, causing nested brackets to be resolved in quadratic time, which could be abused to cause a denial of service (GHSA-j8pm-gj4c-rq4x)
- Fixed delimiter processors keying the opener-search cache on the raw closer run length, leaving the cache key space unbounded and causing emphasis, strikethrough, and highlight runs to be processed in super-linear time, which could be abused to cause a denial of service (GHSA-j8pm-gj4c-rq4x)
- Fixed the SmartPunctExtension recopying the whole preceding text node when replacing each unpaired quote, causing documents with many apostrophes to be processed in quadratic time, which could be abused to cause a denial of service (GHSA-jjv6-8j6v-6j52)
- Fixed the AttributesExtension scanning the remaining siblings of every block-level attribute node, causing long runs of adjacent attribute blocks to be resolved in quadratic time, which could be abused to cause a denial of service - this completes the fix for GHSA-g2gp-3wwq-f4ph, which covered only inline attributes (GHSA-jjv6-8j6v-6j52)
- Fixed the AttributesExtension rebuilding the accumulated class list on every merge, causing long runs of .class attributes to be resolved in quadratic time, which could be abused to cause a denial of service (GHSA-jjv6-8j6v-6j52)
phpstan/phpstan-deprecation-rules (phpstan/phpstan-deprecation-rules)v2.0.5
Compare Source
- 67bedd6 - Update github-actions (#197)
- 6be8bd3 - Update actions/cache action to v6 (#198)
- 0b310ec - Update github-actions to v3.0.1 (#195)
- 782d848 - Update github-actions to v7 (#196)
- 85fff9d - Update github-actions to f3e473d (#194)
- 54db580 - Update github-actions (#193)
- 99aff1a - Replace deprecated actions/create-release with softprops/action-gh-release
- 971f8e1 - Bump GitHub Actions across major versions
- 89fef35 - Bump GitHub Actions within their current majors
- 0652358 - Update github-actions
- 02119cc - Update github-actions
- 389c78c - latest infection does not support PHP 8.2 (#189)
- 899202d - Update release-toot.yml (#188)
- 016d677 - name-collision-detector (#187)
- 945df12 - Delete .github/workflows/claude-react-on-comment.yml
- a70b8b1 - Remove default branch determination from workflow
- 1faeb2e - Lint workflows
- 534891e - [StepSecurity] ci: Harden GitHub Actions
- 3acc664 - Remove PHPSTAN_BOT_TOKEN from checkout step
- 49efeb2 - React on issues opened and fall back to issue body
- 319c3f6 - Add PHP 8.5 to CI matrix for lint, tests, and static analysis
- 73feeba - Add missing export-ignore entries to .gitattributes
- c6d73e5 - Add CLAUDE.md with project documentation
- f9f68eb - Add Claude React on Comment workflow
phpstan/phpstan-strict-rules (phpstan/phpstan-strict-rules)v2.0.12
Compare Source
- 2bc5ae1 - Allow GMP and BCMath\Number in arithmetic operations (#311)
- 70e3081 - Update github-actions (#324)
- 07a17dd - Update github-actions to v7 (#325)
- de9bdda - Update github-actions (#322)
- 80870ec - Replace deprecated actions/create-release with softprops/action-gh-release
- 109c14f - Bump GitHub Actions across major versions
- ebf31ff - Bump GitHub Actions within their current majors
- 727c193 - Update github-actions
- cc56619 - Update github-actions
- 1e72841 - Update release-toot.yml (#319)
- ada7e60 - CI: move name-collision job into build.yml (#318)
- 470946d - Add missing export-ignore entries to .gitattributes (#315)
- 8b14a8e - name-collision-detector (#314)
sebastianbergmann/phpunit (phpunit/phpunit)v10.5.64: PHPUnit 10.5.64
Compare Source
Changed
Learn how to install or update PHPUnit 10.5 in the documentation.
Keep up to date with PHPUnit:
- You can follow @phpunit@phpc.social to stay up to date with PHPUnit's development.
- You can subscribe to the PHPUnit Updates newsletter to receive updates about and tips for PHPUnit.
symfony/console (symfony/console)v6.4.44
Compare Source
Changelog (symfony/console@v6.4.43...v6.4.44)
v6.4.43
Compare Source
Changelog (symfony/console@v6.4.42...v6.4.43)
v6.4.42
Compare Source
Changelog (symfony/console@v6.4.41...v6.4.42)
v6.4.41
Compare Source
Changelog (symfony/console@v6.4.39...v6.4.41)
- bug #64355 Format message in ConsoleSectionOutput::overwrite() (@nicolas-grekas)
symfony/finder (symfony/finder)v6.4.44
Compare Source
Changelog (symfony/finder@v6.4.42...v6.4.44)
v6.4.42
Compare Source
Changelog (symfony/finder@v6.4.34...v6.4.42)
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.