A server error occurs when the “title max word length” is set to a large value (2000000000) and a topic is attempted to be created. RGJ encountered this issue and discovered that it was introduced in a recent commit.
mentalstring suggested capping the “title max word length” at 255, similar to the “max topic title length”. A related issue was found where setting the “title max word length” to 0 makes it impossible to create a topic.
A pull request was submitted by mentalstring to limit the “title max word length” to [1, 255]. RGJ suggested migrating the value 0 to 255 instead of 1, but later retracted this suggestion due to the unlikelihood of forums having this setting inadvertently set to 0.
I was thinking that one could remove the max word length limit on the title by setting it to 0 (instead of using a very high value), but that actually revealed a separate bug: it currently accepts 0 but that doesn’t disable the check, instead, it becomes impossible to create a topic since no title is valid:
It’s off course possible to revert the commit that surfaced this, but regardless of that, it seems that title max word length needs some validation (e.g. [1, 255])?
Since people might have been setting this to 0 in an attempt to disable the check, it might be better to migrate the value 0 to 255 instead of 1, what do you think?
I don’t oppose it… although I doubt there is any forum with this inadvertently set to 0 as no topics can be created at that point, so it would likely have been reverted already.