Skip to content

Conversation

practicalswift
Copy link
Contributor

@practicalswift practicalswift commented Oct 31, 2018

  • Make HTTP RPC debug logging more informative
  • Avoid excessively large log messages (which could theoretically fill up the disk) when running with debug option -debug=http

@laanwj
Copy link
Member

laanwj commented Oct 31, 2018

utACK a6cf746
thanks!

@kristapsk
Copy link
Contributor

utACK a6cf746b43686c1c2307b31308d2d6cd18ddb696

@luke-jr
Copy link
Member

luke-jr commented Oct 31, 2018

utACK

@hebasto
Copy link
Member

hebasto commented Oct 31, 2018

utACK a6cf746b43686c1c2307b31308d2d6cd18ddb696

Copy link
Contributor

@ken2812221 ken2812221 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

@jgarzik
Copy link
Contributor

jgarzik commented Nov 1, 2018

utACK

However, it must be noted that the HTTP server has always lacked proper request logging.

Having a separate log stream with logs parse-able by HTTP log analysis tools would be nice to have.

@practicalswift
Copy link
Contributor Author

@ken2812221 Thanks for reviewing. Now allowing all characters allowed in URIs.

Please re-review :-)

@practicalswift practicalswift force-pushed the limit-rpc-request-logging branch from d5505c3 to b301fec Compare November 1, 2018 16:08
@luke-jr
Copy link
Member

luke-jr commented Nov 2, 2018

Related (to adding new chars for SanitizeString): #10731

@DrahtBot
Copy link
Contributor

DrahtBot commented Nov 2, 2018

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

No conflicts as of last run.

@promag
Copy link
Contributor

promag commented Nov 2, 2018

@jgarzik see discussion in #13992.

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK b301fecb.

hreq->WriteReply(HTTP_BADMETHOD);
return;
}

LogPrint(BCLog::HTTP, "Received a %s request for %s from %s\n",
RequestMethodString(hreq->GetRequestMethod()), SanitizeString(hreq->GetURI(), SAFE_CHARS_URI).substr(0, 100), hreq->GetPeer().ToString());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the deal with 100 chars?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's nothing special simply a sanity limit that avoids logging huge entire requests

@sipa
Copy link
Member

sipa commented Nov 3, 2018

utACK b301fecb830ad8ca9ec2419978ae8e0b6fbc6754

1 similar comment
@jonasschnelli
Copy link
Contributor

utACK b301fecb830ad8ca9ec2419978ae8e0b6fbc6754

@DrahtBot
Copy link
Contributor

DrahtBot commented Nov 5, 2018

Needs rebase

@practicalswift practicalswift force-pushed the limit-rpc-request-logging branch from b301fec to ab8c6f2 Compare November 5, 2018 12:27
@practicalswift
Copy link
Contributor Author

Rebased! :-)

@laanwj laanwj merged commit ab8c6f2 into bitcoin:master Nov 5, 2018
laanwj added a commit that referenced this pull request Nov 5, 2018
ab8c6f2 Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986) (practicalswift)
9912486 rpc: Make HTTP RPC debug logging more informative (practicalswift)

Pull request description:

  * Make HTTP RPC debug logging more informative
  * Avoid excessively large log messages (which could theoretically fill up the disk) when running with debug option `-debug=http`

Tree-SHA512: 9068862fb7d34db1e12e6b9dde78b669b86c65b4fed3ea8c9eb6c35310d77fd12b16644728fd7e9fbf25059d25114bded9e061eb3de649d8847486ec42041ce9
fanquake pushed a commit to fanquake/bitcoin that referenced this pull request Nov 29, 2018
fanquake pushed a commit to fanquake/bitcoin that referenced this pull request Nov 29, 2018
@fanquake
Copy link
Member

Backported in #14835.

maflcko pushed a commit that referenced this pull request Nov 30, 2018
f9db08e qa: Avoid race in p2p_invalid_block by waiting for the block request (MarcoFalke)
7935881 Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986) (practicalswift)
9666dba rpc: Make HTTP RPC debug logging more informative (practicalswift)
b901578 add test demonstrating addrLocal UB (Kaz Wesley)
6f04264 fix uninitialized read when stringifying an addrLocal (Kaz Wesley)
5782fdc Throw error if CPubKey is invalid during PSBT keypath serialization (Gregory Sanders)
de5e48a Bugfix: RPC: Add address_type named param for createmultisig (Luke Dashjr)
df5131b gui: explicitly disable "Dark Mode" appearance on macOS (fanquake)

Pull request description:

  Backports #14593, #14596, #14618, #14690 and #14728 to the 0.17 branch.

Tree-SHA512: fcda4b75fcb71bb80cc8bde2a2b98ff5c0239dfa754ac980b1a91a90409502ac7678326399a4fc03a773074339dbf8b3d11750c91fe4302741a954745acfcca1
codablock pushed a commit to codablock/dash that referenced this pull request Oct 14, 2019
ab8c6f2 Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986) (practicalswift)
9912486 rpc: Make HTTP RPC debug logging more informative (practicalswift)

Pull request description:

  * Make HTTP RPC debug logging more informative
  * Avoid excessively large log messages (which could theoretically fill up the disk) when running with debug option `-debug=http`

Tree-SHA512: 9068862fb7d34db1e12e6b9dde78b669b86c65b4fed3ea8c9eb6c35310d77fd12b16644728fd7e9fbf25059d25114bded9e061eb3de649d8847486ec42041ce9
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Apr 17, 2020
Summary:
ab8c6f24d28ea1d1e6258cf316b4b97a0baf2377 Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986) (practicalswift)
991248649b76a5a071e1360a700f3e2ecf3e1e1f rpc: Make HTTP RPC debug logging more informative (practicalswift)

