-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Cron captcha_delete_expired_images not working after Magento 2.4.8 update. #40192
Copy link
Copy link
Closed
Labels
Area: AccountComponent: CronIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.May be fixed according to the position in the backlog.Reported on 2.4.8-p1Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Metadata
Metadata
Assignees
Labels
Area: AccountComponent: CronIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.May be fixed according to the position in the backlog.Reported on 2.4.8-p1Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Preconditions and environment
Steps to reproduce
Captcha files are not deleted anymore after update to Magento 2.4.8-p1 causing folder
/media/captcha/baseto grow over time.(It IS still reproducible on
2.4-develop)This commit runed it:
ab0fb9d
Issue is here:
Magento\Captcha\Cron\DeleteExpiredImages::_deleteExpiredImagesForWebsite
this is never gonna be true, because of condition:
$this->_fileInfo->getPathInfo($filePath, PATHINFO_EXTENSION) == 'png'method
getPathInfoalways returns array, so comparsion to string "png" will always result infalse.@see Magento\Framework\Filesystem\Io\File::getPathInfoTo fix it we should add another optional param to getPathInfo or change condition:
to:
or bring back as it used to be before commit mentioned above (ab0fb9d):
Expected result
Captcha files are deleted by CRON
captcha_delete_expired_imagesActual result
Captcha files are not deleted by
captcha_delete_expired_imagesCRONAdditional information
No response
Release note
No response
Triage and priority