Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

!null checks for post text

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

After recent spammer-bot visit to my site, I found that there is a way to insert posts with empty text. This makes jforum_posts_text.post_text field to be "null" and crashes presentation of topics with such posts.
There goes an exception when trying to operate with null String at
PostCommon line 90: p.getText().replaceAll(...).

I suppose it is better to deny all empty-text messages in PostAction.insertSave() method but !null check in presentation could also be worth doing.

Regards,
Gleb
[originally posted on jforum.net by gst]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok.. I registered it as a bug at http://www.jforum.net/jira/browse/JF-255

Rafael
[originally posted on jforum.net by Rafael Steil]
reply
    Bookmark Topic Watch Topic
  • New Topic