Repository navigation
Release v22.110.0
A command whose body cannot be read is now answered after authorization, so an unauthorized caller always gets Unauthorized whatever the body contains, and an authorized caller gets a validation error on the property that failed.
Added
[property: ExplicitOffset]on aDateTimeOffsetorDateTimecommand property (nullable too) refuses date-time input that has no offset orZ, with the validation messageDateTime command property '<member>' requires an explicit offset or Z.ADateTimeOffsetkeeps its offset and aDateTimeis converted to UTC. The accepted spellings match Screenplay's date comparison contract (ESM v26). See Command input binding. (part of #3339)IResourceFreeRequirementmarks an ASP.NET authorization requirement that never reads the command, so its policy also runs when the body cannot be bound. Built-in role, claim, name and authenticated-user requirements count as resource-free already. (#3341)
Changed
- A command body that cannot be read is reported only after the command's authorization has run, on both the execute and the
/validateendpoint. An unauthorized caller now gets403instead of400. Policies with a requirement that reads the command cannot run without it, so for those commands an unbindable body still gives a validation error. (#3341) - A body that cannot be read now gives a
malformedRequestvalidation result naming the failing member (for examplefromoritems[2].when). The message stays generic, so no parser or type details are exposed. (#3341) - Controller-based commands report model binding errors with plain member names (
from) instead of JSON paths ($.from). (#3341)