From: Tom Hughes Date: Sat, 6 Feb 2021 11:06:47 +0000 (+0000) Subject: Allow form post to third party authentication providers X-Git-Tag: live~1787 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/bc233420dd0d0cb7c1226f8c7f4baf29ad1f754d Allow form post to third party authentication providers --- diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index a1129339e..0538d0409 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -270,6 +270,10 @@ class UsersController < ApplicationController end def login + append_content_security_policy_directives( + :form_action => %w[accounts.google.com *.facebook.com login.live.com github.com meta.wikimedia.org] + ) + session[:referer] = safe_referer(params[:referer]) if params[:referer] if params[:username].present? && params[:password].present?