From: <Web...@St...> - 2006-03-30 11:22:25
|
On Wed, 29 Mar 2006, Keats Kirsch wrote: | Thanks Sven. | | I've gone through the code and found one other place where this loop could | occur; the TypeDirective. I have committed a patch for that as well. There | is currently no unit test for this directive; I'll try to add one. (Does | anybody use this?) | | It occurs to me that we are still vulnerable to infinite loops with other | Macro implementations. I noticed in the PropertyMethod class that it actually | tests if the Macro evaluates to itself. This takes us one step further, but | you could still have an infinite loop if there is a multiple class circular | reference. E.g., MacroA evals to MacroB which evals to MacroA. It's probably | not worth guarding against this somewhat arcane case. What do folks think? It is sad that WM gives this much power to the templating layer - on a philosophical level. I liked it when there wasn't even #count - you couldn't "program" i WM - as it was intentionally too limited for this - you were supposed to just lay out your already-fetched data. Other stuff has been put into WM to guard against template-writers access to "dangerous classes and methods" (java.lang.Class), but now they can take the entire WM down by executing an infinite loop. It doesn't matter for _me_, though. Regards, Endre. |