Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved search for network addresses within a given string #355

Merged
merged 3 commits into from
Feb 12, 2024

Conversation

zivnevo
Copy link
Member

@zivnevo zivnevo commented Feb 7, 2024

Fixes #353

Also checks various suffixes of the given string to see if they can be interpreted as a network address. Starts from the whole string, then checks shorter and shorter suffixes.

This comes to identify network addresses in command-line args like -server-addr=my_server:5000 or server-addr:my_server:5000.

Since we now find more suspects, a validation of the port number/name was also added, to rule-out strings that are clearly not network addresses.

Signed-off-by: ZIV NEVO <[email protected]>
@zivnevo zivnevo requested a review from adisos February 12, 2024 06:19
Copy link
Contributor

@adisos adisos left a comment

Choose a reason for hiding this comment

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

looks good

@zivnevo zivnevo merged commit 48e3b23 into main Feb 12, 2024
6 checks passed
@zivnevo zivnevo deleted the network-addr-as-suffix branch February 12, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better lookup for URLs inside strings
2 participants