You are here: Foswiki>Tasks Web>Item2205 (16 Mar 2011, GeorgeClark)Edit Attach

Item2205: topicExists gets confused by illegal topic names

pencil
Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: UrlHandling
Branches:
Reported By: BenAveling
Waiting For:
Last Change By: GeorgeClark
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

ItemTemplate edit

Summary topicExists gets confused by illegal topic names
ReportedBy BenAveling
Codebase 1.1.3 beta1, 1.1.2, 1.1.1, 1.1.0, 1.0.10, 1.0.9, 1.0.8, 1.0.7, 1.0.6
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Engine
Component UrlHandling
Priority Normal
CurrentState Confirmed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
Topic revision: r3 - 16 Mar 2011, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy