log: torcontrol opt checks #28780

pull bufo24 wants to merge 3 commits into bitcoin:master from bufo24:torcontrol_opt_checks changing 14 files +87 −61
  1. bufo24 commented at 9:35 pm on November 2, 2023: contributor

    Aims to fix #23589. Host and port validation on torcontrol, same logic is being used on the other flags which need this validation as well.

    This is my first PR for bitcoin core and came across this good first issue, continued on already existing code for this issue.

    Took some inspiration from this comment

  2. Ensure valid network address in `-torcontrol`
    - Returns error at init if `-torcontrol` is not a valid host:port combo.
    - `StartTorControl` returns a `bool`, and has a return parameter `error`
    where a suitable message is set at failure.
    
    Fixes #23589
    2d15e76df4
  3. util: Adds `network`, network address validation
    This utility implements the function `hasValidHostPort`, which conducts
    a sanity check for a valid host:port combination in a string.
    This can be used for rejection of invalid option strings. Rules for
    a valid hostname are: not empty and no spaces, for port: not empty
    and within `uint16` bounds.
    51ed3ce81c
  4. chore: update torcontrol opt validation f8a77040f9
  5. DrahtBot commented at 9:35 pm on November 2, 2023: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #28834 (net: Attempts to connect to all resolved addresses on addnode by sr-gi)
    • #27820 (Sanitizing ports of -rpcconnect and -rpcport. by Brotcrunsher)
    • #27557 (net: call getaddrinfo() in detachable thread to prevent stalling by pinheadmz)
    • #27375 (net: support unix domain sockets for -proxy and -onion by pinheadmz)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  6. DrahtBot added the label Utils/log/libs on Nov 2, 2023
  7. DrahtBot added the label CI failed on Nov 2, 2023
  8. kevkevinpal commented at 1:12 am on November 8, 2023: contributor
    looks like automated tests are failing
  9. maflcko commented at 1:25 pm on November 13, 2023: member
    Are you still working on this?
  10. bufo24 commented at 9:44 am on November 14, 2023: contributor

    Are you still working on this?

    no unfortunately not

  11. fanquake closed this on Nov 14, 2023


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: 2024-10-31 03:12 UTC

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