Consolidate the iframe sources code

Bug #1513276 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Robert Lyon

Bug Description

Currently we do a bunch of different things to add allowed iframe sources code to the system when we install/upgrade a site

We need to make it one way only

Notes:
lib/upgrade.php, core_postinst(), has a hard-coded list of allowed iframe sources
if you add the youtube-no-iframes one there, can you also move the prezi one there, and take it out from blocktype/externalvideo::postinst() ?

Revision history for this message
Aaron Wells (u-aaronw) wrote :

So, currently iframe sources are set up at install time by a list in core_postinst().

Except the prezi one, which was added later and is installed via the postinst() method of the externalvideo blocktype.

And the youtube-nocookie.com one was added to the externalvideo blocktype *upgrade*, but not to either installer.

It's not great that these things are scattered everywhere, because it makes it hard for devs to know where to look when they're doing something as simple as adding a new allowed iframe source. Technically speaking, allowed iframe sources are not the domain of *any* specific plugin. They're used by everything that uses TinyMCE, as well as the externalvideo block (and maybe some other places?). I guess we could make them into a dependency of pieforms, or make them into their own module.

But it would be a good (easy) start at least, if we put them all into the externalvideo postinst, or into core_postinst().

Changed in mahara:
status: In Progress → Confirmed
milestone: 16.04.0 → 16.10.0
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.10.0 → 16.10.1
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.10.1 → 17.04.0
Changed in mahara:
milestone: 17.04.0 → 17.10.0
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/8037

Robert Lyon (robertl-9)
Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8037
Committed: https://git.mahara.org/mahara/mahara/commit/943ce498fb9884be0f66343a35e8a8924d5d4fb5
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 943ce498fb9884be0f66343a35e8a8924d5d4fb5
Author: Robert Lyon <email address hidden>
Date: Wed Sep 20 11:38:16 2017 +1200

Bug 1513276: Fixing iframe source mistake

And adding info to help developers

behatnotneeded

Change-Id: Idebbf277cd37f4406874bddb66b4ffef71088750
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.