38441 Commits

Author SHA1 Message Date
Joey Perrott 09c03a2fe1 release: bump version of in memory web api 2026-06-03 16:36:28 +02:00
Alan Agius 27e8fc27cb release: bump Angular DevTools version to 1.15.1 2026-06-03 16:13:17 +02:00
Pawel Kozlowski 418b68a661 docs: release notes for the v22.0.0 release 2026-06-03 16:04:51 +02:00
Pawel Kozlowski 4b76e32988 docs: release notes for the v21.2.16 release 2026-06-03 14:32:19 +02:00
Cheng-Hsuan Tsai b84e5ef183 docs: add Signal Forms integration example to Angular Aria Autocomplete guide 2026-06-03 11:23:22 +02:00
Kam 192ac021e4 docs: use Türkiye as the country name in aria autocomplete examples
The aria autocomplete examples list "Turkey" in their country data, but
the country's official name is "Türkiye". Update all nine app.ts variants
to use it.

While there, remove a junk "Imporant" entry from the highlight/retro
variant's list, which is not a country and was a misspelled stray paste.
2026-06-03 11:19:53 +02:00
cexbrayat a6a3132903 docs: update DI fundamentals to use @Service 2026-06-03 11:18:50 +02:00
cexbrayat 3bb602ffe6 docs: simplify testing setup examples 2026-06-03 11:17:43 +02:00
Cheng-Hsuan Tsai af62d88bbd docs: update Aria Menu focus/hover style and add context menu example 2026-06-03 11:16:13 +02:00
cexbrayat ac30e4891a docs: update signal forms conditional rules 2026-06-03 11:06:03 +02:00
Matthieu Riegler e695379354 fix(core): harden inherit definition feature against polluted prototypes
Stop inheritance traversal before built-in prototype objects and only read `ɵcmp`/`ɵdir` when they are own properties of a super type. This prevents polluted inherited properties from being treated as Angular defs during inheritance merging.

Also adds regression tests covering polluted `Object.prototype.ɵdir` and `Object.prototype.ɵcmp` to ensure polluted host metadata is not inherited.
2026-06-02 13:25:55 +02:00
Pawel Kozlowski b08164121d docs: release notes for the v19.2.25 release 2026-06-02 13:21:37 +02:00
Pawel Kozlowski ebc7dbe477 docs: release notes for the v20.3.24 release 2026-06-02 13:11:46 +02:00
Angular Robot 30ff589566 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-06-02 12:25:05 +02:00
Cheng-Hsuan Tsai a76bc3c849 docs: add testing guides to Angular Aria 2026-06-02 11:25:00 +02:00
Michael Small 42391329c2 docs: fix min/max form template examples 2026-06-02 11:23:01 +02:00
Joey Perrott 3093edcad0 fix(docs-infra): secure update-assets script against RCE and SSRF
- Validate storedSha and storedBranch from _build-info.json.
- Validate latestSha returned from GitHub API.
- Validate branch in GithubClient.getShaForBranch and baseSha/headSha in GithubClient.getAffectedFiles.
- Use execFileSync instead of execSync to avoid shell execution.

TAG=agy
CONV=4e3e69ba-3f3d-416b-9ce4-9ef75486d2f3
2026-06-02 11:21:56 +02:00
Ben Hong c0eef66bbe docs: add conditional validation to signal forms validation guide 2026-06-02 11:20:52 +02:00
Pawel Kozlowski 3cc9e2b7a9 docs: release notes for the v22.0.0-rc.3 release 2026-06-01 22:08:04 +02:00
Alan Agius 0b19c92d44 fix(platform-server): throw on suspicious URLs and restrict protocol-relative URLs
Currently, the platform-server attempts to neutralize URL hijacking and SSRF
bypasses by collapsing multiple leading slashes in relative paths. However,
sophisticated bypasses using obfuscated protocols (e.g., carriage returns or
newlines) or relative-like backslash paths can still lead to unexpected
origin takeovers.

This commit improves security by doing the following:
- Rejects protocol-relative URLs by throwing an error if they are not
  explicitly permitted via `allowProtocolRelative`.
- Strictly validates resolved URLs against the provided origin using
  `isSafeOriginChange`. If a URL unexpectedly shifts origins, an error
  is thrown.
- Permits origin changes only when standard absolute http/https protocols are
  explicitly declared in the input URL.
2026-06-01 20:03:22 +02:00
Angular Robot 085e66ef03 build: update dependency @mcp-b/webmcp-types to v3
See associated pull request for more information.
2026-06-01 20:02:26 +02:00
Bhuvansh855 ac47524ede docs(core): fix typos and grammar in dependency injection guides 2026-06-01 18:56:09 +02:00
Matthieu Riegler 6038b9ede7 fix(migrations): Make the safe optional chaining idempotent
Our unit tests were missleading, the migration wasn't idempotent and `$safeNavigationMigration` were added multiple times on consecutive runs.
2026-06-01 18:50:21 +02:00
Matthieu Riegler 683172b39a refactor(core): Update webmcp support to use document.modelContext
The implementation in Chrome 150 moved `modelContext` from the navigator to the document (see webmachinelearning/webmcp/pull/184)

We're also removing the calls to the deprecated `unregisterTool` method.

fixes #68947
2026-06-01 18:49:04 +02:00
Angular Robot 688cb51d95 build: update dependency concurrently to v10
See associated pull request for more information.
2026-06-01 18:47:21 +02:00
Angular Robot 71a11b2f30 build: update pnpm to v11.5.0
See associated pull request for more information.
2026-06-01 18:45:37 +02:00
Matthieu Riegler ec4f08bb94 docs(docs-infra): simplify code block styles
#68940 introduced a regression that broke style for wrapped `code` blocks.
Simplifying the style by droping the unecessary gradient + before workaround fixes the issue.
2026-06-01 18:36:50 +02:00
Kam 032fae8b36 refactor(docs-infra): correct misspelled CodeHighlighter class name
The class exported from `code-highlighter.ts` was named `CodeHighligher` (missing the second `h`) and its private field was `cachedHighligher`, both disagreeing with the filename which spells "highlighter" correctly. Rename the class to `CodeHighlighter` and the field to `cachedHighlighter`, and update the sole consumer (`CodeBlock`). Pure rename, no behavior change.
2026-06-01 18:34:47 +02:00
KirtiRamchandani 9b5952e3a3 docs: mention Angular Aria in accessibility guide 2026-06-01 18:33:28 +02:00
Angular Robot 5215f7345a build: update dependency @mcp-b/webmcp-polyfill to v3
See associated pull request for more information.
2026-06-01 18:24:49 +02:00
Matthieu Riegler c743af4919 docs: add v22 entries to the update guide 2026-06-01 18:20:00 +02:00
Kristiyan Kostadinov f0b28f6443 fix(compiler): move projection attributes into constants
We can save some memory by moving the `attrs` passed into the `projection` instruction into the constant pool.
2026-06-01 12:28:28 +02:00
Kam f777dd112e docs: fix esbuild and TensorFlow branding on overview page
The esbuild card on the "What is Angular?" page rendered the bundler name three different ways (title "esbuild", link "ESBuild and Vite", body "Vite and ESBuild") so this unifies on the official lowercase "esbuild"; also corrects "Tensorflow" to "TensorFlow" to match the other brands on its line (Firebase, Material Design, Flutter, Google Cloud) which were already cased correctly.
2026-06-01 12:19:01 +02:00
arturovt 2b44a07ea7 docs: document //i18n(ph="name") placeholder syntax for template interpolations
The `//i18n(ph="name")` comment syntax for naming interpolation placeholders
in templates was not documented anywhere in the i18n guide, despite being a
supported compiler feature with test coverage.

Add a "Name the interpolation placeholder" subsection under "Mark text in
component template" in prepare.md, mirroring the existing subsection in
"Mark text in component code". Includes a cross-reference to the $localize
equivalent (`${var}:name:`) to help readers connect the two approaches.

Closes #52070
2026-06-01 12:18:03 +02:00
aparziale cbc36f59e0 docs: fix link debbuging and extended-diagnostics
Update link for 'Improve debbuging with better Angular error messages' and 'extended-diagnostics' sections

Fixed #69010
2026-06-01 12:16:57 +02:00
Kam 0010ad5910 fix(docs-infra): readable contrast for DEV/EXP api badges in light mode
The DEV (developer preview) and EXP (experimental) badges in the API reference list used `--page-background` for text, which is dark in dark mode (working as intended on the pale colored bg) but white in light mode, making the labels invisible against the near-white badge bg. Introduce an `--item-attr-text` CSS variable defaulting to `--page-background` and overridden to `--primary-contrast` in light mode, following the per-mode pattern the file already uses for `--item-attr-base-mix`.
2026-06-01 11:57:47 +02:00
Kristiyan Kostadinov 96ed0fe45b fix(docs-infra): round up media queries
Uses 1px increments for media queries, rather than the 0.01px we have now which seem to be a bit too precise and cause the UI to be stuck between states in some cases.

I've also removed some unnecessary `calc`, because the calculation is happening inside Sass already.

Fixes #69020.
2026-06-01 11:34:38 +02:00
cexbrayat 45e8fb5d6c refactor(forms): type built-in getError results
Add overloads for built-in validation error keys so callers get precise error payload types from getError.

This enables signal forms template patterns like:

```html
@if (login.getError('minLength'); as minLengthError) {
  <div>Login should be {{ minLengthError.minLength }} characters</div>
}
```
2026-05-29 14:58:40 +02:00
arturovt 0deac976f3 fix(core): use Object.create(null) for LOCALE_DATA as a hardening measure
Prior to this commit, `LOCALE_DATA` was initialized as a plain object literal:

```typescript
let LOCALE_DATA: {[localeId: string]: any} = {};
```

While `__proto__` is neutralized by the `replace(/_/g, '-')` sanitization step (becoming `--proto--`), keys like `constructor` and `prototype` pass through unchanged and would modify special properties on `Object.prototype` if used as bracket notation keys on a plain object.

**Example attack through the public API:**

```typescript
// attacker calls the public registerLocaleData API with a crafted localeId
registerLocaleData(data, 'constructor');

// internally becomes:
LOCALE_DATA['constructor'] = data;
// → modifies Object.prototype.constructor for every object in the process

// or with extraData:
registerLocaleData(data, 'constructor', extraData);
// LOCALE_DATA['constructor'][LocaleDataIndex.ExtraData] = extraData;
// → Object.prototype[LocaleDataIndex.ExtraData] = extraData
// → every plain object in the process now has this property
// → affects JSON serialization, property enumeration, and framework internals

// consequence — any subsequent object created in the process is affected:
const user = getUserFromSession();
console.log(user[LocaleDataIndex.ExtraData]); // → attacker-controlled value
```

In a long-running SSR server this pollution persists for the lifetime of the process and affects all subsequent requests from all users.

**The fix** initializes `LOCALE_DATA` with `Object.create(null)`:

```typescript
let LOCALE_DATA: {[localeId: string]: any} = Object.create(null);
```

A null-prototype object has no prototype chain, so any key is treated as a plain string with no special behavior, making prototype pollution impossible regardless of input — without relying on the sanitization step as the sole protection.
2026-05-29 14:55:47 +02:00
arturovt e50f504b2f fix(zone.js): validate __Zone_symbol_prefix to prevent DOM clobbering attacks
Previously, `__Zone_symbol_prefix` was read directly from `globalThis` without validating its type:

const symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__';

This made it possible for DOM clobbering to interfere with Zone’s internal symbol handling. If an attacker injected a DOM element with the same name (for example via a form field or anchor ID), `global['__Zone_symbol_prefix']` could resolve to a DOM element instead of a string. Because DOM elements are truthy, the fallback would not be used, and Zone would construct invalid internal keys (e.g. “[object HTMLFormElement]...”), breaking patching and lookup logic in subtle ways.

This prevents DOM clobbering from influencing Zone’s internal symbol generation and keeps the patching system stable even in the presence of malicious or unexpected global values.
2026-05-29 14:54:13 +02:00
rootvector2 d109bf90d5 fix(common): only strip a literal /index.html suffix from URLs
Hit this while exercising `Location.normalize` with route paths that end in non-`.html` suffixes.

The unescaped `.` in the strip regex inside `_stripIndexHtml` matches any character, so e.g. `/foo/indexXhtml` and `/foo/index_html` both collapse to `/foo` before the base-path strip and end up resolving to the wrong route.

Escape the dot so only the literal `/index.html` suffix is stripped.
2026-05-29 13:16:01 +02:00
Alan Agius e14d34e9ee refactor(platform-server): clean up and simplify url resolution utility
Trims leading/trailing whitespaces in resolveUrl to normalize input.
2026-05-29 13:14:07 +02:00
Angular Robot 89c28d3704 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-05-29 12:21:16 +02:00
Christian Oliff 76dfb94e03 docs: changelog typo fixes 2026-05-29 11:56:26 +02:00
Christian Oliff 4640146f2d docs: changelog typo fixes
Found with cSpell VS Code extension
2026-05-29 11:56:26 +02:00
arturovt 2f49d5dba4 docs: document i18n object forms for sourceLocale and locales in angular.json
The `sourceLocale` and `locales` entries in `angular.json` accept object
forms (with `code`, `baseHref`, and `subPath`) that were never documented.

- Add an `i18n options` reference section to workspace-config.md covering
  the full shape of `sourceLocale` and each `locales` entry, including the
  distinction between `baseHref` (HTML only) and `subPath` (HTML + output
  directory name)
- Add `i18n` to the project configuration options table in workspace-config.md
- Expand the suboptions table in merge.md to mention the object forms and
  link to the new reference section

Closes #59664
2026-05-29 11:53:48 +02:00
Angular Robot 5f62a95bab build: update cross-repo angular dependencies
See associated pull request for more information.
2026-05-29 11:49:44 +02:00
Angular Robot 74d5886c46 build: update all non-major dependencies
See associated pull request for more information.
2026-05-29 11:47:46 +02:00
tjshiu f0e164e4cb docs: remove redundant keydown bindings in autocomplete examples 2026-05-29 11:46:35 +02:00
tjshiu 3939799e18 docs: add clear buttons inside autocomplete examples 2026-05-29 11:46:35 +02:00