diff options
| author | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:41 +0100 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:41 +0100 |
| commit | 723e38ece20f7a7a3611b86a4feafeb28560ce02 (patch) | |
| tree | 705f26afa4b1ff84f830bec9545ab1b8e9479305 /phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php | |
| parent | 6ebc26e330d5e204eab0ac9061bb5817534047fe (diff) | |
| parent | 199bb1366018c61fe9c140d711369a92d576e757 (diff) | |
| download | forums-723e38ece20f7a7a3611b86a4feafeb28560ce02.tar forums-723e38ece20f7a7a3611b86a4feafeb28560ce02.tar.gz forums-723e38ece20f7a7a3611b86a4feafeb28560ce02.tar.bz2 forums-723e38ece20f7a7a3611b86a4feafeb28560ce02.tar.xz forums-723e38ece20f7a7a3611b86a4feafeb28560ce02.zip | |
Merge commit 'release-3.0.6-RC4'
Diffstat (limited to 'phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php')
| -rw-r--r-- | phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php index c17cfa7bbe..45811c5d26 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php @@ -53,7 +53,7 @@ class phpbb_captcha_qa // read input $this->confirm_id = request_var('qa_confirm_id', ''); - $this->answer = request_var('qa_answer', '', true); + $this->answer = utf8_normalize_nfc(request_var('qa_answer', '', true)); $this->type = (int) $type; $this->question_lang = $user->lang_name; @@ -502,7 +502,7 @@ class phpbb_captcha_qa { global $db; - $answer = ($this->question_strict) ? request_var('qa_answer', '', true) : utf8_clean_string(request_var('qa_answer', '', true)); + $answer = ($this->question_strict) ? utf8_normalize_nfc(request_var('qa_answer', '', true)) : utf8_clean_string(utf8_normalize_nfc(request_var('qa_answer', '', true))); $sql = 'SELECT answer_text FROM ' . CAPTCHA_ANSWERS_TABLE . ' @@ -789,11 +789,12 @@ class phpbb_captcha_qa */ function acp_get_question_input() { + $answers = utf8_normalize_nfc(request_var('answers', '', true)); $question = array( 'question_text' => request_var('question_text', '', true), 'strict' => request_var('strict', false), 'lang_iso' => request_var('lang_iso', ''), - 'answers' => explode("\n", request_var('answers', '', true)), + 'answers' => (strlen($answers)) ? explode("\n", $answers) : '', ); return $question; @@ -908,8 +909,9 @@ class phpbb_captcha_qa } if (!isset($langs[$question_data['lang_iso']]) || - !$question_data['question_text'] || - !sizeof($question_data['answers'])) + !strlen($question_data['question_text']) || + !sizeof($question_data['answers']) || + !is_array($question_data['answers'])) { return false; } |
