nextcloud / cms_pico

🗃 Integrate Pico CMS and let your users manage their own websites
https://apps.nextcloud.com/apps/cms_pico
GNU Affero General Public License v3.0
137 stars 43 forks source link

fix(HTMLPurifier): Disable Serializer cache to avoid stray files for now #248

Open joshtrichards opened 5 months ago

joshtrichards commented 5 months ago

HTMLSerializer uses the path the library is installed it as the cache by default. Since other Nc apps use HTMLSerialize, the app who's copy of HTMLSerialize happens to get used first, ends up with a bunch of stray cache files. Besides being messy, this brings things like integrity checks.

See nextcloud/mail#9731 FIxes nextcloud/mail#9731

There are three choices here:

Performance impact of disabling is unknown. If we eventually want this enabled still in Pico, we can set Cache.SerializePath to somewhere we're comfortable saving data (locally on the instance...).

Ref: http://htmlpurifier.org/live/configdoc/plain.html#Cache.DefinitionImpl

PhrozenByte commented 5 months ago

Good catch, thanks! :heart:

Could you please cherry-pick your commit on the cms_pico-1.0 branch? The master branch is the dev version of cms_pico v2.0. Just switching the PR's base unfortunately doesn't work properly.

However, please note that cms_pico is currently basically abandoned dev-wise, thus there isn't going to be a new release soon. There's currently no stable version of cms_pico supporting any of Nextcloud's still officially supported branches; people still using cms_pico do so at their own risk and use custom app builds based on the cms_pico-1.0 branch.