Pull request description:

  * Make HTTP RPC debug logging more informative
  * Avoid excessively large log messages (which could theoretically fill up the disk) when running with debug option `-debug=http`

Tree-SHA512: 9068862fb7d34db1e12e6b9dde78b669b86c65b4fed3ea8c9eb6c35310d77fd12b16644728fd7e9fbf25059d25114bded9e061eb3de649d8847486ec42041ce9

---

This is a backport of Core [[bitcoin/bitcoin#14618 | PR14618]]

Test Plan:
  ninja check

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5747
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request Aug 17, 2020
Summary:
ab8c6f24d28ea1d1e6258cf316b4b97a0baf2377 Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986) (practicalswift)
991248649b76a5a071e1360a700f3e2ecf3e1e1f rpc: Make HTTP RPC debug logging more informative (practicalswift)

Pull request description:

  * Make HTTP RPC debug logging more informative
  * Avoid excessively large log messages (which could theoretically fill up the disk) when running with debug option `-debug=http`

Tree-SHA512: 9068862fb7d34db1e12e6b9dde78b669b86c65b4fed3ea8c9eb6c35310d77fd12b16644728fd7e9fbf25059d25114bded9e061eb3de649d8847486ec42041ce9

---

This is a backport of Core [[bitcoin/bitcoin#14618 | PR14618]]

Test Plan:
  ninja check

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5747
@practicalswift practicalswift deleted the limit-rpc-request-logging branch April 10, 2021 19:36
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 27, 2021
ab8c6f2 Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986) (practicalswift)
9912486 rpc: Make HTTP RPC debug logging more informative (practicalswift)

Pull request description:

  * Make HTTP RPC debug logging more informative
  * Avoid excessively large log messages (which could theoretically fill up the disk) when running with debug option `-debug=http`

Tree-SHA512: 9068862fb7d34db1e12e6b9dde78b669b86c65b4fed3ea8c9eb6c35310d77fd12b16644728fd7e9fbf25059d25114bded9e061eb3de649d8847486ec42041ce9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 28, 2021
ab8c6f2 Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986) (practicalswift)
9912486 rpc: Make HTTP RPC debug logging more informative (practicalswift)

Pull request description:

  * Make HTTP RPC debug logging more informative
  * Avoid excessively large log messages (which could theoretically fill up the disk) when running with debug option `-debug=http`

Tree-SHA512: 9068862fb7d34db1e12e6b9dde78b669b86c65b4fed3ea8c9eb6c35310d77fd12b16644728fd7e9fbf25059d25114bded9e061eb3de649d8847486ec42041ce9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 29, 2021
ab8c6f2 Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986) (practicalswift)
9912486 rpc: Make HTTP RPC debug logging more informative (practicalswift)

Pull request description:

  * Make HTTP RPC debug logging more informative
  * Avoid excessively large log messages (which could theoretically fill up the disk) when running with debug option `-debug=http`

Tree-SHA512: 9068862fb7d34db1e12e6b9dde78b669b86c65b4fed3ea8c9eb6c35310d77fd12b16644728fd7e9fbf25059d25114bded9e061eb3de649d8847486ec42041ce9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 1, 2021
ab8c6f2 Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986) (practicalswift)
9912486 rpc: Make HTTP RPC debug logging more informative (practicalswift)

Pull request description:

  * Make HTTP RPC debug logging more informative
  * Avoid excessively large log messages (which could theoretically fill up the disk) when running with debug option `-debug=http`

Tree-SHA512: 9068862fb7d34db1e12e6b9dde78b669b86c65b4fed3ea8c9eb6c35310d77fd12b16644728fd7e9fbf25059d25114bded9e061eb3de649d8847486ec42041ce9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 1, 2021
ab8c6f2 Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986) (practicalswift)
9912486 rpc: Make HTTP RPC debug logging more informative (practicalswift)

Pull request description:

  * Make HTTP RPC debug logging more informative
  * Avoid excessively large log messages (which could theoretically fill up the disk) when running with debug option `-debug=http`

Tree-SHA512: 9068862fb7d34db1e12e6b9dde78b669b86c65b4fed3ea8c9eb6c35310d77fd12b16644728fd7e9fbf25059d25114bded9e061eb3de649d8847486ec42041ce9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 1, 2021
ab8c6f2 Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986) (practicalswift)
9912486 rpc: Make HTTP RPC debug logging more informative (practicalswift)

Pull request description:

  * Make HTTP RPC debug logging more informative
  * Avoid excessively large log messages (which could theoretically fill up the disk) when running with debug option `-debug=http`

Tree-SHA512: 9068862fb7d34db1e12e6b9dde78b669b86c65b4fed3ea8c9eb6c35310d77fd12b16644728fd7e9fbf25059d25114bded9e061eb3de649d8847486ec42041ce9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 3, 2021
ab8c6f2 Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986) (practicalswift)
9912486 rpc: Make HTTP RPC debug logging more informative (practicalswift)

Pull request description:

  * Make HTTP RPC debug logging more informative
  * Avoid excessively large log messages (which could theoretically fill up the disk) when running with debug option `-debug=http`

Tree-SHA512: 9068862fb7d34db1e12e6b9dde78b669b86c65b4fed3ea8c9eb6c35310d77fd12b16644728fd7e9fbf25059d25114bded9e061eb3de649d8847486ec42041ce9
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.