edrlab / thorium-reader

A cross platform desktop reading app, based on the Readium Desktop toolkit
https://www.edrlab.org/software/thorium-reader/
BSD 3-Clause "New" or "Revised" License
1.86k stars 157 forks source link

LocatorExtended followingElementIDs can flood the data model and cause JSON diff/ptach to crash #2571

Closed danielweck closed 1 month ago

danielweck commented 1 month ago

The solution is 2-fold: first, eliminate followingElementIDs from LocatorExtended as it is not used in Thorium (only in navigator for Media Overlays). This principle could be applied to any LocatorExtended properties (shallow or deep), but I reviewed other properties usage, they are used so we must keep them. Second, the fact that followingElementIDs is unbounded and generated for non-MediaOverlays documents can be considered a bug (I fixed this in the navigator component).