bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Potential Bash Script Vulnerability


From: Robert Elz
Subject: Re: Potential Bash Script Vulnerability
Date: Mon, 08 Apr 2024 12:40:55 +0700

    Date:        Mon, 8 Apr 2024 00:29:41 -0400
    From:        John Passaro <john.a.passaro@gmail.com>
    Message-ID:  
<CAJdN7KgU-C9POhVT2tNdfwNrTvwHE=RuG6XBVUX239MH5MuA4Q@mail.gmail.com>

  | if you wanted this for your script - read all then start semantics, as
  | opposed to read-as-you-execute - would it work to rewrite yourself inside a
  | function?
  |
  | function main() { ... } ; main

It would need to be:

  function main() { ... } ; main "$@"

or perhaps better just:

  main() { ... } ; main "$@"

but with that change, yes it should work almost always (and
can certainly be made to).

kre



reply via email to

[Prev in Thread] Current Thread [Next in Thread]