Allow thirdparty images on failed diary comment saves
This commit is contained in:
parent
201796cced
commit
11b887c118
2 changed files with 2 additions and 1 deletions
|
@ -13,7 +13,7 @@ class DiaryCommentsController < ApplicationController
|
||||||
before_action :lookup_user, :only => :index
|
before_action :lookup_user, :only => :index
|
||||||
before_action :check_database_writable, :only => [:create, :hide, :unhide]
|
before_action :check_database_writable, :only => [:create, :hide, :unhide]
|
||||||
|
|
||||||
allow_thirdparty_images :only => :index
|
allow_thirdparty_images :only => [:index, :create]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@title = t ".title", :user => @user.display_name
|
@title = t ".title", :user => @user.display_name
|
||||||
|
|
|
@ -104,6 +104,7 @@ class DiaryCommentsControllerTest < ActionDispatch::IntegrationTest
|
||||||
end
|
end
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template :new
|
assert_template :new
|
||||||
|
assert_match(/img-src \* data:;/, @response.headers["Content-Security-Policy-Report-Only"])
|
||||||
|
|
||||||
# Now try again with the right id
|
# Now try again with the right id
|
||||||
assert_difference "ActionMailer::Base.deliveries.size", entry.subscribers.count do
|
assert_difference "ActionMailer::Base.deliveries.size", entry.subscribers.count do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue