Skip to content

Commit 08de13f

Browse files
committed
Converting the version string
The version string needs to be converted to a Rex::Version object in order for the two values to be compared successfully.
1 parent 54a7ed1 commit 08de13f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/exploits/multi/http/magento_xxe_cve_2024_34102.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ def check
6767
# Magento/2.4 (Community)
6868
version, edition = res.body.scan(%r{Magento/([\d.]+) \(([^)]+)\)}).first
6969

70+
version = Rex::Version.new(version)
71+
7072
return CheckCode::Safe("Detected Magento #{edition} edition version #{version} which is not vulnerable") unless
7173
version <= (Rex::Version.new('2.4.7')) ||
7274
version <= (Rex::Version.new('2.4.6-p5')) ||

0 commit comments

Comments
 (0)