From dbfa8bafd02c98499d5d763a5283a281eae098e2 Mon Sep 17 00:00:00 2001 From: "scotty.b.brown" Date: Fri, 3 Dec 2010 10:59:52 +0000 Subject: [PATCH] Updating filters (and associated tests) to allow #40 to work on *nix hosts with extra chars in the plugins string git-svn-id: https://beef.googlecode.com/svn/trunk@591 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9 --- lib/filter/command.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/filter/command.rb b/lib/filter/command.rb index 024d8a8e1..34027bc61 100644 --- a/lib/filter/command.rb +++ b/lib/filter/command.rb @@ -32,7 +32,6 @@ module BeEF # check if valid command module datastore value def self.is_valid_commmamd_module_datastore_param?(str) - return false if not BeEF::Filter.is_non_empty_string?(str) return false if BeEF::Filter.has_null?(str) return false if BeEF::Filter.has_non_printable_char?(str) true @@ -41,7 +40,7 @@ module BeEF # check for word and some punc chars def self.has_valid_key_chars?(str) return false if not BeEF::Filter.is_non_empty_string?(str) - (str =~ /[^\w_-]/).nil? + (str =~ /[^\w\d\s()-.,;_\302\256]/).nil? end # check for word and underscore chars