about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-20 13:03:06 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-20 13:03:06 +0100
commitb640f35621b419ae9b9e621e00a8a055068ce2f4 (patch)
tree430d9b5a442a427d07135b96ac0f71fd24d4aa99 /app/controllers
parente14b76c7cb07c3ebc01a17991df9fe5b69d1b5bc (diff)
Writing out more tests, fixed some bugs
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/api/subscriptions_controller.rb2
-rw-r--r--app/controllers/api_controller.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/api/subscriptions_controller.rb b/app/controllers/api/subscriptions_controller.rb
index 038d6c877..6ae038a36 100644
--- a/app/controllers/api/subscriptions_controller.rb
+++ b/app/controllers/api/subscriptions_controller.rb
@@ -12,7 +12,7 @@ class Api::SubscriptionsController < ApiController
   def update
     body = request.body.read
 
-    if @account.subscription(api_subscription_url(@account.id)).verify(body, env['HTTP_X_HUB_SIGNATURE'])
+    if @account.subscription(api_subscription_url(@account.id)).verify(body, request.headers['HTTP_X_HUB_SIGNATURE'])
       ProcessFeedService.new.(body, @account)
       render nothing: true, status: 201
     else
diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb
index 80d084328..35f1e62c5 100644
--- a/app/controllers/api_controller.rb
+++ b/app/controllers/api_controller.rb
@@ -1,5 +1,6 @@
 class ApiController < ApplicationController
   protect_from_forgery with: :null_session
+  skip_before_filter :verify_authenticity_token
 
   protected