Skip to content

Commit 44238eb

Browse files
authored
Merge pull request phpbb#6905 from Neo-CTC/ticket/17589
[ticket/17589] Check confirm id for QA captcha
2 parents 4542343 + 0024373 commit 44238eb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • phpBB/phpbb/captcha/plugins

phpBB/phpbb/captcha/plugins/qa.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,7 @@ function check_answer()
573573
global $db, $request;
574574

575575
$answer = ($this->question_strict) ? $request->variable('qa_answer', '', true) : utf8_clean_string($request->variable('qa_answer', '', true));
576+
$confirm_id = $request->variable('qa_confirm_id', '');
576577

577578
$sql = 'SELECT answer_text
578579
FROM ' . $this->table_captcha_answers . '
@@ -583,7 +584,7 @@ function check_answer()
583584
{
584585
$solution = ($this->question_strict) ? $row['answer_text'] : utf8_clean_string($row['answer_text']);
585586

586-
if ($solution === $answer)
587+
if ($solution === $answer && $this->confirm_id === $confirm_id)
587588
{
588589
$this->solved = true;
589590

0 commit comments

Comments
 (0)