Skip to content

Commit 64f6bce

Browse files
committed
Document named URL patterns also being resolved
1 parent 9bfd3df commit 64f6bce

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

djangosaml2/utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def validate_referral_url(request, url):
113113
)
114114
try:
115115
if saml_strict_url_validation:
116+
# This will also resolve Django URL pattern names
116117
url = resolve_url(url)
117118
except NoReverseMatch:
118119
logger.debug("Could not validate given referral url is a valid URL")

docs/source/contents/setup.rst

+2
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ example: 'home' could be '/home' or 'home/'.
151151
If this is unfeasible, this strict validation can be turned off by setting
152152
``SAML_STRICT_URL_VALIDATION`` to ``False`` in settings.py.
153153

154+
During validation, `Django named URL patterns<https://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns>`_
155+
will also be resolved. Turning off strict validation will prevent this from happening.
154156

155157
Preferred sso binding
156158
=====================

0 commit comments

Comments
 (0)