(Fixes issue 498) added exact version detection for all FF browser plugins. For other browser see issue comments in the tracker.
git-svn-id: https://beef.googlecode.com/svn/trunk@1273 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
@@ -91,8 +91,9 @@ module Filters
|
||||
# verify the browser_plugins string is valid
|
||||
def self.is_valid_browser_plugins?(str)
|
||||
# this string can be empty if there are no browser plugins
|
||||
#print_debug(str)
|
||||
return true if not is_non_empty_string?(str)
|
||||
return false if str.length > 400
|
||||
return false if str.length > 1000
|
||||
if RUBY_VERSION >= "1.9" && str.encoding === Encoding.find('UTF-8')
|
||||
return (str =~ /[^\w\d\s()-.,;_!\302\256]/u).nil?
|
||||
else
|
||||
|
||||
@@ -424,8 +424,13 @@ beef.browser = {
|
||||
for (var i=0; i < length; i++)
|
||||
{
|
||||
if (i != 0)
|
||||
results += ', ';
|
||||
results += navigator.plugins[i].name;
|
||||
results += '\n';
|
||||
if(beef.browser.isFF()){ //FF returns exact plugin versions
|
||||
results += navigator.plugins[i].name + '-v.' + navigator.plugins[i].version;
|
||||
}else{ // Webkit and Presto (Opera) doesn't support the version attribute, and
|
||||
// sometimes they store plugin version in description (Real, Adobe)
|
||||
results += navigator.plugins[i].name;// + '-desc.' + navigator.plugins[i].description;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
results = 'navigator.plugins is not supported in this browser!';
|
||||
|
||||
Reference in New Issue
Block a user