mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 13:58:01 +08:00
DEV: Add validation for allowed iframes setting (#28178)
- Adds a validator for the allowed iframes site setting - Adds a migration to update any values that don't pass the validator Follow up to: 188cb58daa833839c54c266ce22db150a3f3a210
This commit is contained in:
@ -713,7 +713,7 @@ RSpec.describe Oneboxer do
|
||||
body: allowlisted_oembed.to_json,
|
||||
)
|
||||
|
||||
SiteSetting.allowed_iframes = "discourse.org|https://ifram.es"
|
||||
SiteSetting.allowed_iframes = "https://discourse.org/|https://ifram.es/"
|
||||
|
||||
expect(Oneboxer.onebox("https://blocklist.ed/iframes", invalidate_oneboxes: true)).to be_empty
|
||||
expect(Oneboxer.onebox("https://allowlist.ed/iframes", invalidate_oneboxes: true)).to match(
|
||||
|
Reference in New Issue
Block a user