Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-13522

Q&A Captcha ACP, admins can add blank answers

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.12, 3.1.2
    • Fix Version/s: 3.1.4-RC1
    • Component/s: ACP
    • Labels:
      None

      Description

      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().

      (I did the same for my custom captcha)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Marc Marc
            Reporter:
            Derky Derky
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development