Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.0
-
Fix Version/s: 1.8.4
-
Component/s: Zend_Captcha
-
Labels:None
Description
Zend_Captcha_Image should check if a file with the generated unique name already exists.
On systems where there is a high load it could happen that a unique id gets generated twice. I know this is very unlikely but it could happen.
After generation of the id there should be an check if a file with that name already exists and if yes a new id should be generated.
I have created a fix that i will append to this issue. If the unique id generation fails three times an exception will be thrown.
Added logic to the generate method to check if a filename with the generated it exists, if yes a new id will be generated.
If the generation fails three times an exception will be thrown.