ezyang / htmlpurifier

Standards compliant HTML filter written in PHP
http://htmlpurifier.org
GNU Lesser General Public License v2.1
3.02k stars 323 forks source link

Cache.DefinitionImpl / Cache.SerializerPath ignored #370

Open sogerc1 opened 1 year ago

sogerc1 commented 1 year ago

I have HTMLPurifier 4.15.0 from PEAR on an ubuntu server 22.04.

I've set $config->set('Cache.DefinitionImpl', null); but I'm still seeing this warning:

/usr/share/php/HTMLPurifier/DefinitionCache/Serializer.php(297): Directory /usr/share/php/HTMLPurifier/DefinitionCache/Serializer not writable, please chmod to 777

If I add: $config->set('Cache.SerializerPath', '/some/dir'); // which is writable by the web server the exact same warning still appears (still mentioning DefinitionCache/Serializer not my directory).

I can't set the permissions of the default directory because I have no access and I don't need caching anyway because I'm doing inbound filtering.

sogerc1 commented 1 year ago

Additional info: even though I have those two options cache files still appear in the DefinitionCache/Serializer directory if I give write permission in my development virtual machine.