#28638: Allow `is_safe_url` to work without `allowed_hosts` or make the 
parameter
mandatory
-----------------------------------------+------------------------
               Reporter:  kemar          |          Owner:  nobody
                   Type:  Uncategorized  |         Status:  new
              Component:  Uncategorized  |        Version:  1.11
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 {{{
 >>> from django.utils.http import is_safe_url

 >>> is_safe_url("https://www.djangoproject.com";)
 False

 >>> is_safe_url("https://www.djangoproject.com";,
 allowed_hosts={"www.djangoproject.com"})
 True
 }}}

 If this may have an impact on security, then make it clear that
 `allowed_hosts` is mandatory by removing its `None` default value
 
[https://github.com/django/django/blob/98706bb35e7de0e445cc336f669919047bf46b75/django/utils/http.py#L265].

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28638>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/048.7f8518f8b47f86354311c9bc80e58333%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to