Skip to content

Fix: HTMLPurifier cache write error - #1957

Open
toekaa-lnu wants to merge 1 commit into
alextselegidis:developfrom
toekaa-lnu:fix/html-purifier-cache-path
Open

Fix: HTMLPurifier cache write error#1957
toekaa-lnu wants to merge 1 commit into
alextselegidis:developfrom
toekaa-lnu:fix/html-purifier-cache-path

Conversation

@toekaa-lnu

Copy link
Copy Markdown

By default, HTMLPurifier caches its serialized definitions inside its own
vendor directory (vendor/ezyang/htmlpurifier/library/HTMLPurifier/
DefinitionCache/Serializer), which is commonly deployed read-only or owned
by a different user than the web server - causing write permission errors.

HTMLPurifier is used in Easy!Appointments to validate text-based settings
where HTML is allowed, e.g. texts entered in Settings > Legal Contents >
Privacy Policy or Terms & Conditions. This error could then popup
whenever those texts were shown in the booking UI.

Fix: redirect the cache to storage/cache, the app's own writable data
directory, via storage_path().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant