01099: Page Text Variables Code that Locks up PHP in (Presumably) Endless Loop

Summary: Page Text Variables Code that Locks up PHP in (Presumably) Endless Loop
Created: 2009-06-08 04:32
Status: Closed (fixed for 2.2.3)
Category: Bug
Assigned:
Priority: 5
Version: 2.2.0-beta68
OS: PHP 5.2.6-2ubuntu4.2

Description: THIS CODE IS VERY BAD! It (presumably) creates an endless loop that completely locks up PHP. I found it difficult on a couple of tests to re-access editing though pmwiki and had to manually edit the pages to remove the offending code. It could be used pretty maliciously (and quite EASILY!) to eat up server resources and lock up pages.

First what works correctly...

:term1: def1

:term2: {$:term1}

:term3: {Main.HomePage$:term2}

THIS IS THE BAD CODE:

:term4: {Main.HomePage$:term4}

Two conditions must be present:

  1. The term listed in :t: must match exactly the page text variable.
  2. The current page must be the one used in the page text variable.

MORE BAD CODE:

:toA: {$:toB}
:toB: {$:toA}

See also