Skip to content

Commit 83a179f

Browse files
committed
[Fix RM 8224] - undefined method `include?' for nil:NilClass
Bug due to registry_enumkeys returning nil.
1 parent 0ef4b4c commit 83a179f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/post/windows/gather/enum_shares.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def enum_recent_mounts(base_key)
5656
recent_mounts = []
5757
partial_path = base_key + "\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"
5858
full_path = "#{partial_path}\\Map Network Drive MRU"
59-
explorer_keys = registry_enumkeys(partial_path)
59+
explorer_keys = registry_enumkeys(partial_path) || ''
6060
if explorer_keys.include?("Map Network Drive MRU")
6161
vals_found = registry_enumvals(full_path)
6262
if vals_found

0 commit comments

Comments
 (0)