New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists

Item10069: Web extension installer mis-locates Foswiki root if scripts in cgi-bin

Priority: Urgent
Current State: Closed
Released In: 1.1.3
Target Release: patch
Applies To: Engine
Component: Configure
Reported By: GeorgeClark
Waiting For:
Last Change By: KennethLavrsen
If Foswiki is installed with an alternate directory structure, the web extension installer mis-locates the Foswiki root

    ..  cgi-bin
    ..  htdocs
         .. data
         .. lib
         .. pub

The shell installer when run from "htdocs' works correctly. however the web-based installer executed under the control of cgi-bin/configure and creates a new bin and lib directory beneath /var/www

The issue appears to be that root is assumed to be one level up from the script directory. This is set in lib/Foswiki/Configure/

-- GeorgeClark - 24 Nov 2010

In order to fix this I need a stable definition of $Foswiki::foswikiLibPath. The global is inconsistent. Adding package Foswiki; to setlib.cfg to get a consistent global declaration, and changing references to consistently use $Foswiki::foswikiLibPath

Also fixing a small issue with Util::mapTarget. Matching on /bin scripts missed scripts named with multi-word names, such as foswiki.fcgi

-- GeorgeClark - 24 Nov 2010

Even with fixing lib to map to $Foswiki::foswikiLibPath, any other unknown directories distributed by an extension will be placed into a directory one level up from the "bin" directory. This is incorrect on many installations.

After some IRC discussion, the Foswiki root (for installing extensions) should be one-level-up from {dataDir} or {toolsDir}. {pubDir} is possibly located in a webroot, $Foswiki::foswikiLibDir might be relocated into perl, and bin might be in cgi-bin above the webroot.

-- GeorgeClark - 25 Nov 2010
Topic revision: r13 - 16 Apr 2011, KennethLavrsen - This page was cached on 18 Sep 2018 - 14:30.

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