~vcs-imports/supybot/trunk

Viewing all changes in revision 7009.

  • Committer: James McCoy
  • Date: 2014-06-10 03:48:41 UTC
  • Revision ID: git-v1:f5df6695c04305cfa04a393ad863e334bf6c57ae
Alias: Restore recursion limit and limit memory use

The (faulty) detection of recursive Aliases was removed in
a656fd06930541103c70297825d6f5f5956ecc45, claiming that "our nesting
limit will catch issues now."  However, nested Aliases weren't actually
increasing the nesting level.

Actually increasing the nesting level when an alias is executed restores
the intended behavior.  Additionally, limiting the size of the
expanded arguments to an alias prevents exponential growth of memory
usage for certain malicious inputs/aliases.

Signed-off-by: James McCoy <vega.james@gmail.com>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: