Giter VIP home page Giter VIP logo

Comments (13)

alecdwm avatar alecdwm commented on May 21, 2024 3

I think simple-http-server is breaking user expectations by serving files above the current working directory.

For python's http.server, http://localhost:8000/..%2f will map to $(cwd)/.
Whereas for simple-http-server, http://localhost:8000/..%2f will map to $(cwd)/../.

A user who is not aware of this will be accidentally exposing their system to the network, particularly when they have the --upload flag enabled.

from simple-http-server.

Avi-D-coder avatar Avi-D-coder commented on May 21, 2024 3

Serving files above the path the server was invoked in/with is a major security issue. @TheWaWaR This issue should be reopened. I will fix it today. Additionally after It's fixed all previous versions should be marked with a security notice.

from simple-http-server.

goecho avatar goecho commented on May 21, 2024 1

The behavior of using other web-servers is different from it

from simple-http-server.

goecho avatar goecho commented on May 21, 2024

Proposes to prevent access to non-web directories

from simple-http-server.

TheWaWaR avatar TheWaWaR commented on May 21, 2024

I think you shouldn't run simple-http-server in /etc

from simple-http-server.

goecho avatar goecho commented on May 21, 2024

I think it doesn't matter where it runs, it's a security hole.

from simple-http-server.

TheWaWaR avatar TheWaWaR commented on May 21, 2024

The permission of /etc/passwd is -rw-r--r-- means whatever a normal user can read the file, why simple-http-server run by current user can't read the file?

from simple-http-server.

TheWaWaR avatar TheWaWaR commented on May 21, 2024

But nginx can do that, https://serverfault.com/questions/588770/why-can-nginx-access-etc-pass

from simple-http-server.

Kinrany avatar Kinrany commented on May 21, 2024

I also expected simple-http-server to only serve the current working directory. Is that really not the case?

from simple-http-server.

TheWaWaR avatar TheWaWaR commented on May 21, 2024

Sorry, it's definitely a serious problem.

from simple-http-server.

Avi-D-coder avatar Avi-D-coder commented on May 21, 2024

Fixed in #35

from simple-http-server.

Avi-D-coder avatar Avi-D-coder commented on May 21, 2024

I could use a windows tester for #35 (comment)

from simple-http-server.

Kinrany avatar Kinrany commented on May 21, 2024

Thanks :D

from simple-http-server.

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.