• 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
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

!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]
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic