diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index c705a492428..659510261c8 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -1802,8 +1802,6 @@ en:
simultaneous_uploads: "Maximum number of files that can be dragged & dropped in the composer"
- enable_flash_video_onebox: "Enable embedding of swf and flv (Adobe Flash) links in oneboxes. WARNING: may introduce security risks."
-
default_invitee_trust_level: "Default trust level (0-4) for invited users."
default_trust_level: "Default trust level (0-4) for all new users. WARNING! Changing this will put you at serious risk for spam."
diff --git a/config/site_settings.yml b/config/site_settings.yml
index faba7b8a3f5..f870b7189f6 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -1596,7 +1596,6 @@ security:
hidden: true
onebox:
- enable_flash_video_onebox: false
post_onebox_maxlength:
default: 500
locale_default:
diff --git a/db/post_migrate/20210302164429_drop_flash_onebox_site_setting.rb b/db/post_migrate/20210302164429_drop_flash_onebox_site_setting.rb
new file mode 100644
index 00000000000..374afe0fb1b
--- /dev/null
+++ b/db/post_migrate/20210302164429_drop_flash_onebox_site_setting.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class DropFlashOneboxSiteSetting < ActiveRecord::Migration[6.0]
+ def up
+ execute <<~SQL
+ DELETE FROM site_settings
+ WHERE name = 'enable_flash_video_onebox'
+ SQL
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
diff --git a/lib/onebox/engine/flash_video_onebox.rb b/lib/onebox/engine/flash_video_onebox.rb
deleted file mode 100644
index f3de5eda360..00000000000
--- a/lib/onebox/engine/flash_video_onebox.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-module Onebox
- module Engine
- class FlashVideoOnebox
- include Engine
-
- matches_regexp /^https?:\/\/.*\.(swf|flv)$/
-
- def to_html
- if SiteSetting.enable_flash_video_onebox
- ""
- else
- "#{@url}"
- end
- end
- end
- end
-end
diff --git a/spec/components/onebox/engine/flash_video_onebox_spec.rb b/spec/components/onebox/engine/flash_video_onebox_spec.rb
deleted file mode 100644
index b6aff33e852..00000000000
--- a/spec/components/onebox/engine/flash_video_onebox_spec.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: true
-
-require 'rails_helper'
-require 'onebox/engine/flash_video_onebox'
-
-describe Onebox::Engine::FlashVideoOnebox do
- before do
- @o = Onebox::Engine::FlashVideoOnebox.new('http://player.56.com/v_OTMyNTk1MzE.swf')
- end
-
- context "when SiteSetting.enable_flash_video_onebox is true" do
- before do
- SiteSetting.enable_flash_video_onebox = true
- end
-
- it "generates a flash video" do
- expect(@o.to_html).to match_html(
- ""
- )
- end
- end
-
- context "when SiteSetting.enable_flash_video_onebox is false" do
- before do
- SiteSetting.enable_flash_video_onebox = false
- end
-
- it "generates a link" do
- expect(@o.to_html).to match_html(
- "http://player.56.com/v_OTMyNTk1MzE.swf"
- )
- end
- end
-end