#17906: 'firstof' and 'cycle'  should autoescape
-------------------------------------+-------------------------------------
     Reporter:  anonymous            |                    Owner:
                                     |  Vladimir.Filonov
         Type:  Uncategorized        |                   Status:  closed
    Component:  Template system      |                  Version:  1.3
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  sprint2013           |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Алексей Поклонский):

 It's important to note that firstof escapes only variables! not passe
 string literals:
 so you should use

 {{{
 {% filter force_escape %}
         {% firstof var1 var2 var3 "<script>alert('XSS');</script>" %}
 {% endfilter %}
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17906#comment:16>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070187b4068857-720c90ed-7cda-47c5-a4aa-c078dbb89d0a-000000%40eu-central-1.amazonses.com.

Reply via email to