[TYPO3] Bug in Typo3 Extension comments from Dmitry Dulepov?

A Vista Studios info at a-vista-studios.de
Fri Jul 25 11:26:38 CEST 2008


I have experienced a problem to which I have not found any postings as yet:
"Comment listing" and "Comment form" are inserted into the same page and the Extension "captcha" is used to protect the form from SPAM (the problem I will describe below is the very same with sr_freecap).

No matter if the correct captcha-code is inserted there is always the message it would be wrong.
I have added some "echo" commands to \typo3\typo3conf\ext\comments\pi1\class.tx_comments_pi1.php and figured why:
The function processSubmission_validate() is called twice: Likely one time from "Comment listing", the other time from "Comment form". At the first call the two variables are identical: 
   $captchaStr = $_SESSION['tx_captcha_string'];
and
   $this->piVars['captcha']
so everything is fine (and the message is sucessfully sent if the required fields are filled out!). 
For security reasons, however, the session-variable is set emtpy afterwards:
   $_SESSION['tx_captcha_string'] = '';

So when the function is called the second time and then (again) checking
   if (!$captchaStr || $this->piVars['captcha'] !== $captchaStr)
will return 0 and at the FE the user will see the error-message from $this->pi_getLL('error.wrong.captcha').

Well one could just write a workaround and hardcode class.tx_comments_pi1.php but maybe other users experience the same problem and may be happy if there is an updated version in the TER.

Another thing that is not working for me: "Send notification to this e-mail:" isn't working. The editor is not informed about incomming comments althought the mail-address is correct. Any suggestions to fix this problem?

Thanks
Stefan


More information about the TYPO3-english mailing list