Warning: “path” was not defined in config_inc.php
After a new install of MantisBT I was met with the following warning on the Mantis login page:
Warning: “path” was not defined in config_inc.php. Leaving it empty is a security risk, as the path will be set based on headers from the HTTP request, exposing your system to Host Header Injection attacks.
Solution
Log into to your server, and update the config_inc.php
file. Add the following value:
$g_path= "https://your.domain.tld/mantis/";
Details
$ ssh user@yourdomain.tld
$ su
$ export TERM=xterm
$ nano /var/www/mantis/config/config_inc.php
--
$g_path= "https://yourdomain.tld/mantis";
--
Ref: