From 7a842e5e455739d869c1de3feae59aaf6aea047c Mon Sep 17 00:00:00 2001 From: Moises Lopez Date: Sun, 18 Oct 2015 18:39:37 -0500 Subject: [PATCH] [FIX] runbot: Fix csrf error in rebuild method Runbot is intended to be run on a 8.0 instance but if runs on a 9.0, CSRF needs to be disabled. Will not break on 8.0 code. Closes #84 --- runbot/runbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runbot/runbot.py b/runbot/runbot.py index 9e1a2cce..4b4c2596 100644 --- a/runbot/runbot.py +++ b/runbot/runbot.py @@ -1363,7 +1363,7 @@ class RunbotController(http.Controller): #context['level'] = level return request.render("runbot.build", context) - @http.route(['/runbot/build//force'], type='http', auth="public", methods=['POST']) + @http.route(['/runbot/build//force'], type='http', auth="public", methods=['POST'], csrf=False) def build_force(self, build_id, **post): registry, cr, uid, context = request.registry, request.cr, request.uid, request.context repo_id = registry['runbot.build'].force(cr, uid, [int(build_id)])