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

Validate server and client IP address #1755

Merged
merged 33 commits into from
Apr 17, 2023
Merged

Validate server and client IP address #1755

merged 33 commits into from
Apr 17, 2023

Conversation

charlesbvll
Copy link
Member

What does this implement/fix? Explain your changes.

The server and client IPs are given as strings but are not validated. This PR adds a utility function to parse IPv4 and IPv6 addresses.

@charlesbvll charlesbvll marked this pull request as ready for review March 28, 2023 19:58
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
src/py/flwr/common/address_test.py Show resolved Hide resolved
src/py/flwr/common/address_test.py Show resolved Hide resolved
src/py/flwr/server/app.py Outdated Show resolved Hide resolved
src/py/flwr/server/app.py Outdated Show resolved Hide resolved
src/py/flwr/server/app.py Outdated Show resolved Hide resolved
src/py/flwr/server/app.py Outdated Show resolved Hide resolved
src/py/flwr/server/app.py Outdated Show resolved Hide resolved
src/py/flwr/server/app.py Outdated Show resolved Hide resolved
src/py/flwr/server/app.py Outdated Show resolved Hide resolved
src/py/flwr/server/app.py Outdated Show resolved Hide resolved
src/py/flwr/server/app.py Outdated Show resolved Hide resolved
src/py/flwr/common/address.py Outdated Show resolved Hide resolved
src/py/flwr/common/address.py Outdated Show resolved Hide resolved
src/py/flwr/common/address.py Outdated Show resolved Hide resolved
src/py/flwr/common/address.py Outdated Show resolved Hide resolved
src/py/flwr/common/address.py Outdated Show resolved Hide resolved
src/py/flwr/common/address_test.py Show resolved Hide resolved
@charlesbvll
Copy link
Member Author

charlesbvll commented Apr 17, 2023

@danieljanes Should we use an external library like this one to check if a string is a valid domain? Otherwise we could also check with requests that the URL not only is correct but also exists on the internet:

    try:
        response = requests.get(url)
        print("URL is valid and exists on the internet")
    except requests.ConnectionError as exception:
        print("URL does not exist on Internet")

Copy link
Member

@tanertopal tanertopal left a comment

Choose a reason for hiding this comment

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

@danieljanes as far as I can see this looks good. Let's merge it.

@danieljanes danieljanes merged commit b088337 into main Apr 17, 2023
@danieljanes danieljanes deleted the validate-address branch April 17, 2023 14:31
tanertopal added a commit that referenced this pull request Apr 17, 2023
* main:
  Validate server and client IP address (#1755)
  Export unexported modules for better LSP hint; fix wrong `fl` alias usage (#1773)
  Add FEMNIST baseline release to the changelog (#1787)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants