Quote:
Originally Posted by Freesteyelz
Suggestion:
With the "onkeyup" the character limit can be bypassed if the user does not lift the key when submitting the message (try holding the key down while submitting).
In addition to "onkeyup" in the textarea add "onkeypress" like below:
Code:
onkeypress="Ccb_LimitChars('ccb_entermessage', 'cybcb_counter','$vboptions[cybchatbox_charlimit]');"
It basically is a duplicate of the "onkeyup" but using "onkeypress".
Now when users try to bypass the character limit it'll allow just one more character and you can't type anymore.
For pasting:
Users can still bypass the character limit if they paste. You can set it where users can paste but disallow additional/repeated pasted messages by:
Code:
onpaste="Ccb_LimitChars('ccb_entermessage', 'cybcb_counter','$vboptions[cybchatbox_charlimit]');"
Still, if the text is extremely long users will still be able to bypass the character limit. So to prevent pasting all together you can add into textarea:
Code:
onpaste="return false;"
That was my workaround. If there's a better solution please post it in this thread. 
|
I just tested all those exploits and nothing happened. I've known about the pasting thing, but it never flooded the chatbox, it just allowed you to paste messages...