Skip to content

fix: validate UnauthorizedStatusCode is in the 4xx range (#447)#469

Merged
adrianhall merged 1 commit into
CommunityToolkit:mainfrom
adrianhall:issues/447
Jun 15, 2026
Merged

fix: validate UnauthorizedStatusCode is in the 4xx range (#447)#469
adrianhall merged 1 commit into
CommunityToolkit:mainfrom
adrianhall:issues/447

Conversation

@adrianhall

Copy link
Copy Markdown
Collaborator

UnauthorizedStatusCode previously accepted any integer, allowing a misconfiguration to silently turn authorization failures into success responses. Add a backing field with range validation (400-499) following the existing MaxTop/PageSize pattern, throwing ArgumentOutOfRangeException for out-of-range values. Update tests and docs accordingly.

Closes #447

…olkit#447)

UnauthorizedStatusCode previously accepted any integer, allowing a
misconfiguration to silently turn authorization failures into success
responses. Add a backing field with range validation (400-499) following
the existing MaxTop/PageSize pattern, throwing ArgumentOutOfRangeException
for out-of-range values. Update tests and docs accordingly.
@adrianhall adrianhall merged commit 3476f69 into CommunityToolkit:main Jun 15, 2026
5 checks passed
@adrianhall adrianhall deleted the issues/447 branch June 15, 2026 09:18
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.

SECURITY: UnauthorizedStatusCode is configurable to arbitrary values

1 participant