Skip to content

Commit

Permalink
Merge pull request #359 from Gee19/master
Browse files Browse the repository at this point in the history
fix: XSS in next_path url param
  • Loading branch information
Giuseppe De Marco authored Dec 1, 2022
2 parents 16bb169 + aa3b381 commit 5a0cfb2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 2 additions & 1 deletion djangosaml2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def validate_referral_url(request, url):

if not url_has_allowed_host_and_scheme(url=url, allowed_hosts=saml_allowed_hosts):
return get_fallback_login_redirect_url()
return url

return urllib.parse.quote(url, safe="/")


def saml2_from_httpredirect_request(url):
Expand Down
8 changes: 2 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def read(*rnames):

setup(
name="djangosaml2",
version="1.5.3",
version="1.5.4",
description="pysaml2 integration for Django",
long_description=read("README.md"),
long_description_content_type="text/markdown",
Expand Down Expand Up @@ -61,9 +61,5 @@ def read(*rnames):
packages=find_packages(exclude=["tests", "tests.*"]),
include_package_data=True,
zip_safe=False,
install_requires=[
"defusedxml>=0.4.1",
"Django>=2.2,<5",
"pysaml2>=6.5.1",
],
install_requires=["defusedxml>=0.4.1", "Django>=2.2,<5", "pysaml2>=6.5.1"],
)

0 comments on commit 5a0cfb2

Please sign in to comment.