fix(core): avoid caching missing locale data · angular/angular@98f42ea · GitHub
Skip to content

Commit 98f42ea

Browse files
SkyZeroZxthePunderWoman
authored andcommitted
fix(core): avoid caching missing locale data
Only cache locale data loaded from the global locale registry when an actual locale entry is found. This prevents attacker-controlled missing locale identifiers from being retained indefinitely in SSR when locale lookup falls back to a parent locale or the built-in English locale, avoiding unbounded process memory growth in locale-aware pipes and formatters.
1 parent 417a407 commit 98f42ea

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

packages/core/src/i18n/locale_data_api.ts

Lines changed: 10 additions & 1 deletion

packages/core/test/i18n/locale_data_api_spec.ts

Lines changed: 10 additions & 0 deletions

0 commit comments

Comments
 (0)