Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Security documentation confuses "idempotent" with "read-only" in CSRF section #13644

Closed
matlion opened this issue Aug 10, 2023 · 1 comment
Assignees
Labels
in: docs An issue in Documentation or samples type: bug A general bug
Milestone

Comments

@matlion
Copy link

matlion commented Aug 10, 2023

The documentation confuses idempotent with read-only:
https://docs.spring.io/spring-security/reference/features/exploits/csrf.html

Safe methods are expected to be readonly (not idempotent). This also the reference states:
"Request methods are considered "safe" if their defined semantics are
essentially read-only" https://datatracker.ietf.org/doc/html/rfc7231#section-4.2.1

An idempotent method can change things, but multiple same requests have the same outcome (e.g. set the user's address via PUT request).

@matlion matlion added status: waiting-for-triage An issue we've not yet triaged type: bug A general bug labels Aug 10, 2023
@jzheaux jzheaux self-assigned this Nov 7, 2023
@jzheaux jzheaux added in: docs An issue in Documentation or samples and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 7, 2023
@jzheaux jzheaux added this to the 5.8.9 milestone Nov 7, 2023
@jzheaux jzheaux closed this as completed in b919ece Nov 7, 2023
@jzheaux
Copy link
Contributor

jzheaux commented Nov 7, 2023

Good catch, @matlion. This is now updated in 5.8.x, 6.0.x, 6.1.x, and main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: docs An issue in Documentation or samples type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants