Skip to content

Conversation

@guardrex
Copy link
Contributor

@guardrex guardrex commented Dec 5, 2023

Per dotnet/AspNetCore.Docs#31205 (comment) ...

This prevents the endpoint from accepting any forms posts. I spoke with our security team, and they indicated JSON-only endpoints that don't accept form auth or form posts don't need XSRF protections (which is why the MapIdentityEndpoints don't use anti-XSRF). The only way the /logout endpoint above works is if you post a JSON payload of {} which becomes an empty object with no properties but is not null. AFAIK this can't be done from a form.

@guardrex guardrex merged commit a0626bf into main Dec 5, 2023
@guardrex guardrex deleted the guardrex-patch-1 branch December 5, 2023 18:50
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.

2 participants