min_post_length zero makes PM's crash

(Michael - DiscourseHosting.com) #1

We had a client with a forum where no more private messages could be sent. Any attempt would result in a 500 Server Error.

This turned out to be caused by the fact that min_post_length was set to 0, resulting in a division by zero in lib/text_sentinel.rb

Offending code on line 18

scale_entropy = SiteSetting.min_private_message_post_length.to_f / SiteSetting.min_post_length.to_f

(Jens Maier) #2

Duplicate of this bug report:

(Michael - DiscourseHosting.com) #3

Weird, did a good search (or at least, I tried to :slight_smile: ) for duplicate before posting.

(Jeff Atwood) #4