Giter Site home page Giter Site logo

Command injection about node-ping HOT 6 CLOSED

Peter-Maguire avatar Peter-Maguire commented on August 22, 2024
Command injection

from node-ping.

Comments (6)

Peter-Maguire avatar Peter-Maguire commented on August 22, 2024 2

Why is enabling shell a requirement? You could remove characters from the input like &;| and remove most of the problems.

from node-ping.

mondwan avatar mondwan commented on August 22, 2024 1

Hi all, I have just set shell to False as requested, and I have pushed that commit to master :D

so... let's see whether what will happen afterwards :D

from node-ping.

mondwan avatar mondwan commented on August 22, 2024 1

Patches are available on 0.4.0. Reopen this issue if there are things to follow up

from node-ping.

mondwan avatar mondwan commented on August 22, 2024

from node-ping.

eternalharvest avatar eternalharvest commented on August 22, 2024

@mondwan

I'm agree with @UnacceptableUse if there is no reason to enable shell option of child_process#spawn() call.
I wonder why shell option is needed, it seems working without enabling this option.
Please tell me if I am misunderstanding.

from node-ping.

m-rousse avatar m-rousse commented on August 22, 2024

Enabling the shell option also prevents the error from being raised in lib/ping-promise.js#L64 as it is treated as output on stderr and not as a faulty exit code.
So I’m also in favor of disabling shell here.

from node-ping.

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.