Item9609: Can't read topic with the same name as the cgiScriptName

pencil
Priority: Urgent
Current State: Closed
Released In: 1.1.0
Target Release: patch
Applies To: Engine
Component:
Branches:
Reported By: MichaelDaum
Waiting For:
Last Change By: KennethLavrsen
How to reproduce:

  1. set short urls to create view prefixes like http://localhost/foswiki/Sandbox/WebHome
  2. create a topic called Foswiki
  3. save
  4. when visiting the url http://localhost/foswiki/Sandbox/Foswiki, you'll see Sandbox.WebHome instead

The error is in Foswiki::Engine::CGI.pm where the SCRIPT_NAME is removed from the PATH_INFO this is done using something like

   $pathInfo =~ s/$scriptName//i;

This will erase any non-case-sensitive occurrence from the path. Obviously this is poo. It must only replace SCRIPT_NAME from the prefix of the PATH_INFO.

Changing this to

   $pathInfo =~ s/^$scriptName//;

This bug is present in any foswiki versions available.

-- MichaelDaum - 03 Sep 2010

 

ItemTemplate edit

Summary Can't read topic with the same name as the cgiScriptName
ReportedBy MichaelDaum
Codebase 1.0.9, trunk
SVN Range
AppliesTo Engine
Component
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:60fa15fb64a6 distro:b78ce6da6f5d
TargetRelease patch
ReleasedIn 1.1.0
Topic revision: r5 - 08 Sep 2010, KennethLavrsen
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