Repository navigation
AspNetCoreOData 9.5.0
Full changelog: 9.4.1...9.5.0
This release focuses on security hardening of query parsing, batch handling, and delta updates, along with several bug fixes and a new configurable safeguard.
🔒 Security
- Prevent server-driven paging bypass via
Prefer: maxpagesize=0(CWE-1284/CWE-770). A client-suppliedmaxpagesizeis now honored only when it is a positive integer, so the operator-configuredPageSizecan no longer be disabled to pull an entire collection in one response. Also hardens the header parser against a baremaxpagesizetoken that previously threw a 500. (4018c71) - Bound nested function call and
cast()chain depth in filter validation and binding. AddsMaxFunctionCallDepth(default 15) enforcement in both the validator and the binder to mitigate stack-pressure DoS from deeply nested$filterexpressions. (e9bf5dc) - Strengthen OData batch sub-request URL and header validation. Sub-requests are now validated for matching authority (scheme/host/port), constrained to the OData route prefix (blocking
$1/../../../admin-style traversal), and have auth/identity/forwarding headers (Host,X-Forwarded-*,X-MS-Client-Principal-*,X-ARR-*, …) stripped via a deny-list. (491fb92) - Set a bounded
MaxReceivedMessageSizedefault (100 MB) (CWE-770) to prevent unbounded resource allocation. (#1574) - Enforce EDM model boundary for open-type property binding in
$filter/$orderby/$apply. Open/dynamic property segments now bind only to model-declared properties (resolving EDM→CLR renames correctly), preventing unmodeled CLR properties from leaking. (5e3adee) - Respect EDM model exclusions in
SelectExpandWrapper. CLR properties excluded via[NotMapped]or.Ignore()no longer surface in$skiptokenvalues when ordering by an open-type property. (6f91036) - Enforce the
UpdatablePropertiesallow-list for nested resources inDelta<T>. Removing a nested (complex / single-valued navigation) property fromUpdatablePropertiesis now respected byPatch()/Put(), closing an over-posting gap. Default behavior is unchanged. (4a192c4)
✨ Enhancements
- Add
MaxFunctionCallDepthsetting to limit nested function-call depth, configurable viaODataValidationSettings,ODataQuerySettings, and the[EnableQuery]attribute. (#1575)
🐛 Bug fixes
- Build the skip-token filter as an OData AST to correctly handle malformed/unexpected token values (typed
ConstantNode/BinaryOperatorNodeinstead of string concatenation), fixing ordering by nullable/non-nullable bool, enum, and open-type properties. (ec8da22) - Fix
cast()toEdm.Stringbinding and add test coverage across all property types. (d92c39d) - Fixes #1545:
ODataOptions.TimeZonewas ignored; dates were always serialized usingTimeZoneInfo.Local. (#1546)