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

Add IP address format validation in get_ip() function #58

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

mauvehed
Copy link
Owner

fix(main.py): add IP address format validation in get_ip function

The get_ip function now checks if the retrieved IP address is in a valid format using the ipaddress module. If the IP address is not valid, it returns the string "Invalid IP Address". This change ensures that only valid IP addresses are processed by the application.

The get_ip function now checks if the retrieved IP address is in a valid format using the ipaddress module. If the IP address is not valid, it returns the string "Invalid IP Address". This change ensures that only valid IP addresses are processed by the application.
@mauvehed mauvehed added enhancement Enhancement of the code, not introducing new features. security Addressing a vulnerability or security risk in this project. minor This PR causes a minor bump in the version number. priority-high After critical issues are fixed, these should be dealt with before any further issues. no-stale This is exempt from the stale bot. python Pull requests that update Python code labels Nov 24, 2023
@mauvehed mauvehed self-assigned this Nov 24, 2023
@mauvehed mauvehed linked an issue Nov 24, 2023 that may be closed by this pull request
@mauvehed mauvehed merged commit 206db9a into main Nov 24, 2023
17 of 18 checks passed
@mauvehed mauvehed deleted the feat/5-enhance-add-real-ip-check-before-return branch November 24, 2023 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of the code, not introducing new features. minor This PR causes a minor bump in the version number. no-stale This is exempt from the stale bot. priority-high After critical issues are fixed, these should be dealt with before any further issues. python Pull requests that update Python code security Addressing a vulnerability or security risk in this project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enhance: Add real IP check before return
1 participant