From 0a1731e32a083b5046d845dc827790f26cc22dcd Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Oct 13 2014 07:14:41 +0000 Subject: Merge and cancel pull-request must use POST requests --- diff --git a/progit/ui/fork.py b/progit/ui/fork.py index 087cab6..cbd84bb 100644 --- a/progit/ui/fork.py +++ b/progit/ui/fork.py @@ -284,8 +284,9 @@ def pull_request_add_comment(repo, requestid, commit, row, username=None): -@APP.route('//request-pull/merge/') -@APP.route('/fork///request-pull/merge/') +@APP.route('//request-pull/merge/', methods=['POST']) +@APP.route('/fork///request-pull/merge/', + methods=['POST']) def merge_request_pull(repo, requestid, username=None): """ Request pulling the changes from the fork into the project. """ @@ -393,9 +394,9 @@ def merge_request_pull(repo, requestid, username=None): @APP.route('//request-pull/cancel/', - methods=('GET', 'POST')) + methods=['POST']) @APP.route('/fork///request-pull/cancel/', - methods=('GET', 'POST')) + methods=['POST']) def cancel_request_pull(repo, requestid, username=None): """ Cancel request pulling request. """