TWiki problems

apps

#1

Hello,
I’m having a problem with getting TWiki (TWikiRelease01Feb2003) to work on my account. After install and configuration I’m getting this error:
Insecure $ENV{PATH} while running with -T switch at /usr/share/perl/5.6.1/Cwd.pm line 17.

This is a taint problem, apparently with that release of Perl rather than with TWiki or my configuration.

Any suggestions?
Luther


#2

The module has startup code that checks if its on a Mac or not and gets PATH if it isn’t, and $ENV{PATH} is tainted when you use -T

I’m not if this will work, but you might try explicitly setting $ENV{PATH} to your own value in your code, perhaps in a BEGIN block. Otherwise you’d have to use your own copy of Cwd.pm that you have modified to untaint $ENV{PATH}, if there is no newer version of Cwd.pm that is taint-safe.


#3

Unfortunately the next version of Cwd.pm after this one is in Perl 5.8 and they made huge changes to it then. Since I’m certain this will cause mayhem if I just drop the latest Cwd.pm in, I’m going to do as you suggest and do a “custom” Cwd.pm. I’ll add:
local @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)};
after “sub _backtick_pwd {”.

Then I’ll figure out where to put the patched Cwd.pm to get TWiki to find it. Either that or I’ll choose a path of slightly lesser resistance and find another wiki to try out (or slightly older version of TWiki). :wink:


#4

It turns out not to be so hard to add local perl modules in TWiki. Just add this to TWiki.cfg:
$localPerlLibPath = “/my/local/perl/lib”