Skip to content

Commit b797e96

Browse files
committed
Remove nil check because blank? handles it
The check used to be session_name.strip.empty?, but I forgot to remove the nil case when I converted to blank?.
1 parent 5b77854 commit b797e96

File tree

1 file changed

+1
-1
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+1
-1
lines changed

lib/msf/ui/console/command_dispatcher/core.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1477,7 +1477,7 @@ def cmd_sessions(*args)
14771477
print(Serializer::ReadableText.dump_sessions(framework, :show_extended => show_extended, :verbose => verbose, :search_term => search_term))
14781478
print_line
14791479
when 'name'
1480-
if session_name.nil? || session_name.blank?
1480+
if session_name.blank?
14811481
print_error('Please specify a valid session name')
14821482
return false
14831483
end

0 commit comments

Comments
 (0)