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

Disable the request token check for idempotent actions #5461

Merged
merged 3 commits into from
Dec 15, 2022

Conversation

aschempp
Copy link
Member

@aschempp aschempp commented Nov 1, 2022

FINALLY removes the request token check for idempotent actions in the back end.

@aschempp aschempp added this to the 5.1 milestone Nov 1, 2022
@aschempp aschempp requested a review from a team November 1, 2022 07:58
@aschempp aschempp self-assigned this Nov 1, 2022
Toflar
Toflar previously approved these changes Nov 1, 2022
Copy link
Member

@Toflar Toflar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@leofeyer
Copy link
Member

leofeyer commented Nov 2, 2022

This reenables the CSRF vulnerability that we had closed in contao/core#4007, doesn‘t it? @ausi /cc

@fritzmg
Copy link
Contributor

fritzmg commented Nov 2, 2022

The original issue was about editing and deleting. The request token check is still in place for delete and toggle actions and for POST requests.

@Toflar
Copy link
Member

Toflar commented Nov 2, 2022

Anything we know is idempotent, does not need a token.

@ausi
Copy link
Member

ausi commented Nov 2, 2022

Are we sure, that act=edit, act=show and act=select are always idempotent?

@Toflar
Copy link
Member

Toflar commented Nov 2, 2022

Yes, that's the whole purpose of this PR :D

@aschempp
Copy link
Member Author

aschempp commented Nov 6, 2022

Are we sure, that act=edit, act=show and act=select are always idempotent?

Technically, someone could manipulate data in the onload callbacks. But then again you could also manipulate data in the list/parent/tree view where there is no request token check.

@leofeyer leofeyer changed the title Disable request token checks for idempotent actions Disable the request token check for idempotent actions Dec 15, 2022
@leofeyer leofeyer merged commit 015787f into contao:5.x Dec 15, 2022
@aschempp aschempp deleted the feature/skip-request-token branch December 25, 2022 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants