Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.