Closed auge8472 closed 1 year ago
@loesler
vihuna stated this to be successfully tested in a comment in issue #658 but with protecting the base branch of the repository here in Github, a review is mandatory.
... with protecting the base branch of the repository here in Github, a review is mandatory.
Just a general remark: I can understand this option but I already have little time to help so I do not want to use these small time frames for reviewing code.
I can understand this option but I already have little time to help so I do not want to use these small time frames for reviewing code.
I can fully understand you. I will check, if I can change the configuration in a apprpriate manner.
As reported in the project forum and documented in issue #658 it is possible, that the function
imagerotate
does not work with the rotation angle of exactly 180° in very rare cases. Leaving aside the fact that the concept of captchas is absolutely out of date and thinking about the current solution inmodules/captcha/captcha.php
it is …Thatswhy I replaced the rotation (with
imagerotate
) with a mirroring with the functionimageflip
, which provides three modes (horizontal, vertical and both at once) to generate the resulting image. The new solution decides if to rotate or not with a random number in the range from 0 to 5 and the criterion of the number being even or odd. The mode of the mirroring is set with a further random number in the range from 0 to 2, that selects the mode to use from an array. See therefor 972e6da9dbf4a3e3cb49fc2844bd311909a9f0ba.Furthermore I reformatted the files
modules/captcha/captcha.php
andmodules/captcha/captcha_image.php
. See therefor de7923c31cbd5774567516573b6feb3cb9d336d3 and 1e9d98c5d6c54e8c4752178b010216c8bca1160f