From c471bfc76fd08ceb46a4fc2d5541377e0f4ef0d8 Mon Sep 17 00:00:00 2001 From: Simon Litt Date: Thu, 11 Aug 2022 13:33:51 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=B0=D0=BF=D1=87=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bug_report.php | 7 ++++++ bug_report_page.php | 47 +++++++++++++++++++++++++++++++++++ bug_view_inc.php | 3 +++ bugnote_add.php | 7 ++++++ bugnote_add_inc.php | 44 ++++++++++++++++++++++++++++++++ config/custom_strings_inc.php | 4 +++ 6 files changed, 112 insertions(+) diff --git a/bug_report.php b/bug_report.php index 80747fb..fbfa03d 100644 --- a/bug_report.php +++ b/bug_report.php @@ -84,6 +84,13 @@ if( $f_master_bug_id > 0 ) { $t_project_id = $f_project_id; } +$f_captcha = gpc_get_string( 'captcha', '' ); +$f_captcha = mb_strtolower( trim( $f_captcha ) ); +$t_securimage = new Securimage(); +if( $t_securimage->check( $f_captcha ) == false ) { + trigger_error( ERROR_SIGNUP_NOT_MATCHING_CAPTCHA, ERROR ); +} + $t_issue = array( 'project' => array( 'id' => $t_project_id ), 'reporter' => array( 'id' => auth_get_current_user_id() ), diff --git a/bug_report_page.php b/bug_report_page.php index 6c05baf..62abc6a 100644 --- a/bug_report_page.php +++ b/bug_report_page.php @@ -75,6 +75,9 @@ require_api( 'string_api.php' ); require_api( 'utility_api.php' ); require_api( 'version_api.php' ); +require_css( 'login.css' ); +require_js( 'login.js' ); + $f_master_bug_id = gpc_get_int( 'm_id', 0 ); if( $f_master_bug_id > 0 ) { @@ -758,6 +761,50 @@ if( $t_show_attachments ) { + + + + * : + + + $t_securimage_path . '/securimage_play.php', + 'bgColor1=' => '#fff', + 'bgColor2=' => '#fff', + 'iconColor=' => '#777', + 'borderWidth=' => 1, + 'borderColor=' => '#000', + ) ); + + ?> + + + + + visual captcha +
+
+ + + + +
+ + + diff --git a/bug_view_inc.php b/bug_view_inc.php index 7d39c9d..cdb6d13 100644 --- a/bug_view_inc.php +++ b/bug_view_inc.php @@ -77,6 +77,9 @@ require_api( 'version_api.php' ); require_css( 'status_config.php' ); +require_css( 'login.css' ); +require_js( 'login.js' ); + $f_issue_id = gpc_get_int( 'id' ); $f_history = gpc_get_bool( 'history', config_get( 'history_default_visible' ) ); diff --git a/bugnote_add.php b/bugnote_add.php index 39b5d52..db530a6 100644 --- a/bugnote_add.php +++ b/bugnote_add.php @@ -60,6 +60,13 @@ $t_data = array( 'payload' => $t_payload, ); +$f_captcha = gpc_get_string( 'captcha', '' ); +$f_captcha = mb_strtolower( trim( $f_captcha ) ); +$t_securimage = new Securimage(); +if( $t_securimage->check( $f_captcha ) == false ) { + trigger_error( ERROR_SIGNUP_NOT_MATCHING_CAPTCHA, ERROR ); +} + $t_command = new IssueNoteAddCommand( $t_data ); $t_command->execute(); diff --git a/bugnote_add_inc.php b/bugnote_add_inc.php index 30bc58b..da47db8 100644 --- a/bugnote_add_inc.php +++ b/bugnote_add_inc.php @@ -119,7 +119,51 @@ require_api( 'lang_api.php' ); + + + + * : + + + $t_securimage_path . '/securimage_play.php', + 'bgColor1=' => '#fff', + 'bgColor2=' => '#fff', + 'iconColor=' => '#777', + 'borderWidth=' => 1, + 'borderColor=' => '#000', + ) ); + + ?> + + + + + visual captcha +
+
+ + + +
+ + +