diff --git a/app/finders/users/rss_generator.rb b/app/finders/users/rss_generator.rb index 20d9add3..dc936ddc 100644 --- a/app/finders/users/rss_generator.rb +++ b/app/finders/users/rss_generator.rb @@ -17,7 +17,13 @@ module WPScan begin res.xml.xpath('//item/dc:creator').each do |node| - potential_usernames << node.text.to_s unless node.text.to_s.length > 40 + potential_username = node.text.to_s + + # Ignoring potential username longer than 60 characters and containing accents + # as they are considered invalid. See https://github.com/wpscanteam/wpscan/issues/1215 + next if potential_username.length > 60 || potential_username =~ /[^\x00-\x7F]/ + + potential_usernames << potential_username end rescue Nokogiri::XML::XPath::SyntaxError next diff --git a/spec/app/finders/users/rss_generator_spec.rb b/spec/app/finders/users/rss_generator_spec.rb index 6a650c42..15690c90 100644 --- a/spec/app/finders/users/rss_generator_spec.rb +++ b/spec/app/finders/users/rss_generator_spec.rb @@ -32,7 +32,7 @@ describe WPScan::Finders::Users::RSSGenerator do found_by: 'Rss Generator (Aggressive Detection)' ), CMSScanner::User.new( - 'Aa Días-Gildés', + 'Aa Dias-Gildes', confidence: 50, found_by: 'Rss Generator (Aggressive Detection)' ) @@ -53,7 +53,7 @@ describe WPScan::Finders::Users::RSSGenerator do found_by: 'Rss Generator (Passive Detection)' ), CMSScanner::User.new( - 'Aa Días-Gildés', + 'Aa Dias-Gildes', confidence: 50, found_by: 'Rss Generator (Passive Detection)' ) @@ -71,7 +71,7 @@ describe WPScan::Finders::Users::RSSGenerator do found_by: 'Rss Generator (Aggressive Detection)' ), CMSScanner::User.new( - 'Aa Días-Gildés', + 'Aa Dias-Gildes', confidence: 50, found_by: 'Rss Generator (Aggressive Detection)' ) @@ -90,7 +90,7 @@ describe WPScan::Finders::Users::RSSGenerator do found_by: 'Rss Generator (Aggressive Detection)' ), CMSScanner::User.new( - 'Aa Días-Gildés', + 'Aa Dias-Gildes', confidence: 50, found_by: 'Rss Generator (Aggressive Detection)' ) diff --git a/spec/fixtures/finders/users/rss_generator/feed.xml b/spec/fixtures/finders/users/rss_generator/feed.xml index 860980a9..a9ab6453 100644 --- a/spec/fixtures/finders/users/rss_generator/feed.xml +++ b/spec/fixtures/finders/users/rss_generator/feed.xml @@ -38,6 +38,15 @@ http://ex.lo/2018/09/23/hello-world/ http://ex.lo/2018/09/23/hello-world/#comments Sun, 23 Sep 2018 11:31:56 +0000 + + + + + Hello world! + http://ex.lo/2018/09/23/hello-world/ + http://ex.lo/2018/09/23/hello-world/#comments + Sun, 23 Sep 2018 11:31:56 +0000 + @@ -46,6 +55,7 @@ http://ex.lo/2018/09/23/hello-world/ http://ex.lo/2018/09/23/hello-world/#comments Sun, 23 Sep 2018 11:31:56 +0000 + Michael Schrage is a researcher at the MIT Sloan School of Management Initiative on the Digital Economy, where he does research and advisory work on how digital media transforms agency, human capital, and innovation.

]]>