rapiddisk icon indicating copy to clipboard operation
rapiddisk copied to clipboard

Daemon will accept any trailing characters to a command (before / delimeter)

Open pkoutoupis opened this issue 2 years ago • 1 comments

Original command:

petros@dev-machine:~/misc/rapiddisk/src$ curl -s --output - 10.0.0.185:9118/v1/listAllNVMePorts|jq .
{
  "targets": [
    {
      "nvmet_ports": [
        {
          "port": 1,
          "address": "10.0.0.185",
          "protocol": "tcp"
        }
      ]
    }
  ]
}

Trailing characters:

petros@dev-machine:~/misc/rapiddisk/src$ curl -s --output - 10.0.0.185:9118/v1/listAllNVMePortssssd|jq .
{
  "targets": [
    {
      "nvmet_ports": [
        {
          "port": 1,
          "address": "10.0.0.185",
          "protocol": "tcp"
        }
      ]
    }
  ]
}

pkoutoupis avatar Dec 17 '22 17:12 pkoutoupis

There is no strict checking on URL syntax, in general. I introduced some checks on the number of arguments of some REST calls, but more sanity checks are needed. More on this as soon as I can!

matteotenca avatar Dec 20 '22 18:12 matteotenca