diff --git a/Gemfile b/Gemfile index 9f03781f6c..94e421cff5 100644 --- a/Gemfile +++ b/Gemfile @@ -33,6 +33,7 @@ gem "nokogiri" gem "octokit" gem "omniauth" gem "omniauth-github" +gem "omniauth-rails_csrf_protection" gem "paperclip" gem "pg" gem "pg_search" @@ -50,15 +51,15 @@ gem "responders" gem "rexml" gem "sassc" gem "scenic" -gem "sentry-ruby" gem "sentry-rails" +gem "sentry-ruby" gem "sprockets-rails" gem "sprockets-redirect" gem "uglifier" gem "validates_email_format_of" gem "vanity" -gem "wrapped" gem "webrick" +gem "wrapped" source "https://rails-assets.org" do gem "rails-assets-lodash" diff --git a/Gemfile.lock b/Gemfile.lock index 6faf70118f..11cc51c301 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -317,6 +317,9 @@ GEM omniauth-oauth2 (1.7.3) oauth2 (>= 1.4, < 3) omniauth (>= 1.9, < 3) + omniauth-rails_csrf_protection (0.1.2) + actionpack (>= 4.2) + omniauth (>= 1.3.1) paperclip (6.1.0) activemodel (>= 4.2.0) activesupport (>= 4.2.0) @@ -573,6 +576,7 @@ DEPENDENCIES octokit omniauth omniauth-github + omniauth-rails_csrf_protection paperclip pg pg_search diff --git a/app/views/acceptances/new.html.erb b/app/views/acceptances/new.html.erb index ea273313a2..d8b58ec605 100644 --- a/app/views/acceptances/new.html.erb +++ b/app/views/acceptances/new.html.erb @@ -3,7 +3,7 @@

<%= t(".sign_in_to_join_the_team", team_name: @invitation.team_name) %>

- <%= link_to github_auth_path, class: "cta-button secondary-button" do %> + <%= link_to github_auth_path, method: :post, class: "cta-button secondary-button" do %> <%= image_tag("github.svg", class: "github-logo", alt: "") %> <%= t("authenticating.github_signin") %> <% end %> diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index 5a1f4aaf41..9fb44f19b6 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -1,6 +1,6 @@ <% content_for :page_title, "Sign In to Upcase" %>
- <%= link_to github_auth_path, class: 'cta-button secondary-button' do %> + <%= link_to github_auth_path, method: :post, class: 'cta-button secondary-button' do %> <%= image_tag("github-black.svg", class: "github-logo", alt: "") %> <%= t("authenticating.github_signin") %> <% end %>