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 new method for django open redirect rule #2873

Merged
merged 2 commits into from
Apr 27, 2023
Merged

Conversation

cleibl
Copy link
Contributor

@cleibl cleibl commented Apr 17, 2023

This PR updates the rule python.django.security.injection.open-redirect.open-redirect to support the method url_has_allowed_host_and_scheme().

url_has_allowed_host_and_scheme() replaced the deprecated is_safe_url() in django 3.0 : https://docs.djangoproject.com/en/4.0/releases/3.0/#:%7E:text=To%20avoid%20possible%20confusion%20as%20to%20effective%20scope%2C%20the%20private%20internal%20utility%20is_safe_url()%20is%20renamed%20to

To avoid possible confusion as to effective scope, the private internal utility is_safe_url() is renamed to url_has_allowed_host_and_scheme()

@CLAassistant
Copy link

CLAassistant commented Apr 17, 2023

CLA assistant check
All committers have signed the CLA.

@kurt-r2c
Copy link
Contributor

@cleibl please pull in latest changes from upstream - you are missing a CI fix from last week. This should get you a clean set of CI checks.

@cleibl
Copy link
Contributor Author

cleibl commented Apr 27, 2023

Thanks @kurt-r2c! I've sync'd the fork with the latest changes from upstream.

@kurt-r2c kurt-r2c merged commit c8ec8af into semgrep:develop Apr 27, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants