#34581: Filters should not implicitly mark unsafe strings as safe without 
escaping
--------------------------------------+------------------------------------
     Reporter:  Shai Berger           |                    Owner:  (none)
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Template system       |                  Version:  dev
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by omerimzali):

 I'd like to work on this ticket.

 And I have 2 questions.


 {{{
 "I suggest a general rule: A filter which gets unsafe input, should not
 escape it, and yet needs to produce safe output, should error out. This is
 a hardening, not a security fix, so it should follow a normal deprecation
 cycle: The actual change should only happen after the next LTS release."
 }}}

 A filter which gets unsafe input should not escape it. I totally agree but
 do we mean it only when autoescape off? {% autoescape off %}

 How should I check "All filters which can get unsafe input".  I know
 Django at least has 4 of them below. What's the right way to find others?
 Should this patch contains all of them.

 {{{
 join
 linenumbers,
 linebreaks,
 linebreaksbr,
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34581#comment:5>
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/0107018ae69e9879-fb3b4f79-c66c-4784-b878-2b53e7a110ee-000000%40eu-central-1.amazonses.com.

Reply via email to