From 898dbe01c60be61da9ecb6d0528e00bcd43276ca Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Sat, 26 Mar 2011 17:34:54 +0100 Subject: [PATCH] fix #1125 where rest/xml request were being rejected by the new csrf code of rails --- app/controllers/application_controller.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 76c662b7..c789833e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -184,7 +184,13 @@ class ApplicationController < ActionController::Base return saved ? todo : nil end - + + def handle_unverified_request + unless request.format=="application/xml" + super # handle xml http auth via our own login code + end + end + protected def admin_login_required