Opened 12 years ago

Closed 12 years ago

#19088 closed Bug (fixed)

Blocktrans tag goes to infinite recursion if python dict string format is used

Reported by: vlinhart Owned by: Łukasz Rekucki
Component: Translations Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Wrongly formatted blocktrans content example:

{% blocktrans %}Enter SMS No. %(var_0)s{% endblocktrans %}

This will cause blocktrans tag to go to infinite recursion of death possibly leading to out of memory for the whole server.

Change History (7)

comment:1 by Łukasz Rekucki, 12 years ago

Owner: changed from nobody to Łukasz Rekucki
Triage Stage: UnreviewedAccepted

It definitely should not crash that.

Just as a side note, Python has a fixed recursion limit (see sys.getrecursionlimit), so no, it won't use up all of your server's memory.

Version 0, edited 12 years ago by Łukasz Rekucki (next)

comment:2 by Łukasz Rekucki, 12 years ago

Related to #16721 and #4982 (too old to reopen).

comment:4 by Jan Bednařík, 12 years ago

Patch needs improvement: set

comment:5 by Łukasz Rekucki, 12 years ago

Patch needs improvement: unset

Updated pull request.

comment:6 by Jan Bednařík, 12 years ago

Triage Stage: AcceptedReady for checkin

comment:7 by Claude Paroz <claude@…>, 12 years ago

Resolution: fixed
Status: newclosed

In 9fd2f9c5f3c008f524874fd7cf78237e65bf567e:

Fixed #19088 -- Always escape % inside blocktrans tag

Thanks vlinhart for the report and Łukasz Rekucki for the patch.

Note: See TracTickets for help on using tickets.
Back to Top