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

Stale state protection service may not work under specific interleaving #2564

Open
project-concerto opened this issue Aug 23, 2021 · 0 comments

Comments

@project-concerto
Copy link

StaleStateProtectionService is used to prevent admin from modify based on stale page. When admin try to send a request to modify some data, the token of page he observed will be attached with the request, so that server can check whether this admin try to modify the data based on the stale page.

However, the validation and update is not executed atomically, which means following interleaving may occur and cause wrong state. Admin2 modified the data based on stale page and the modification of Admin1 may be overwritten.

Admin 1 Admin 2
get Page+Token get Page + Token
token validation passed
token validation passed
modify data in Page
modify data in Page
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

No branches or pull requests

1 participant