Fixes #1317
This commit is contained in:
@@ -17,20 +17,20 @@ module WPScan
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
res.xml.xpath('//item/dc:creator').each do |node|
|
res.xml.xpath('//item/dc:creator').each do |node|
|
||||||
potential_username = node.text.to_s
|
username = node.text.to_s
|
||||||
|
|
||||||
# Ignoring potential username longer than 60 characters and containing accents
|
# Ignoring potential username longer than 60 characters and containing accents
|
||||||
# as they are considered invalid. See https://github.com/wpscanteam/wpscan/issues/1215
|
# as they are considered invalid. See https://github.com/wpscanteam/wpscan/issues/1215
|
||||||
next if potential_username.length > 60 || potential_username =~ /[^\x00-\x7F]/
|
next if username.strip.empty? || username.length > 60 || username =~ /[^\x00-\x7F]/
|
||||||
|
|
||||||
potential_usernames << potential_username
|
potential_usernames << username
|
||||||
end
|
end
|
||||||
rescue Nokogiri::XML::XPath::SyntaxError
|
rescue Nokogiri::XML::XPath::SyntaxError
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|
||||||
potential_usernames.uniq.each do |potential_username|
|
potential_usernames.uniq.each do |username|
|
||||||
found << CMSScanner::User.new(potential_username, found_by: found_by, confidence: 50)
|
found << CMSScanner::User.new(username, found_by: found_by, confidence: 50)
|
||||||
end
|
end
|
||||||
|
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -59,5 +59,23 @@
|
|||||||
<dc:creator><dc:creator><![CDATA[Michael Schrage. <p>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.</p>
|
<dc:creator><dc:creator><![CDATA[Michael Schrage. <p>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.</p>
|
||||||
]]></dc:creator></dc:creator>
|
]]></dc:creator></dc:creator>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<title>Hello world!</title>
|
||||||
|
<link>http://ex.lo/2018/09/23/hello-world/</link>
|
||||||
|
<comments>http://ex.lo/2018/09/23/hello-world/#comments</comments>
|
||||||
|
<pubDate>Sun, 23 Sep 2018 11:31:56 +0000</pubDate>
|
||||||
|
<!-- Should be ignored as empty username -->
|
||||||
|
<dc:creator><![CDATA[]]></dc:creator>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<title>Hello world!</title>
|
||||||
|
<link>http://ex.lo/2018/09/23/hello-world/</link>
|
||||||
|
<comments>http://ex.lo/2018/09/23/hello-world/#comments</comments>
|
||||||
|
<pubDate>Sun, 23 Sep 2018 11:31:56 +0000</pubDate>
|
||||||
|
<!-- Should be ignored as empty username -->
|
||||||
|
<dc:creator><![CDATA[ ]]></dc:creator>
|
||||||
|
</item>
|
||||||
</channel>
|
</channel>
|
||||||
</rss>
|
</rss>
|
||||||
|
|||||||
Reference in New Issue
Block a user