mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-07 03:03:58 +01:00
Store and use a sanitized subVer
This commit is contained in:
@@ -126,7 +126,10 @@ Value getpeerinfo(const Array& params, bool fHelp)
|
||||
if (stats.dPingWait > 0.0)
|
||||
obj.push_back(Pair("pingwait", stats.dPingWait));
|
||||
obj.push_back(Pair("version", stats.nVersion));
|
||||
obj.push_back(Pair("subver", stats.strSubVer));
|
||||
// Use the sanitized form of subver here, to avoid tricksy remote peers from
|
||||
// corrupting or modifiying the JSON output by putting special characters in
|
||||
// their ver message.
|
||||
obj.push_back(Pair("subver", stats.cleanSubVer));
|
||||
obj.push_back(Pair("inbound", stats.fInbound));
|
||||
obj.push_back(Pair("startingheight", stats.nStartingHeight));
|
||||
obj.push_back(Pair("banscore", stats.nMisbehavior));
|
||||
|
||||
Reference in New Issue
Block a user