Update the block id of embeddedurls when pages are copied

Bug #1958509 reported by Doris Tam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Doris Tam
20.10
Fix Released
Medium
Unassigned
21.04
Fix Released
Medium
Unassigned
21.10
Fix Released
Medium
Unassigned
22.04
Fix Released
Medium
Doris Tam

Bug Description

During the copying of a page, when a block that can hold embeddedurls (e.g. text blocks) is copied, the $configdata['text'] of that block is not updated to point to the duplicated block that is in the new page.

Fixing this will make sure that only the owner of the file can download the file.
Currently, the issue of not updating the block id means that when embeddedurl-supporting blocktype such as text block is copied, anyone can download it

Doris Tam (doristam)
Changed in mahara:
assignee: nobody → Doris Tam (doristam)
Doris Tam (doristam)
Changed in mahara:
status: New → In Progress
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote (last edit ):

closely related to bug 1957725

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/12377
Committed: https://git.mahara.org/mahara/mahara/commit/e64b3c0a27062d0d60f4de8b78fe2972b48fa6d6
Submitter: Robert Lyon (<email address hidden>)
Branch: main

commit e64b3c0a27062d0d60f4de8b78fe2972b48fa6d6
Author: Doris Tam <email address hidden>
Date: Tue Jan 25 17:17:00 2022 +1300

Bug 1958509: Rewrite text block instruction + text references

Artefacts mentioned in the artefact_file_embedded are tied to
block instances. When we copy a page, the embedded artefacts
get copied, therefore we need to add new references to the db
table.

Change-Id: I2b8ef30d8edc106513a74c11b115563fff0fdd3a

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "21.10_DEV" branch: https://reviews.mahara.org/12420

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "21.04_DEV" branch: https://reviews.mahara.org/12421

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "20.10_DEV" branch: https://reviews.mahara.org/12422

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/12421
Committed: https://git.mahara.org/mahara/mahara/commit/70601ba549856dad5a77d3ddbf0c53b589974c03
Submitter: Robert Lyon (<email address hidden>)
Branch: 21.04_DEV

commit 70601ba549856dad5a77d3ddbf0c53b589974c03
Author: Doris Tam <email address hidden>
Date: Tue Jan 25 17:17:00 2022 +1300

Bug 1958509: Rewrite text block instruction + text references

Artefacts mentioned in the artefact_file_embedded are tied to
block instances. When we copy a page, the embedded artefacts
get copied, therefore we need to add new references to the db
table.

Change-Id: I2b8ef30d8edc106513a74c11b115563fff0fdd3a
(cherry picked from commit e64b3c0a27062d0d60f4de8b78fe2972b48fa6d6)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/12422
Committed: https://git.mahara.org/mahara/mahara/commit/5aab7f7eccff30037394c0fa5942f5ac0ecdbb99
Submitter: Robert Lyon (<email address hidden>)
Branch: 20.10_DEV

commit 5aab7f7eccff30037394c0fa5942f5ac0ecdbb99
Author: Doris Tam <email address hidden>
Date: Tue Jan 25 17:17:00 2022 +1300

Bug 1958509: Rewrite text block instruction + text references

Artefacts mentioned in the artefact_file_embedded are tied to
block instances. When we copy a page, the embedded artefacts
get copied, therefore we need to add new references to the db
table.

Change-Id: I2b8ef30d8edc106513a74c11b115563fff0fdd3a
(cherry picked from commit e64b3c0a27062d0d60f4de8b78fe2972b48fa6d6)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/12420
Committed: https://git.mahara.org/mahara/mahara/commit/6d4b6b6453e6d5277c4114d931cb98648f3da9a8
Submitter: Robert Lyon (<email address hidden>)
Branch: 21.10_DEV

commit 6d4b6b6453e6d5277c4114d931cb98648f3da9a8
Author: Doris Tam <email address hidden>
Date: Tue Jan 25 17:17:00 2022 +1300

Bug 1958509: Rewrite text block instruction + text references

Artefacts mentioned in the artefact_file_embedded are tied to
block instances. When we copy a page, the embedded artefacts
get copied, therefore we need to add new references to the db
table.

Change-Id: I2b8ef30d8edc106513a74c11b115563fff0fdd3a
(cherry picked from commit e64b3c0a27062d0d60f4de8b78fe2972b48fa6d6)

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.