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

Better handling of temp_dir misconfiguration #6045

Closed
alecpl opened this issue Nov 15, 2017 · 2 comments
Closed

Better handling of temp_dir misconfiguration #6045

alecpl opened this issue Nov 15, 2017 · 2 comments

Comments

@alecpl
Copy link
Member

alecpl commented Nov 15, 2017

Recent changes to attachments plugin(s) revealed an issue related to open_basedir. When open_basedir restriction is set and configured Roundcube temp_dir is not allowed by open_basedir. tempnam() will fallback to system temp directory (e.g. /tmp). In such a case path verification (in attachments plugin) will fail.

A proposed solution is to allow, aside of configured temp_dir, the system temp directory (result of sys_get_temp_dir()) in verify_path(). Optionally we could log a warning when we see that system temp directory is in use and it's different than the configured for Roundcube.

@DavidAnderson684
Copy link

In my case, after an update, the configured temp directory was not writeable. open_basedir was not in use. I think that "can't write to the temp_dir for any reason" is the more general issue, rather than just because of open_basedir.

@alecpl
Copy link
Member Author

alecpl commented Nov 20, 2017

You're right. Done.

@alecpl alecpl closed this as completed Nov 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants