Closed chinlung-chang closed 5 years ago
Hello @chinlung-chang,
good catch!
The problem occurs when comparing versions with only one digit after the decimal point. Thus, 1.15 would be compared with 1.30 while it's actually 1.03 if you take a look at both in float.
This didn't show back in the days when most of the tests where done on one decimal version numbers but over time it became more apparent as modules went over x.10.
My solution was to rename modules versions with a 0 on decimal when needed such as 1.3 becoming 1.03 and then comparing that with the CVE number.
I will commit a fix to master.
Thanks!
I installed a drupal7 and module ctools 7.x-1.15. But phpcs gave me following message:
FILE: ...sites/bl/modules/contrib/ctools/ctools_ajax_sample/ctools_ajax_sample.info
FOUND 1 ERROR AFFECTING 1 LINE
1 | ERROR | Module ctools 7.x-1.15 contains security issue and must be updated | | to at least 7.x-1.3. Details: SA-CONTRIB-2013-041 | | CVE-2013-1925 | | (PHPCS_SecurityAudit.Drupal7.AdvisoriesContrib.D7ErrAdvisoriesContribFoundMinor)
The ctools 7.x-1.15 is later relase than 7.x-1.3. The code contains logic error.