[REST] remove json input for getutxos, limit to query max. 15 outpoints #6193

pull jonasschnelli wants to merge 2 commits into bitcoin:master from jonasschnelli:2015/05/rest_rm_getutxos changing 3 files +113 −97
  1. jonasschnelli commented at 2:06 PM on May 27, 2015: contributor

    Remove possibility to send json encoded parameters to /rest/getutxos/ to avoid possible DoS scenarios (issue #6192).

    The JSON output option is untouched.

  2. rest.cpp: strip whitespace 64b8027c5c
  3. jonasschnelli force-pushed on May 27, 2015
  4. laanwj commented at 2:24 PM on May 27, 2015: member

    utACK, I like the new interface

  5. [REST] remove json input for getutxos, limit to query max. 15 outpoints
    Remove possibility to send json encoded parameters to `/rest/getutxos/` to avoid possible DoS scenarios.
    
    The JSON output option is untouched.
    6e71efa9f0
  6. jonasschnelli force-pushed on May 27, 2015
  7. jgarzik commented at 7:40 PM on May 27, 2015: contributor

    ut ACK - though I don't understand why we care about operators DoS'ing themselves... Nobody should be sending any data, json or binary, straight from remote to the REST interface without sanitizing.

  8. jonasschnelli commented at 7:47 PM on May 27, 2015: contributor

    I agree with @jgarzik. The nice side effect of this PR is that it harmonize the input scheme (avoid raw http post data and use /rest/<command>/<parameter:1>/<parameter:n>.json everywhere). And JSON as input format was a bad decision anyways (as output format it's totally fine IMO).

  9. jonasschnelli commented at 6:59 AM on May 28, 2015: contributor

    Travis issue (as well as in #6197 and #6198) is because of the failing native comparison tool (java). Hope someone can fix this soon.

  10. laanwj added the label REST on May 29, 2015
  11. laanwj commented at 11:04 AM on May 29, 2015: member

    avoid raw http post data and use /rest/<command>/parameter:1/parameter:n.json everywhere

    Exactly. Providing parameters in the URI is what makes this interface more elegant, for simple queries like this.

  12. laanwj merged this on Jun 1, 2015
  13. laanwj closed this on Jun 1, 2015

  14. laanwj referenced this in commit 42746b0476 on Jun 1, 2015
  15. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me