on a TWiki topic causes an infinite INCLUDE loop, which brings the TWiki server down when the topic is viewed.
needs to check if the specified URL may cause infinite loop.
Checking if the specified URL matches
$this->getScriptUrl(1, 'view', $web, $topic)
is not enough.
- The TWiki server might be referred to by another name
- There might be alternative path to the topic -- e.g. /WEB/TOPIC is the canonical path but /cgi-bin/view/WEB/TOPIC works too
- Accessing /WEB means accessing WEB.WebHome, which needs to be taken into account
For 1, new configuration parameter
is introduced. If it's defined, check if the specified URL matches
is not defined,
is used instead.
If the current page is WebHome, check if the specified URL matches
. Otherwise, check if the specified URL matches
If both the server name and web/topic match, the call to _includeUrl() is aborted.
How about using
instead of a new config?
seems necessary for the following reasons.
(obviously for redirect) is convoluted (TWiki administrators would be puzzled) and doesn't work sometimes.
There might be a case where redirect to a different server A is permitted and also some pages of the server A is included.
was for its own host name aliases as the following sentence is on lib/TWiki.spec. But now it is not only for that.
If your host has aliases (such as both www.twiki.org and twiki.org, and some IP addresses) you need to list them to tell TWiki that redirecting to them is OK.