Topic: PunBB truncates messages

Hi!

PunBB sometimes truncates messages in our installation. This behavior is unpredictable. Some users say that messages are truncated when they use quotas, but we were not able to reproduce this intentionally.

System information:
PunBB - v1.3.4
Admin add user - v1.1.1.
Antispam System - v1.3.4.
Attachment - v1.0.2.
BBCode buttons - v1.3.6.
Events registration - v0.8.2.
JS post quote - v2.2.
Logging of events - v1.0.
Private Messaging - v1.2.9.
Pun poll - v1.1.10.
PunBB Repository - v1.2.2.
Stop spam from bots - v0.2.

Can somebody help please?

Thank you

Re: PunBB truncates messages

thanks for report,

http://punbb.informer.com/trac/ticket/360


Can you provide information about your environment;

  • database

  • server operating system

  • language of installation

  • if possible text/code of posts causing trouble

Re: PunBB truncates messages

Admin add user
Version v1.1.1.

Antispam System
Version v1.3.4.

Attachment
Version v1.0.2.

BBCode buttons
Version v1.3.6.

Events registration
Version v0.8.2.

JS post quote
Version v2.2.

Logging of events
Version v1.0.

Private Messaging
Version v1.2.9.

Pun poll
Version v1.1.10.

PunBB Repository
Version v1.2.2.

Stop spam from bots
Version v0.2.

Language: English
PHP: 5.2.14
MySQL: 5.1.48
OS: CentOS

--------

Do you have any suggestions on how to diagnose this?

Re: PunBB truncates messages

Well, today a pun_approval bug was found by using a member, a guest and an administrator account to submit a post and find that guests cause problems when answering a admin-started topic...

So if you can try and replicate which user, guest accounts, where it happened (maybe always in posts with a poll... etc) it will narrow down a possible problem with an extension you're using. It's highly unlikely to be in the core. I see you're both using logging of events, pun_poll and JS post quote which I'd suspect, as I use most of the others and never came across such a problem.

Re: PunBB truncates messages

I am having a similar issue. Is one of my extensions the problem?

PunBB 1.3.4
Debian 5.0
PHP: 5.2.6-1+lenny8
MySQL Standard 5.0.51a

Extentions:
Attachment Version v1.0.3.
BBCode buttons ( Extension disabled. )
Pretty buttons for easy BBCode formatting.
Private Messaging Version v1.2.9.
PunBB Repository Version v1.2.2.
Stop spam from bots Version v0.2.

Thanks.

Re: PunBB truncates messages

Can you use this BBcode buttons
http://punbb.informer.com/wiki/_media/p … _1.3.5.zip

and report the code you use that gives you truncated messages.

Thanks

Edit:
I'm starting to think it might be the pun_stop_bots ??

Re: PunBB truncates messages

Edit:
I'm starting to think it might be the pun_stop_bots ??

The stop bots was my thought too when you mentioned extensions earlier in the thread.  I have disabled it, I'll let you know what the results are.

Thanks for the quick response.

Re: PunBB truncates messages

It was stop bots! I disabled it, and the problem has completely stopped. This plugin was malfunctioning in other ways previously too: Not allow a person to continue, regardless if correct answer was entered or not.

Re: PunBB truncates messages

It is indeed pun_stop_bots, which is a shame because it's the only effective method to stop bots, since captcha recognition is passed like it was child's play nowadays and my forum gets tons of spam if I disable the smart questions of that extension but enable captcha.

So well, the problem lies in the fact that a hidden input is used for the message field, which is silly since a text message may as well include double quotes (", " html entity), which break the value="" definition to one character before the first double quote occurence (hence the message is truncated).
Easy but ugly workaround (it works, so who cares):

Open extensions/pun_stop_bots/views/question-page.php

Where it reads:

<input name="<?php echo $hidden_key; ?>" value="<?php echo $hidden_value; ?>" type="hidden">

insert instead:

<!--<input name="<?php echo $hidden_key; ?>" value="<?php echo $hidden_value; ?>" type="hidden">-->
<textarea name="<?php echo $hidden_key; ?>" style="display:none"><?php echo $hidden_value; ?></textarea>

then refresh hooks from administration/extensions, and you're good to go.

HOW TO TEST:

Before workaround, try to post as guest a message containing one or more double quotes, it will get truncated before the first double quote.

After workaround and refresh hooks of extension, insert the same message, no more truncation.