Commit e5509460 authored by Xavier Guimard's avatar Xavier Guimard

Be tolerant with whitespaces in ini file (Fixes: #1488)

parent 6e8efac7
......@@ -358,6 +358,9 @@ sub getLocalConf {
# Load section parameters
foreach ( $cfg->Parameters($section) ) {
$r->{$_} = $cfg->val( $section, $_ );
# Remove spaces before and after value (#1488)
$r->{$_} =~ s/^\s*(.+?)\s*/$1/;
if ( $r->{$_} =~ /^[{\[].*[}\]]$/ || $r->{$_} =~ /^sub\s*{.*}$/ ) {
eval "\$r->{$_} = $r->{$_}";
if ($@) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment