FIX: Don't secure the about banner image

This commit is contained in:
OsamaSayegh 2024-11-22 05:36:49 +03:00
parent f162df9ac1
commit 2d7d48df45
No known key found for this signature in database
GPG Key ID: 060E5AC82223685F
2 changed files with 21 additions and 0 deletions

@ -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