Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory /var/www/html/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer not writable. #422

Open
jpruiz114 opened this issue Nov 6, 2024 · 2 comments

Comments

@jpruiz114
Copy link

Directory /var/www/html/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer not writable.

Why does this library need the vendor folder on which it lives to be writeable?

It seems unnecessary, and it opens the possibility of vulnerabilities.

@andersonmazzafc
Copy link

I have the same problem. How to solve?

@elirenato
Copy link
Contributor

elirenato commented Nov 6, 2024

@jpruiz114 You can change the default folder path using a property, e.g.

$serializerPath = '/tmp/htmlpurifier';
if (!file_exists($serializerPath)) {
mkdir($serializerPath);
}
$config->set('Cache.SerializerPath', $serializerPath);

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

No branches or pull requests

3 participants