[TYPO3-project-formidable] Captcha renderlet
Ivan Gomez Rodriguez
igomez at igalia.com
Fri Jun 1 13:49:07 CEST 2007
Hello again:
Thanks you, Luc, renderlet is working.
But now, i'm trying with the captcha validator and something isn't
working fine, validator shows always the error message.
That's my xml's piece :
<renderlet:CAPTCHA name="captcha">
<!--custom>class="texte"</custom-->
<label>Un label a la noix de présentation</label>
<copylabel>Copie le code</copylabel>
<errormessage>Errruuuuueerrrr</errormessage>
....
BLA, BLA,BLA
....
<validators>
<validator:CAPTCHA name="captcha" message="AAAAA"/>
</validators>
That's rigth?
I was looking in the code and i suspect that problem could be here.
There aren't keys prefixed by 'sr_freecap' in $_SESSION array, when
following function is called.
tx_srfreecap_pi2 :
function checkWord($word) {
session_start();
if (!empty($_SESSION[$this->extKey . '_word_hash']) &&
!empty($word)) {
// all freeCap words are lowercase.
// font #4 looks uppercase, but trust me, it's not...
if ($_SESSION[$this->extKey . '_hash_func'] == 'md5') {
if (md5(strtolower($word)) == $_SESSION[$this->extKey .
'_word_hash']) {
// reset freeCap session vars
// cannot stress enough how important it is to do this
// defeats re-use of known image with spoofed session id
$_SESSION[$this->extKey . '_attempts'] = 0;
$_SESSION[$this->extKey . '_word_hash'] = false;
return true;
}
}
}
return false;
}
Does somebody know why it doesn't work?.
Luc Muller wrote:
> You can use it like this : <renderlet:CAPTCHA />
> this would result in a default mode.
>
> Or using something more complex like :
>
> <renderlet:CAPTCHA name="captcha">
> <custom>class="texte"</custom>
> <label>Un label a la noix de présentation</label>
> <copylabel>Copie le code</copylabel>
> <errormessage>Errruuuuueerrrr</errormessage>
> <reloadpic>EXT:ameos_t3con06/res/img/reload.png</reloadpic>
> <width>100</width>
> <height>30</height>
> <frame>false</frame>
> <bgcolor>255,255,255</bgcolor>
> <transparent_background>false</transparent_background>
> <font>
> <fontcolor>
> <random>true</random>
> <level>darker</level>
> </fontcolor>
> <family>Alanden_,luggerbu.ttf</family>
> <size>12</size>
> </font>
> <authchar>AZ</authchar>
> <crypteasy>
> <con>ZH</con>
> <vow>AU</vow>
> </crypteasy>
> <difuplow>false</difuplow>
> <nbchar>5</nbchar>
> <charspace>20</charspace>
> <charangle>10</charangle>
> <charup>true</charup>
> <noise>
> <pixel>200</pixel>
> <line>3</line>
> <noisecolor>charcolor</noisecolor>
> </noise>
> <imgtype>png</imgtype>
> <cryptsecure>md5</cryptsecure>
> <timer>
> <time>0</time>
> <action>image</action>
> </timer>
> <maxattempt>1000000000000</maxattempt>
> </renderlet:CAPTCHA>
>
> This is the most complex way to use the CAPTCHA but you can only use config
> that you need.
> if everything is correct, all config you didn't specified, will be set by
> default.
>
> Hope this helps.
>
> Luc =:0)
> "Ivan Gomez Rodriguez" <igomez at igalia.com> a écrit dans le message de news:
> mailman.290101.1180688368.21067.typo3-project-formidable at lists.netfielders.de...
>
>> Hello,
>>
>> I'm trying to use captcha renderlet and validator in order to use in a
>> registration form, but i have no idea about configuring it.
>>
>> Knows somebody where i can find examples or doc about this element?.
>>
>> Thanks in advance.
>>
>> --
>>
>> Iván Gómez Rodríguez
>> Ingeniero en Informática
>> mailto:igomez at igalia.com
>> Telf: +34 986 10 76 10
>> Fax: +34 981 91 39 49
>> Igalia http://www.igalia.com
>>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable
More information about the TYPO3-project-formidable
mailing list