GolosChain / golos

Socio-economic mediablockchain
https://developers.golos.io
Other
59 stars 36 forks source link

Segfault in cli_wallet on wrong http-request #497

Closed afalaleev closed 6 years ago

afalaleev commented 6 years ago

Steps to reproduce

  1. Run cli_wallet with http-interface
    ./cli_wallet  --server-rpc-endpoint="ws://127.0.0.1:8091" --rpc-http-endpoint="0.0.0.0:6789" --rpc-http-allowip=127.0.0.1
  2. Send request via curl:
    curl --data '{"jsonrpc":"2.0","method":"info","params":[ ]}' http://127.0.0.1:6789/rpc

Actual results cli_wallet is segfaulted

Expected results cli_wallet returns an error.

zxcat commented 6 years ago

Fixed in https://github.com/GolosChain/fc/pull/9

Note: request {"jsonrpc":"2.0","method":"info","params":[ ]} have no id field, so JSON-RPC 2.0 interprets it as notification. Expected result is empty answer in this case.

zxcat commented 6 years ago

Needs https://github.com/GolosChain/fc/pull/10 to be merged too, so I can set submodule properly

kotbegemot commented 6 years ago

https://github.com/GolosChain/golos/pull/520