From 8d25dc00bc45e99327f8c751ea8d8e9acc045ab6 Mon Sep 17 00:00:00 2001 From: James Lee Date: Wed, 9 Dec 2009 23:07:58 +0000 Subject: [PATCH] bail if MinimumRank is invalid git-svn-id: file:///home/svn/framework3/trunk@7787 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/ui/console/command_dispatcher/db.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/msf/ui/console/command_dispatcher/db.rb b/lib/msf/ui/console/command_dispatcher/db.rb index 615803d8a8..637a6fe463 100644 --- a/lib/msf/ui/console/command_dispatcher/db.rb +++ b/lib/msf/ui/console/command_dispatcher/db.rb @@ -338,10 +338,10 @@ class Db end minrank = framework.datastore['MinimumRank'] || nil - if minrank and not RankingName.values.include?(minrank) - print_error("MinimumRank invalid, ignoring") + if not minrank or not RankingName.values.include?(minrank) + print_error("MinimumRank invalid! Possible values are (#{RankingName.sort.map{|r|r[1]}.join("|")})") wlog("MinimumRank invalid, ignoring", 'core', LEV_0) - minrank = nil + return else minrank = RankingName.invert[minrank] end