mirror of
https://github.com/discourse/discourse.git
synced 2025-04-22 19:34:28 +08:00
FIX: Don't secure the about banner image
This commit is contained in:
parent
f162df9ac1
commit
2d7d48df45
@ -37,6 +37,7 @@ class UploadSecurity
|
||||
category_background
|
||||
group_flair
|
||||
badge_image
|
||||
site_setting
|
||||
]
|
||||
|
||||
PUBLIC_UPLOAD_REFERENCE_TYPES = %w[
|
||||
|
@ -139,6 +139,26 @@ describe "Admin About Config Area Page", type: :system do
|
||||
expect(config_area.general_settings_section).to have_saved_successfully
|
||||
expect(SiteSetting.about_banner_image).to eq(nil)
|
||||
end
|
||||
|
||||
context "when login_required is true" do
|
||||
before { SiteSetting.login_required = true }
|
||||
|
||||
it "doesn't mark the banner image upload as secure" do
|
||||
setup_or_skip_s3_system_test(enable_secure_uploads: true)
|
||||
|
||||
config_area.visit
|
||||
|
||||
image_file = file_from_fixtures("logo.png", "images")
|
||||
config_area.general_settings_section.banner_image_uploader.select_image(image_file.path)
|
||||
expect(config_area.general_settings_section.banner_image_uploader).to have_uploaded_image
|
||||
|
||||
config_area.general_settings_section.submit
|
||||
|
||||
expect(config_area.general_settings_section).to have_saved_successfully
|
||||
|
||||
expect(SiteSetting.about_banner_image.secure).to eq(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user