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

Safer post requests #874

Merged
merged 3 commits into from Nov 28, 2016
Merged

Safer post requests #874

merged 3 commits into from Nov 28, 2016

Conversation

karyon
Copy link
Collaborator

@karyon karyon commented Nov 27, 2016

fixes #853.

the problem of clicking multiple times on a button and sending the post requests multiple times can only happen if we overwrote the button's action with an ajax request. otherwise, the browser will prevent sending multiple requests.

so, to prevent nervous users from sending multiple requests, we need to check only the requests that are sent with ajax. the vote button (#852) was such a case, and in this PR i've modified the feedback form to prevent multiple submits.

what's left is malicious users who manually send POST requests. i've hardened the reward point redemption view, but apart from that didn't see anything where users can do any damage. however, i did not check the staff and grades apps, that seemed too much work and not worth it, since i'd say if staff users or grade uploaders are malicious, we have a totally different kind of problem.

@karyon
Copy link
Collaborator Author

karyon commented Nov 27, 2016

@janno42 could you confirm that when deleting GradeDocuments, the actual file is not deleted? i think we should do something about that, shouldn't we?

Copy link
Member

@janno42 janno42 left a comment

Choose a reason for hiding this comment

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

🤐

@karyon karyon merged commit 8bd4ddf into e-valuation:master Nov 28, 2016
@karyon karyon deleted the safer_post_requests branch November 28, 2016 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Verify all POSTS can be sent twice safely
2 participants