-
Bug
-
Resolution: Fixed
-
Minor
-
3.0.12, 3.1.2
-
None
When an admin leaves a blank line between two answers, a blank "answer" is added. (And accepted as answer for solving this captcha, which means you can leave the entire Q&A captcha field empty)
While this is quite obvious behaviour (you also see the blank line when editing the question), I think it should not be possible to add blank answers in the first place.
This is the line where the answers are converted to an array: https://github.com/phpbb/phpbb/blob/develop/phpBB/phpbb/captcha/plugins/qa.php#L834
I suggest after calling explode() to first call the function array_map('trim') and then array_filter().