GithubHelp home page GithubHelp logo

Comments (7)

sigoden avatar sigoden commented on August 15, 2024 1

For security, dufs don't allow symlinks to dirctories outside the entrypoint directory unless runing with option -A or --allow-symlink.
For convenient, dufs do allow symlinks to directories inside the entrypoint directory.

These will satisfy most users.

from dufs.

sigoden avatar sigoden commented on August 15, 2024 1

If you only want to serve a certain directory, but that directory has an symlink which links to /, you are actually exposing the entire filesystem.

from dufs.

notjedi avatar notjedi commented on August 15, 2024

similar projects that are not suffering from this issue:

  1. https://github.com/thecoshman/http
  2. https://github.com/svenstaro/miniserve

from dufs.

notjedi avatar notjedi commented on August 15, 2024

i can see that both the projects do something similar with fs::read_link, which dufs does not. here is a link to those lines:

https://github.com/thecoshman/http/blob/7c1fa0e7bb5277f201c898fc3f918265c848a0e7/src/ops/webdav.rs#L148-L161

https://github.com/svenstaro/miniserve/blob/55a23fa4973b3bc56952276382f4676ff9242ae9/src/listing.rs#L248-L251

from dufs.

sigoden avatar sigoden commented on August 15, 2024

Do your run with option -A or --allow-symlink?

from dufs.

notjedi avatar notjedi commented on August 15, 2024

it works after passing the -A option. but i think it makes more sense to allow symlinks by default. also there is lack of consistency here, because symlinks within the same drive are listed without the -A option.

from dufs.

notjedi avatar notjedi commented on August 15, 2024

cool, understood. but, do you mind telling me about the security concerns when it comes to external symlinks?

from dufs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.