Event silently fails if description is longer than 1000 characters

Summary:

If an event description is over 1000 characters, it appears blank, or the previous event description shows.

This is caused by a hard limit in the discourse_post_event_events table : description character varying(1000)

Repro #1

  • Create an event
  • Have the event description (the text between [event] and [/event]) be over 1000 characters
  • The event description will not appear in the rendered post

Repro #2

  • Create an event
  • Have the event description (the text between [event] and [/event]) be under 1000 characters
  • Edit the event
  • Have the event description (the text between [event] and [/event]) be over 1000 characters
  • The previous event description will show in the rendered post

This also allows for search poisoning.

Related

The same seems to apply to the url and location fields

Expected

One of:

a) the event description should be unlimited
b) a clear warning is shown when the event description is too long
c) the event description is cut off while rendered (while the full text is still retained in the markdown)

2 Likes