<commit_before>module GetBack
  class AwsSnsSubscriptionsController < ApplicationController
    skip_before_action :verify_authenticity_token, :check_permissions, :only=>[:create]
    def create
      logger.info request.headers.env
      logger.info request.raw_post
      if request.headers["x-amz-sns-message-type"] == "SubscriptionConfirmation"
        subscribe_url = JSON.parse(request.raw_post)["SubscribeURL"]
        raise MessageWasNotAuthentic unless subscribe_url =~ /^https.*amazonaws\.com\//
        HTTParty.get sns.subscribe_url
        head :ok and return
      end
    end
  end
end<commit_msg>fixes errors in subscription notification action<commit_after>require 'httparty'

module GetBack
  class AwsSnsSubscriptionsController < ApplicationController
    skip_before_action :verify_authenticity_token, :check_permissions, :only=>[:create]
    def create
      if request.headers["x-amz-sns-message-type"] == "SubscriptionConfirmation"
        subscribe_url = JSON.parse(request.raw_post)["SubscribeURL"]
        raise MessageWasNotAuthentic unless subscribe_url =~ /^https.*amazonaws\.com\//
        HTTParty.get subscribe_url
        head :ok and return
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08818635607321132, 'fraction_numerical': 0.0, 'mean_word_length': 3.8313253012048194, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2274079', 'n_tokens_mistral': 350, 'n_tokens_neox': 342, 'n_words': 72}