This repository has been archived by the owner on Dec 18, 2024. It is now read-only.
Update dependency league/commonmark to v2.6.0 [SECURITY] #175
+71
−72
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:
2.3.5
->2.6.0
Warning
Some dependencies could not be looked up. Check the warning logs for more information.
GitHub Vulnerability Alerts
GHSA-c2pc-g5qf-rfrf
Impact
Several polynomial time complexity issues in league/commonmark may lead to unbounded resource exhaustion and subsequent denial of service.
Malicious users could trigger that inefficient code with carefully crafted Markdown inputs that are specifically designed to ensure the worst-case performance is reached. Sending multiple such requests in parallel could tie up all available CPU resources and/or PHP-FPM processes, leading to denial of service for legitimate users.
Patches
These vulnerabilities have been patched in version 2.6.0. All users on older versions are highly encouraged to upgrade as soon as possible.
Workarounds
If you cannot upgrade, you may be able to mitigate the issues by:
memory_limit
andmax_execution_time
PHP configurations to prevent runaway resource usageReferences
Most of these issues were discovered in other Markdown parsers. You can read more about them here:
For general information about this type of issue:
Release Notes
thephpleague/commonmark (league/commonmark)
v2.6.0
Compare Source
This is a security release to address potential denial of service attacks when parsing specially crafted,
malicious input from untrusted sources (like user input).
Added
max_delimiters_per_line
config option to prevent denial of service attacks when parsing malicious inputtable/max_autocompleted_cells
config option to prevent denial of service attacks when parsing large tablesAttributesExtension
now supports attributes without values (#985, #986)AutolinkExtension
exposes two new configuration options to override the default behavior (#969, #987):autolink/allowed_protocols
- an array of protocols to allow autolinking forautolink/default_protocol
- the default protocol to use when none is specifiedRegexHelper::isWhitespace()
method to check if a given character is an ASCII whitespace characterCacheableDelimiterProcessorInterface
to ensure linear complexity for dynamic delimiter processingBracket
delimiter type to optimize bracket parsingChanged
[
and]
are no longer added asDelimiter
objects on the stack; a newBracket
type with its own stack is used insteadUrlAutolinkParser
no longer parses URLs with more than 127 subdomainsDelimiterInterface::getIndex()
DelimiterStack
now accepts integer positions for any$stackBottom
argumentv2.5.3
Compare Source
Changed
source
, addsearch
to list of recognized block tagsv2.5.2
Compare Source
Changed
true
value (#1040)Fixed
v2.5.1
Compare Source
Fixed
Table
start line numbers (#1037)v2.5.0
Compare Source
Added
AttributesExtension
now supports attributes without values (#985, #986)AutolinkExtension
exposes two new configuration options to override the default behavior (#969, #987):autolink/allowed_protocols
- an array of protocols to allow autolinking forautolink/default_protocol
- the default protocol to use when none is specifiedChanged
Paragraph
s only containing link reference definitions will be kept in the AST until theDocument
is finalizedParagraph
)Fixed
v2.4.4
Compare Source
Fixed
v2.4.3
Compare Source
Fixed
UrlAutolinkParser
incorrectly parsing text containingwww
anywhere before an autolink (#1025)v2.4.2
Compare Source
Fixed
FencedCodeRenderer
: don't addlanguage-
to class if already prefixedDeprecated
DelimiterProcessorInterface::getDelimiterUse()
is deprecatedCacheableDelimiterProcessorInterface
to help the engine perform caching to avoid performance issues.null
fromDelimiterInterface::getIndex()
) is deprecated and will not be supported in 3.0DelimiterInterface::isActive()
andDelimiterInterface::setActive()
, as these are no longer used by the engineDelimiterStack::removeEarlierMatches()
andDelimiterStack::searchByCharacter()
, as these are no longer used by the engineDelimiterInterface
as the$stackBottom
argument toDelimiterStack::processDelimiters()
or::removeAll()
is deprecated and will not be supported in 3.0; pass the integer position instead.Fixed
v2.4.1
Compare Source
Fixed
ExternalLinkProcessor
not fully disabling therel
attribute when configured to do so (#992)v2.4.0
Compare Source
Added
CommonMarkException
marker interface for all exceptions thrown by the libraryAlreadyInitializedException
InvalidArgumentException
IOException
LogicException
MissingDependencyException
NoMatchingRendererException
ParserLogicException
heading_permalink/apply_id_to_heading
- Whentrue
, theid
attribute will be applied to the heading element itself instead of the<a>
tagheading_permalink/heading_class
- class to apply to the heading elementheading_permalink/insert
- now acceptsnone
to prevent the creation of the<a>
linktable/alignment_attributes
configuration option to control how table cell alignment is rendered (#959)Changed
RuntimeException
toLogicException
(or something extending it), including:CallbackGenerator
s that fail to set a URL or return an expected valueMarkdownParser
when deactivating the last block parser or attempting to get an active block parser when they've all been closedEnvironment
Node
when no renderer has been registered for itHeadingPermalinkProcessor
now throwsInvalidConfigurationException
instead ofRuntimeException
when invalid config values are given.HtmlElement::setAttribute()
no longer requires the second parameter for boolean attributesFixed
@throws
docblocks throughout the codebase, includingConverterInterface
,MarkdownConverter
, andMarkdownConverterInterface
.\RuntimeException
s were thrown, which was inaccurate as\LogicException
s were also possible.v2.3.9
Compare Source
Fixed
v2.3.8
Compare Source
Fixed
mb_internal_encoding()
is set to something other thanUTF-8
(#951)v2.3.7
Compare Source
Fixed
TaskListItemMarkerRenderer
not including HTML attributes set on the node by other extensions (#947)v2.3.6
Compare Source
Fixed
.
) (#943)Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.