cms_pico icon indicating copy to clipboard operation
cms_pico copied to clipboard

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

Open joshtrichards opened this issue 1 year ago • 1 comments

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:

  • disable the cache (this what the Nc mail app does)
  • leave it enabled by specifying a path
  • accept it as is

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

joshtrichards avatar Jun 14 '24 13:06 joshtrichards

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.

PhrozenByte avatar Jun 15 '24 17:06 PhrozenByte