cayhorstmann / codecheck2

Merging CodeCheck checker and Play server
GNU Affero General Public License v3.0
11 stars 29 forks source link

* in ARGS #7

Open cayhorstmann opened 2 years ago

cayhorstmann commented 2 years ago

If the command line arguments have a (e.g. //ARGS 6 7), it needs to be escaped so that it isn't shell-expanded. Should one quote all arguments? What if they are quotes?

cayhorstmann commented 10 months ago

Tip: See what happens to these ARGS. In com.horstmann.codecheck.Main::testInput (the last one), they get passed to plan.run, which then builds a script that is passed on to the comrun service. Make a test case where this happens and stop the debugger at com.horstmann.codecheck.Plan.java#execute to see the script. Presumably nothing is escaped here. That script is consumed by comrun/bin/comrun. Let's discuss together what should be quoted.