From b1efd4e749e7480cbf08a2a53c55545fee5aa7cb Mon Sep 17 00:00:00 2001 From: Rich Whitcroft Date: Sat, 23 Jul 2016 00:26:18 -0400 Subject: [PATCH] fix VAR=VAL loading from config --- lib/rex/parser/ini.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/rex/parser/ini.rb b/lib/rex/parser/ini.rb index 8dffe5ac1b..8d7f8f1bc4 100644 --- a/lib/rex/parser/ini.rb +++ b/lib/rex/parser/ini.rb @@ -165,7 +165,12 @@ protected # Is it a VAR=VAL? elsif (md = line.match(/^(.+?)=(.*)$/)) if (active_group) - self[active_group][md[1]] = md[2] + var, val = md[1], md[2] + + # don't clobber datastore nils with "" + unless val.empty? + self[active_group][var] = val + end end end }