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

Fix SSRFProtect validation options to properly handle Constance settings #5205

Open
wants to merge 1 commit into
base: release/2.024.33
Choose a base branch
from

Conversation

noliveleger
Copy link
Contributor

@noliveleger noliveleger commented Oct 28, 2024

Description :

This PR addresses an issue where SSRF Protect validation fails to consider the Constance settings correctly. It now strips line break characters from the IP input before performing the SSRF Protect validation.

Testing

  • Create a project with RestService (Project > Settings > Rest Services)
  • Use local ip (of your host machine) for the endpoint URL (e.g, http://192.168.0.10)
  • Add 192.168.0.10 and 192.168.0.11 in SSRF_ALLOWED_IP_ADDRESS in Constance
  • Submit data
  • It should not raise error ssrf_protect.exceptions.SSRFProtectException: URL "http://192.168.0.10" is not allowed because it resolves to a private IP address (but could still fail because you don't have a webserver which listens on local computer).

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

Successfully merging this pull request may close these issues.

2 participants