Fork me on GitHub
Subscribe 2

Ticket #257 (fixed bug)

Censoring messes up the subject/message validation

  • Created: 2011-01-26 11:25:37
  • Reported by: Reines
  • Assigned to: Franz
  • Milestone: 1.4.5
  • Component: code
  • Priority: normal

Censoring is always done when displaying data, not when inserting that data. This means it is possible for the censor to cause a post to become (visibly) blank, or have a too short subject, or alter it in some other way which would cause it to fail the initial checks when posting.

We should consider censoring a copy of the message at post time, and doing our validations on that instead of the original.


Franz 2011-02-03 16:29:35

  • Owner set to Franz.

Franz 2011-02-09 09:30:57

What about the error messages?
It would be unexpected behaviour if I created a post consisting of one word only that is being censored and then be told that my message is empty, at least if it isn't clear what happened.

But then, this should rarely happen.
What we could do is an extra check only on the censored message and then add a special error message for the case that the censored message is empty, while the original message isn't.

Franz 2011-02-09 10:06:30

Commit 7562628 to fluxbb master

#257 and #266: Apply censoring before validating new posts and topics. Also censor messages in subscription mails.

Franz 2011-02-09 10:09:28

  • Status changed from open to fixed.

Fixed that in 7562627.

Some quick testing would be appreciated. (I did test, too, but maybe I forgot something.)

Reines 2011-02-09 10:12:58

  • Status changed from fixed to open.

Havent tested, but a quick look over looks sensible.

Also needs applied in edit.php though.

Franz 2011-02-09 12:55:15

Commit 971f14e to fluxbb master

#257: Apply my last commit to edit.php, too.

Franz 2011-02-09 12:56:22

  • Status changed from open to fixed.

Fixed now.

Are the language strings okay?