Changeset 2959830
- Timestamp:
- 08/29/2023 11:17:11 AM (3 years ago)
- Location:
- zt-captcha
- Files:
-
- 27 added
- 4 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/captcha_settings.php (added)
-
tags/1.0.1/css (added)
-
tags/1.0.1/css/default.css (added)
-
tags/1.0.1/css/green.theme.css (added)
-
tags/1.0.1/css/theme.css (added)
-
tags/1.0.1/fonts (added)
-
tags/1.0.1/fonts/Xacto Blade.ttf (added)
-
tags/1.0.1/fonts/Xerox Sans Serif Narrow Bold.ttf (added)
-
tags/1.0.1/fonts/Year supply of fairy cakes.ttf (added)
-
tags/1.0.1/fonts/Year2000Boogie.ttf (added)
-
tags/1.0.1/fonts/monofont.ttf (added)
-
tags/1.0.1/img (added)
-
tags/1.0.1/img/check.png (added)
-
tags/1.0.1/img/left_arrow.png (added)
-
tags/1.0.1/img/loader.gif (added)
-
tags/1.0.1/img/right_arrow.png (added)
-
tags/1.0.1/inc (added)
-
tags/1.0.1/inc/Zt_Captcha.php (added)
-
tags/1.0.1/inc/template.php (added)
-
tags/1.0.1/js (added)
-
tags/1.0.1/js/app.js (added)
-
tags/1.0.1/js/popper.min.js (added)
-
tags/1.0.1/readme.txt (added)
-
tags/1.0.1/request (added)
-
tags/1.0.1/request/CaptchaRequest.php (added)
-
tags/1.0.1/zt-captcha.php (added)
-
trunk/captcha_settings.php (modified) (1 diff)
-
trunk/inc/Zt_Captcha.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/zt-captcha.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
zt-captcha/trunk/captcha_settings.php
r2856982 r2959830 334 334 <?php 335 335 } 336 ?> -
zt-captcha/trunk/inc/Zt_Captcha.php
r2856982 r2959830 246 246 247 247 endif; 248 ?> -
zt-captcha/trunk/readme.txt
r2860673 r2959830 1 1 === ZT Captcha === 2 Tags: Captcha, recaptcha, contactform7, antispam, spamprotection, loginsecurity2 Tags: captcha, simple captcha, login, register, comment, captcha for login, captcha for register, captcha for comment 3 3 Requires at least: 4.4 4 4 Contributors: teamzt 5 Tested up to: 6. 1.16 Stable tag: 1.0 5 Tested up to: 6.3 6 Stable tag: 1.0.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 9 Requires PHP: 7.1 10 Last Update: 2023-0 1-3010 Last Update: 2023-08-29 11 11 12 12 The simple captcha plugin was developed to keep the WordPress website safe. Captcha helps protect you from spam and password decryption by asking you to complete a simple test that proves you are human and not a computer trying to break into a password-protected account. … … 14 14 == Description == 15 15 16 The Simple Captcha plugin designed with the aim of enhancing the security of WordPress websites. It functions by implementing a human verification test to safeguard against potential spam and unauthorized access attempts. The test, in the form of a simple challenge, ensures that only humans can access password-protected accounts and prevents automated scripts from compromising the security of the website. 17 18 = Below features are available to WordPress administrators: = 19 20 * Admin Have an option to enable/disable the captcha on the default WordPress login/registration form. 21 * Admin Have an option to enable/disable the captcha on the default WordPress reset password form. 22 * Admin Have an option to enable/disable the captcha on the default WordPress comment form. 23 24 = Admin Have an option to select different captcha options: = 25 26 * Numeric 27 * Alphabetic 28 * Mathematical captcha with random option 29 * Mathematical captcha with algebraic option 30 * Include special characters in the captcha string 31 * Include uppercase letters in the captcha string 32 * Set a limit of captcha digits 16 1.As an administrator, Admin Have an option to enable/disable the captcha on the default WordPress login form. 17 2.As an administrator, Admin Have an option to enable/disable the captcha on the default WordPress registration form. 18 3.As an administrator, Admin Have an option to enable/disable the captcha on the default WordPress reset password form. 19 4.As an administrator, Admin Have an option to enable/disable the captcha on the default WordPress comment form. 20 5.As an administrator, Admin Have an option to select numeric captcha. 21 6.As an administrator, Admin Have an option to select alphabetic captcha. 22 7.As an administrator, Admin Have an option to select mathematical captcha with random option. 23 8.As an administrator, Admin Have an option to select mathematical captcha with algebraic operations. 24 9.As an administrator, Admin Have an option to include special characters in the captcha string. 25 10.As an administrator, Admin Have an option to include uppercase letters in the captcha string. 26 11.As an administrator, Admin Have an option to set a limit of captcha digits. 33 27 34 28 == Installation == 35 29 36 * Install ZT Captcha either via the WordPress.org plugin directory, or by uploading the files to your server. 37 * Activate the plugin through the 'Plugins' menu in WordPress. 38 *Go to the ZT Captcha menu and set your captcha display settings.30 1. Install ZT Captcha either via the WordPress.org plugin directory, or by uploading the files to your server 31 2. Activate the plugin through the 'Plugins' menu in WordPress 32 3. Go to the ZT Captcha menu and set your captcha display settings. 39 33 40 34 **Installing via FTP** 41 35 42 -Login to your hosting space via an FTP software, e.g. FileZilla.43 -Unzip the downloaded ZT Captcha by WordPress plugin folder without making any changes to the folder.44 - Upload the ZT Captcha by WordPress plugin into the following location wp-content >wp-plugins.45 -Login to the WordPress Administrator Panel.46 -Activate ZT Captcha plugin by going to Plugins and pressing Activate button.36 Login to your hosting space via an FTP software, e.g. FileZilla. 37 Unzip the downloaded ZT Captcha by WordPress plugin folder without making any changes to the folder. 38 Upload the ZT Captcha by WordPress plugin into the following location wp-content>wp-plugins. 39 Login to the WordPress Administrator Panel. 40 Activate ZT Captcha plugin by going to Plugins and pressing Activate button. 47 41 48 42 49 43 == Frequently Asked Questions == 50 44 51 = Is it work for cutom login, comment,register forms generated from plugins? =45 = Is it work for cutom login,comment,register forms generated from plugins? = 52 46 53 Yes ,it work's if Wordpress standard hooks are used in the forms.47 Yes ,it work's if Wordpress standard hooks are used in the forms. 54 48 55 49 = Is it requires PHP GD extention? = 56 50 57 Yes , it requires PHP GD extention for more help please go through the page [here](https://bobcares.com/blog/php-install-gd-extension/).51 Yes ,it requires PHP GD extention for more help please go through the page https://bobcares.com/blog/php-install-gd-extension/. 58 52 59 53 … … 74 68 First Release 75 69 70 = 1.0.1 = 71 72 * New: Added Captcha for woocommerce lost password form. 73 * Update: All functionality was updated for WordPress 6.3. -
zt-captcha/trunk/zt-captcha.php
r2860673 r2959830 3 3 Plugin Name: ZT Captcha 4 4 Description: The simple captcha plugin was developed to keep the WordPress website safe. Captcha helps protect you from spam and password decryption by asking you to complete a simple test that proves you are human and not a computer trying to break into a password-protected account. 5 Version: 1.0 5 Version: 1.0.1 6 6 Author: Webcresty 7 7 Author URI: https://www.webcresty.com/ … … 12 12 define('ZTCPT_CAPTCHA_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 13 13 define('ZTCPT_CAPTCHA_URL_DIR',plugin_dir_url( __FILE__ ) ); 14 define('ZTCPT_CAPTCHA_VERSION','1.0 ');14 define('ZTCPT_CAPTCHA_VERSION','1.0.1'); 15 15 define('ZTCPT_VALIDATE_REQ','a_c_validate'); 16 16 define('ZTCPT_SESSION_STORAGE','a_security_code'); … … 89 89 add_action( 'woocommerce_register_form', function(){ztcpt_captcha('wc_register'); }); 90 90 add_action( 'woocommerce_register_post', 'ztcpt_a_cptch_wooc_validate_fields', 10, 3 ); 91 91 92 } 92 93 … … 99 100 //woocomerce 100 101 add_action( 'woocommerce_lostpassword_form',function(){ztcpt_captcha('wp_forget');}); 102 add_action( 'lostpassword_post', 'ztcpt_a_cptch_wooc_forget_validate'); // for lost password woocommerce 101 103 } 102 104 /* … … 643 645 } 644 646 /* end script Woocommerce Register validate form case */ 647 648 /*lost password for woocommerce account*/ 649 650 if(!function_exists('ztcpt_a_cptch_wooc_forget_validate')){ 651 function ztcpt_a_cptch_wooc_forget_validate($errors) { 652 ztcptCaptchaSessionStart(); 653 if(get_option('zt_captcha_selected_captcha')=='mathematical_captcha'){ 654 return ztcpt_is_numeric_wooc_forget_case($errors); 655 } 656 if(get_option('zt_captcha_selected_captcha')=='number_captcha'){ 657 if(get_option('zt_captcha_numeric_symbol')!='on'){ 658 return ztcpt_is_numeric_wooc_forget_case($errors); 659 } 660 else{ 661 return ztcpt_is_alphanumeric_wooc_forget_case($errors); 662 } 663 } 664 if(get_option('zt_captcha_selected_captcha')=='alphzt_captcha'){ 665 if((get_option('zt_captcha_alpha_capital')=='on') && (get_option('zt_captcha_alpha_symbol')=='on')){ 666 return ztcpt_is_alphanumeric_wooc_forget_case($errors); 667 } 668 elseif((get_option('zt_captcha_alpha_capital')=='on') || (get_option('zt_captcha_alpha_symbol')=='on')){ 669 return ztcpt_is_alphanumeric_wooc_forget_case($errors); 670 } 671 else{ 672 return ztcpt_is_alphanumeric_wooc_forget_case($errors); 673 } 674 } 675 } 676 } 677 678 679 if(!function_exists('ztcpt_is_numeric_wooc_forget_case')){ 680 function ztcpt_is_numeric_wooc_forget_case($errors){ 681 $zt_captcha_error_message = get_option('zt_captcha_error_message'); 682 if(strlen($_REQUEST[ZTCPT_VALIDATE_REQ])==strlen($_SESSION[ZTCPT_SESSION_STORAGE]['wp_forget'])){ 683 if(is_numeric($_REQUEST[ZTCPT_VALIDATE_REQ])==is_numeric($_SESSION[ZTCPT_SESSION_STORAGE]['wp_forget'])){ 684 if(isset($_REQUEST[ZTCPT_VALIDATE_REQ])){ 685 $ZTCPT_VALIDATE_REQ = sanitize_text_field($_REQUEST[ZTCPT_VALIDATE_REQ]); 686 if(!isset($_SESSION[ZTCPT_SESSION_STORAGE]) || !isset($_SESSION[ZTCPT_SESSION_STORAGE]['wp_forget']) || $_SESSION[ZTCPT_SESSION_STORAGE]['wp_forget']!=$ZTCPT_VALIDATE_REQ){ 687 $message = esc_html__( $zt_captcha_error_message, ZTCPT_TEXT_DOMAIN); 688 $errors->add( 'captcha_not_verified', $message); 689 } 690 } 691 } 692 else{ 693 $message = esc_html__( $zt_captcha_error_message, ZTCPT_TEXT_DOMAIN); 694 $errors->add( 'captcha_not_verified', $message); 695 } 696 } 697 else{ 698 $message = esc_html__( $zt_captcha_error_message, ZTCPT_TEXT_DOMAIN); 699 $errors->add( 'captcha_not_verified', $message); 700 } 701 return $errors; 702 } 703 } 704 705 if(!function_exists('ztcpt_is_alphanumeric_wooc_forget_case')){ 706 function ztcpt_is_alphanumeric_wooc_forget_case($errors){ 707 $zt_captcha_error_message = get_option('zt_captcha_error_message'); 708 if(strlen($_REQUEST[ZTCPT_VALIDATE_REQ])==strlen($_SESSION[ZTCPT_SESSION_STORAGE]['wp_forget'])){ 709 if(is_string($_REQUEST[ZTCPT_VALIDATE_REQ])==is_string($_SESSION[ZTCPT_SESSION_STORAGE]['wp_forget'])){ 710 if(isset($_REQUEST[ZTCPT_VALIDATE_REQ])){ 711 $ZTCPT_VALIDATE_REQ = sanitize_text_field($_REQUEST[ZTCPT_VALIDATE_REQ]); 712 if(!isset($_SESSION[ZTCPT_SESSION_STORAGE]) || !isset($_SESSION[ZTCPT_SESSION_STORAGE]['wp_forget']) || $_SESSION[ZTCPT_SESSION_STORAGE]['wp_forget']!=$ZTCPT_VALIDATE_REQ){ 713 $message = esc_html__( $zt_captcha_error_message, ZTCPT_TEXT_DOMAIN); 714 $errors->add( 'captcha_not_verified', $message); 715 } 716 } 717 } 718 else{ 719 $message = esc_html__( $zt_captcha_error_message, ZTCPT_TEXT_DOMAIN); 720 $errors->add( 'captcha_not_verified', $message); 721 } 722 } 723 else{ 724 $message = esc_html__( $zt_captcha_error_message, ZTCPT_TEXT_DOMAIN); 725 $errors->add( 'captcha_not_verified', $message, ZTCPT_TEXT_DOMAIN); 726 } 727 return $errors; 728 } 729 }
Note: See TracChangeset
for help on using the changeset viewer.