Skip to content

Commit b1efd4e

Browse files
author
Rich Whitcroft
committed
fix VAR=VAL loading from config
1 parent dbbe6a8 commit b1efd4e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/rex/parser/ini.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,12 @@ def read_groups_string(str) # :nodoc:
165165
# Is it a VAR=VAL?
166166
elsif (md = line.match(/^(.+?)=(.*)$/))
167167
if (active_group)
168-
self[active_group][md[1]] = md[2]
168+
var, val = md[1], md[2]
169+
170+
# don't clobber datastore nils with ""
171+
unless val.empty?
172+
self[active_group][var] = val
173+
end
169174
end
170175
end
171176
}

0 commit comments

Comments
 (0)