Skip to content

Merging internal commits for release/10.0.1xx - #9194

Merged
akoeplinger merged 86 commits into
release/10.0.1xxfrom
internal-merge-10.0.1xx-2026-09-09-1724
Sep 11, 2026
Merged

akoeplinger merged 86 commits into
release/10.0.1xxfrom
internal-merge-10.0.1xx-2026-09-09-1724

Conversation

@dotnet-bot

Copy link
Copy Markdown
Collaborator

No description provided.

Mirroring and others added 30 commits July 26, 2026 23:31
… and cap cache of pathDescriptors

Fixing 2 problems:

1) A query-string parameter written with a mixed or shortened field-name spelling (e.g. `?tenantScope.tenant_id=…` or a parent like `?timestamp_value=…`) could bypass the existing name check and overwrite a value already bound from the URL path. This change compares the resolved field identities instead of raw name strings, so query parameters can no longer clobber route-bound fields regardless of how they're spelled.

2) A transcoded method whose request has a self-referential message field allows an unbounded set of valid dotted paths, so the per-endpoint path descriptor cache could grow without limit from repeated requests. Cap the cache size (default 1000, overridable via AppContext) to prevent it.
…n IIS out-of-process (MaxRequestBodySize)

## Description
On IIS out-of-process hosting, IISMiddleware cleared the request body size limit (MaxRequestBodySize = null). RequestDecompressionMiddleware consumed that as an unbounded decompressed-body budget, allowing an anonymous decompression-bomb DoS (temporary, with amplification).
## Fix
Gate the null-assignment in src/aspnetcore behind the Microsoft.AspNetCore.Server.IISIntegration.ClearMaxRequestBodySize AppContext switch (default off). By default the server request body size limit is preserved; apps needing the legacy defer-to-IIS behavior can opt in.
## Customer Impact
Prevents unbounded request-body decompression on IIS out-of-process. Opt-out switch provided for compatibility.
## Regression
No. Long-standing behavior since 2.0; exposed via RequestDecompression (7.0+).
## Risk
Low. Minimal, gated change with opt-out. Product change validated identically on aspnetcore main; unit tests added. VMR change authored under src/aspnetcore; relying on PR CI.
## Testing
Unit tests: default preserves limit, switch clears it, read-only untouched, absent feature. Verified end-to-end on aspnetcore main via real IIS Express out-of-process deploy.

----
#### AI description  (iteration 1)
#### PR Classification
Bug fix to address unbounded request decompression vulnerability in IIS out-of-process hosting by changing the default behavior of `MaxRequestBodySize` handling.

#### PR Summary
Changes the default behavior of IIS middleware to preserve the server's `MaxRequestBodySize` limit instead of clearing it, preventing unbounded request decompression. The previous behavior of clearing the limit is now opt-in via an AppContext switch.

- `IISMiddleware.cs`: Added `ClearMaxRequestBodySizeSwitch` constant and `_clearMaxRequestBodySize` field to control whether `MaxRequestBodySize` is cleared, with clearing now disabled by default and only enabled when the AppContext switch is set
- `IISMiddlewareTests.cs`: Added comprehensive test coverage including tests for default behavior (preserving limit), switch-enabled behavior (clearing limit), read-only feature handling, and missing feature scenarios
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
Updates identity redirect handling.

----
#### AI description  (iteration 1)
#### PR Classification
Security bug fix to prevent open redirect vulnerabilities in identity redirect handling.

#### PR Summary
Enhances the open redirect prevention logic in the identity redirect manager by adding an additional security check for protocol-relative URLs.

- `IdentityRedirectManager.cs`: Added check to reject URIs starting with "//" (protocol-relative URLs) to prevent potential open redirect attacks alongside the existing relative URI validation.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
…ions

Restricts parameter updates and removal to roots created by JavaScript.

----
#### AI description  (iteration 1)
#### PR Classification
Security enhancement to restrict root component operations to only those components added by JavaScript.

#### PR Summary
This PR adds validation to ensure JavaScript can only manipulate (update parameters or remove) root components that were originally added by JavaScript, preventing unauthorized modifications to server-rendered components.

- `JSComponentInterop.cs`: Added `_jsComponentIds` HashSet to track JS-added components and `EnsureValidJSComponentId()` method that throws `InvalidOperationException` when attempting operations on non-JS components
- `JSComponentInteropTest.cs`: Added unit tests verifying that `SetRootComponentParameters` and `RemoveRootComponent` reject server-rendered components but allow JS-rendered ones
- `JSRootComponentsTest.cs` and `JavaScriptRootComponents.razor`: Added E2E test to verify error handling when attempting to update parameters on non-JS root components
- `jsRootComponentInitializers.js`: Added `setRootComponentParameters()` method and renderer interop capturing to support testing parameter updates from JavaScript
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
Mirroring and others added 18 commits August 19, 2026 09:18
Validate format 0 kern pair data against the uint32 kern table-directory length instead of the uint16 subtable length field, which wraps for subtables over 64KB and wrongly rejected valid fonts during XPS/PDF export and printing. Overflow and per-read bounds checks are unchanged.

Co-authored-by: Copilot
… >64KB kern tables

## Problem
Font subsetting during XPS/PDF export and printing fails for fonts whose format 0 `kern` table exceeds 64KB - including the in-box Calibri family (Calibri, Cambria, Constantia, Corbel). The operation is wrongly rejected,
breaking print/export for documents that use these fonts.

## Root cause
A hardening check added to `AdjustKernFormat0` validated the format 0 kern pair data against the kern **subtable** `length` field. That field is a `uint16` (OpenType), so for any kern subtable larger than 64KB it wraps and reports a value far smaller than the real table size. The computed pair-array size then exceeds the wrapped length and the subtable is rejected, even though the font is valid and the data is in bounds.

## Fix
Validate the pair data against the `uint32` kern **table-directory** length (`TTTableLength(pOutputBufferInfo, KERN_TAG)`) instead of the wrapping `uint16` subtable `length`. The directory length is a genuine 32-bit field that correctly describes tables over 64KB, so valid fonts pass while oversized/malformed data is still rejected.

The overflow guard (`ULongMult32`) and the per-read `CheckInOffset`/`CheckOutOffset` bounds checks are unchanged, so the security hardening the original check was part of remains fully in effect.

Fixes the regression tracked in ICM 851080013 / DTS-3049842 (KB5120708).

Co-authored-by: Copilot

----
#### AI description  (iteration 1)
#### PR Classification
Bug fix to address a regression in kern table subsetting for TrueType fonts with kern tables larger than 64KB.

#### PR Summary
Fixes a validation error when subsetting fonts with kern tables exceeding 64KB by using the correct length field for validation. The issue occurred because the uint16 kern subtable 'length' field cannot represent values larger than 64KB.

- `modtable.cpp`: Changed validation logic to use `TTTableLength()` with the full kern table-directory length instead of the limited uint16 `KernSubHeader.length` field when validating kern pair data size.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service
dotnet-policy-service Bot requested review from a team September 9, 2026 17:24
@akoeplinger
akoeplinger merged commit 8581b58 into release/10.0.1xx Sep 11, 2026
11 checks passed
@akoeplinger
akoeplinger deleted the internal-merge-10.0.1xx-2026-09-09-1724 branch September 11, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants