flarum / flarum/issue-archive

Posting accepts blank content (space)

Open
#247 20 comments 0 reactions 0 assignees View on GitHub
good first issue type/bug
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Bug Report

**Current Behavior**
Typing nothing but spaces in the discussion composer is accepted as proper content by Flarum.

**Steps to Reproduce**
1. Click on the start discussion button
2. Name it whatever
3. Type nothing but a space in post content
4. Submit
5. See error

**Expected Behavior**
I expected the composer to throw an error letting me know that such content is not accepted.

**Screenshots**
No screenshots, but you can see it here: https://discuss.flarum.org/d/19485-blank-content

**Environment**
- Flarum discuss
- Chrome OS 72.0.3626.122

**Possible Solution**
Check the post content and make sure it isn't nothing but spaces (or something like that).

Contributor guide

Open the contributing guide

Research direction

Start by tracing the discussion composer submission and post-content validation paths described in the report. Reproduce the single-space submission, then verify that whitespace-only content is rejected with a validation error and that normal post content remains accepted.

Written by the indexing model from the issue text.

Assessment

Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.