MIDAS Knowledge Base MIDAS Knowledge Base

How to disable "Taint" mode in Perl

"Taint" mode is a special mode in which Perl (the coding language that MIDAS is written in) can be instructed to run in.

"Taint" mode is known to cause issues with MIDAS, and therefore should be disabled in order for MIDAS to function correctly.

There are a couple of ways to disable "Taint" mode, and depending upon your server configuration you may need to follow one or both of the steps below:

Don't add any "switches" when specifying a "Path To Perl" during MIDAS install

When installing a self-hosted edition of MIDAS, you're prompted to specify the "Path to Perl" (which MIDAS may also auto-detect). This setting instructs MIDAS as to the location where Perl resides on your server.

Do not include any additional command line "switches", such as "-T", when entering the Path to Perl.

If you do, you may be unable to install MIDAS, and so you'll need to run the installer again without adding any command line switches in the "Path to Perl" field.

Remove any "switches" from perl.exe on Windows

If you've installed Apache on Windows as per our guide, and also set the "ScriptInterpreterSource Registry" directive, then Apache will determine the location of where Perl is installed on your system from the Windows registry. This saves you having to manually modify "shebang" lines in .pl files themselves.

The location in the Windows registry where Apache determines the location of Perl from is HKEY_CLASSES_ROOT\.pl\Shell\ExecCGI\Command.

Open the Registry editor (Press the Windows key and type "regedit"), and navigate to HKEY_CLASSES_ROOT\.pl\Shell\ExecCGI\Command.

Double click this entry and check that it's value ends in "perl.exe", with no additional switches i.e. "perl.exe -wT". If additional switches are present after perl.exe, remove then, and click OK:

Disable Perl's Taint Mode on Windows

You might also be interested in...


MIDAS » KB » Support » Article 00233

← Return to the Knowledge Base