Files
Twig/src
Fabien Potencier 679447fa29 Encode single quotes as \x27 in Compiler::string()
This is a defense-in-depth measure: callers must always concatenate the
result into a double-quoted PHP context, but if one ever (mistakenly)
embeds it inside a single-quoted PHP literal, an attacker-controlled
single quote in the source value could break out of that context. The
previous commit fixed exactly such a bug in ModuleNode for the {% use %}
template name.

Encoding ' as the hex escape \x27 guarantees that the emitted PHP source
never contains a literal single quote derived from user input, while the
decoded runtime value is unchanged. \' is not used because it is not a
recognized escape sequence in PHP double-quoted strings (the backslash
would be kept literally).
2026-05-19 22:58:27 +02:00
..
2026-03-17 08:26:25 +01:00
2026-02-07 09:07:38 +01:00
2025-09-15 07:51:41 +02:00
2026-05-19 17:02:22 +02:00
2025-08-17 19:23:48 +02:00
2026-02-07 13:41:32 +01:00
2026-05-16 09:48:23 +01:00
2026-02-07 09:07:38 +01:00
…