| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
I was going through the book when I saw the version was still 0.8.
This commit ensures all references to Askama version are to 0.11.2.
Most of them already were.
Merge whenever appropriate for release, #722 related
|
| |
|
|
|
|
| |
This was a source of some frustration working on a port of a toy app to askama. The tests do help, but having this called out in the docs would have saved me an hour or two.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the built-in json filter had an issue that made it unsafe to
use in HTML data. When used in HTML attributes an attacker who is able
to supply an arbitrary string that should be JSON encoded could close
the containing HTML element e.g. with `"</div>"`, and write arbitrary
HTML code afterwards as long as they use apostrophes instead of
quotation marks. The programmer could make this use case safe by
explicitly escaping the JSON result: `{{data|json|escape}}`.
In a `<script>` context the json filter was not usable at all, because
in scripts HTML escaped entities are not parsed outside of XHTML
documents. Without using the safe filter an attacker could close the
current script using `"</script>"`.
This PR fixes the problem by always escaping less-than, greater-than,
ampersand, and apostrophe characters using their JSON unicode escape
sequence `\u00xx`. Unless the programmer explicitly uses the safe
filter, quotation marks are HTML encoded as `"`. In scripts the
programmer should use the safe filter, otherwise not.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This web framework seems not to have been updated for quite a while,
and its current version appears to depend on vulnerable crates.
Remove it for now. If someone wants to fix up Iron upstream and
reinstate this, I'd be happy to review your PR.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
from master to main
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|