Item2205: topicExists gets confused by illegal topic names
Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release: n/a
Calling edit with a non wiki word and with onlywikiname set fails, but with the wrong error message.
Instead of not_wikiword it returns topic_exists - on my installation anyway.
The "WebHome" topic already exists.
On foswiki.org it also fails, with topic_access, but I'm sure this is a different manifestation of the same problem.
For eg, visiting
http://foswiki.org/bin/edit/Sandbox/?topic=Test+Test&onlywikiname=on&onlynewtopic=on
Gives
Access check on
Sandbox failed. Action "CHANGE": access not allowed on topic.
Adding some debug statements shows that topicExists is being set to 1, even though the topic doesn't exist. If I pass a wikiWord, it works just fine.
--
BenAveling - 04 Oct 2009
This is due to the check performed in Foswiki.pm, where if the topic name is invalid it defaults to WebHome to protect the rest of the code.
Confirmed.
It's not that the topic is not a WikiWord, it's that it contains a character (a space) that invalidates it. But the effect is still the same, and has often related in accidental edits to
WebHome as well.
--
GeorgeClark - 16 Mar 2011
--
CrawfordCurrie - 27 Jun 2010