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

Q&A Captcha ACP, admins can add blank answers

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.0.12, 3.1.2
    • 3.1.4-RC1
    • ACP
    • 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)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: