Skip to content

[Backport 21.2.x] fix(common): Limits date format string length#69196

Open
SkyZeroZx wants to merge 1 commit into
angular:21.2.xfrom
SkyZeroZx:backport-69000-to-21.2.x
Open

[Backport 21.2.x] fix(common): Limits date format string length#69196
SkyZeroZx wants to merge 1 commit into
angular:21.2.xfrom
SkyZeroZx:backport-69000-to-21.2.x

Conversation

@SkyZeroZx
Copy link
Copy Markdown
Contributor

Backport of #69000

Introduces a maximum length of 256 characters for date format strings.

This prevents potential Denial of Service (DoS) attacks by throwing an
`INVALID_DATE_FORMAT` error if an excessively long format string is
provided to `formatDate` or `DatePipe`, safeguarding against performance
degradation or application crashes.

(cherry picked from commit 35de6b3)
@pullapprove pullapprove Bot requested a review from atscott June 5, 2026 19:18
@angular-robot angular-robot Bot added the area: common Issues related to APIs in the @angular/common package label Jun 5, 2026
@ngbot ngbot Bot added this to the Backlog milestone Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: common Issues related to APIs in the @angular/common package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant