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

phpthumb is falling when /home directory is protected #116

Open
sashabeep opened this issue Jun 1, 2018 · 2 comments
Open

phpthumb is falling when /home directory is protected #116

sashabeep opened this issue Jun 1, 2018 · 2 comments

Comments

@sashabeep
Copy link
Contributor

My hoster offers site isolation functionality when no one site knows about root level directory and cannot access to it. But after this feature enabled this function

for ($i = 0, $iMax = count($segments); $i < $iMax; $i++) {

throws warning

Error : is_link(): IHC isolation in effect. File(/home) is not within the allowed path(s)
-----
if (is_link($thispart)) { 

Can you point me to solution? Maybe some settings in php.ini will fix this problem?
As i can understand, this function verifies that some of path parts are not symlink.
Can i rewrite it somehow? I'm not use symlinks at all on shared hostings. Commenting the whole cycle makes phpthumb unuseable

@JamesHeinrich
Copy link
Owner

I'm not sure. I don't have any way to replicate your environment so I'll leave it to you to figure out a proper workaround. Or perhaps someone else can chime in and offer their suggestions.

A very poor temporary fix would be to simply put return $path; before the problem line and effectively bypass the whole checking mechanism, but that should be avoided except for local testing.

@sashabeep
Copy link
Contributor Author

module realpath_turbo was used for this
https://github.com/Whissi/realpath_turbo

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

2 participants