Skip to content

Validate string#434

Open
chris124567 wants to merge 2 commits into
masterfrom
christopher/fix-peer-string
Open

Validate string#434
chris124567 wants to merge 2 commits into
masterfrom
christopher/fix-peer-string

Conversation

@chris124567
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 20, 2026 15:18
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds basic validation for peer address strings before they are persisted to the peer store during peer discovery, preventing obviously malformed host:port entries from being recorded.

Changes:

  • Added validatePeer(addr string) error to validate host:port formatting and port range.
  • Updated peer discovery to ignore (and log) invalid addresses returned by the ShareNodes RPC.
  • Added strconv import to support port parsing.

Note: This repo contains knope.toml; consider adding an appropriate changeset file for this behavioral change.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread syncer/syncer.go
Comment thread syncer/syncer.go
Comment thread syncer/syncer.go
Copy link
Copy Markdown
Contributor

@Alrighttt Alrighttt left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants