Bugfix: prioritisetransaction: Do some basic sanity checking on txid #5499

pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:bugfix_priotxn_txid_check changing 3 files +7 −2
  1. luke-jr commented at 9:39 AM on December 17, 2014: member

    Besides giving a nicer error, this also prevents logging arbitrary data (which could have been used to exploit log readers) into debug.log

    This fixes both issues reported by @SergioDemianLerner on #5398

  2. Bugfix: prioritisetransaction: Do some basic sanity checking on txid
    Besides giving a nicer error, this also prevents logging arbitrary data (which could have been used to exploit log readers) into debug.log
    7f71813919
  3. in src/core_io.h:None in 7f71813919
      18 | @@ -19,6 +19,7 @@ extern CScript ParseScript(std::string s);
      19 |  extern bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx);
      20 |  extern bool DecodeHexBlk(CBlock&, const std::string& strHexBlk);
      21 |  extern uint256 ParseHashUV(const UniValue& v, const std::string& strName);
      22 | +extern uint256 ParseHashStr(const std::string&, const std::string& strName);
    


    Diapolo commented at 5:53 PM on December 17, 2014:

    Why are you leaving our the strHex variable name but supply strName? Seems you are not following your own practises :-P.


    luke-jr commented at 6:50 PM on December 17, 2014:

    strName is necessary to understand the purpose of the parameter. "strHex" is just redundant.

  4. jonasschnelli commented at 10:12 AM on December 18, 2014: contributor

    ACK (reviewed, built, tested)

  5. laanwj added this to the milestone 0.10.0 on Dec 28, 2014
  6. laanwj merged this on Dec 31, 2014
  7. laanwj closed this on Dec 31, 2014

  8. laanwj referenced this in commit a5eb61d9ef on Dec 31, 2014
  9. laanwj referenced this in commit 1eadfd9753 on Dec 31, 2014
  10. luke-jr deleted the branch on Jan 1, 2015
  11. reddink referenced this in commit 6f147a3cef on May 27, 2020
  12. 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-14 15:15 UTC

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