Bug #29252
closedRewriting localconf.php endlessly expands lines with values containing two subsequent slashes ("//")
0%
Description
When the file localconf.php gets rewritten, and an extension's configuration value contains two subsequent slashes ("//"), the part from after the slashes until rest of the line is placed at the end of the newly generated comment. This is repeated each time localconf.php is written, so the comment is extended again and again. The rewriting does not take into account that "//" can be part of a value, but thinks that everything after the first "//" is.
This is no error but more a cosmetic problem. The comment can also be cut by editing the localconf.php, but otherwise the file may bloat unnoticed over time.
As far as I have seen, the problem can be corrected in the file t3lib/class.t3lib_install.php, in the function setValueInLocalconfFile()
where it says $subparts = explode('//', $mainparts[1], 2);
The third parameter ("2") should be increased by the number of occurrences of "//" in the value (available in $value), and the subsequent uses of $subparts[1]
should be replaced by end($subparts)
. Alternatively, "backslashing" the "/"s could work.
Files