Comments (4)
I've created a fix for this here #4.
Basically, the script would use realpath
to check if the current folder was above the directory of the indexer.php
, this is an attempt to avoid backwards directory traversal.
Problem is that the realpath also returns the real path of any symbolic links. I tried using is_link
which would work for the directory but not any subdirectories inside of it.
So, instead i added a path_checking
option, which when set to weak
will check if the directory is a symbolic link, if it isn't, then it'll use a similar function to realpath
that just works with strings instead of actual file paths, thus not resolving the symbolic link.
Let me know if it works for you.
from ivfi-php.
It didn't work for me sadly. I double checked to make sure I had the right code downloaded too
I noticed a mistake I made with obfuscating the paths in the last code snippet so hopefully this one is less confusing. I have a base folder as the root in nginx, and inside that are symlinked folders
Fatal error: Uncaught Exception: requested path (is_dir) is below the public working directory. (1) in /directory/to/folder/userfolder/indexer.php:92 Stack trace: #0 /directory/to/folder/userfolder/indexer.php(441): Indexer->__construct('/symlinkedfolder/', Array) #1 {main} thrown in /directory/to/folder/userfolder/indexer.php on line 92
from ivfi-php.
Did you remember to set the path_checking
option to weak
after updating the code? That error code tells me that it was still set to strict
.
from ivfi-php.
I completely missed that part. I should have read it closer. setting it to weak
and it works flawlessly. Thank you very much.
from ivfi-php.
Related Issues (15)
- Something appears to be broken. HOT 2
- Squashing commits HOT 3
- Changing date format HOT 5
- WebDAV Compatability HOT 5
- Unable to show/play images/videos with "#" in the name. HOT 1
- Disable parent directory link HOT 2
- Setting custom themes HOT 2
- Invalid path. path does not exist HOT 7
- Feature Request: Password Protected Directories
- How can it handle a ddos attack? HOT 4
- [BUG] Deprecated messages HOT 6
- Detect Timezone of user HOT 1
- Hiding indexer.php and indexer/ HOT 19
- Updating from an old release. HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ivfi-php.