CCaptcha imageOptions['alt']

Plz, help understand which way should I set alt attribute of the captcha image.

It seems should be like this:




$this->widget('CCaptcha', array('showRefreshButton'=>false, 'imageOptions'=>array('alt'=>'code')));



but this way I can’t set alt attribute till changing 98-th line of CCaptcha.php

from




$alt=isset($imageOptions['alt'])?$imageOptions['alt']:'';                



to




$alt=isset($this->imageOptions['alt'])?$this->imageOptions['alt']:'';



thanks

Nice catch! You may want to file an issue.

Wrote a ticket.

I’m not a captcha expert.

But, setting alt attribute isn’t the same disabling captcha feature?

The robot just see the html code, search the alt attribute and woiolah! Massive assignment attack!

:blink: