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

(Fix) set cache directory to prevent warnings #797

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ms-syscon
Copy link

When the "SerializerPath" is not set, it will write into the "vendor" folder. This is critcal and not allowed on all servers. Why not use the existing "cache" folder?

@peterdd
Copy link
Member

peterdd commented Feb 28, 2023

I was not aware that HTMLpurifier write cache files to the file system and by default into the vendor/ dirs.

There is already a setting for cache directories in Flyspray - FS_CACHE_DIR

grep -rn FS_CACHE_DIR
plugins/dokuwiki/dokuwiki_formattext.inc.php:59:		$conf['cachedir'] = FS_CACHE_DIR; // for dokuwiki
feed.php:50:$cachefile = sprintf('%s/%s', FS_CACHE_DIR, $filename);
includes/constants.inc.php:85:define('FS_CACHE_DIR', Flyspray::get_tmp_dir() . DIRECTORY_SEPARATOR . FS_DOMAIN_HASH);
includes/constants.inc.php:87:is_dir(FS_CACHE_DIR) || @mkdir(FS_CACHE_DIR, 0700);

Maybe this can be used too?

@ms-syscon
Copy link
Author

Thanks for the feedback. I've changed the code with FS_CACHE_DIR

@Neustradamus
Copy link
Member

@ms-syscon: Can you squash your commits to have only one?

@peterdd: Have you seen?

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.

None yet

3 participants