Changeset 3283875
- Timestamp:
- 04/29/2025 07:53:42 AM (10 months ago)
- Location:
- really-simple-ssl
- Files:
-
- 6 edited
-
tags/9.3.4/languages/really-simple-ssl.pot (modified) (1 diff)
-
tags/9.3.4/readme.txt (modified) (2 diffs)
-
tags/9.3.4/security/wordpress/two-fa/class-rsssl-two-factor-profile-settings.php (modified) (2 diffs)
-
trunk/languages/really-simple-ssl.pot (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/security/wordpress/two-fa/class-rsssl-two-factor-profile-settings.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
really-simple-ssl/tags/9.3.4/languages/really-simple-ssl.pot
r3279755 r3283875 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2025-04-1 7T08:55:13+00:00\n"12 "POT-Creation-Date: 2025-04-10T06:41:48+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.11.0\n" -
really-simple-ssl/tags/9.3.4/readme.txt
r3279755 r3283875 5 5 Requires at least: 5.9 6 6 License: GPL2 7 Tested up to: 6. 97 Tested up to: 6.8 8 8 Requires PHP: 7.4 9 Stable tag: 9.3.3 9 Stable tag: 9.3.4 10 10 11 Easily improve site security with WordPress Hardening, Two-Factor Authentication (2FA), Login Protection, Vulnerability Detection and SSL certificate. 11 12 … … 152 153 == Changelog == 153 154 = 9.3.4 = 154 = Tested up to WordPress 6.8 155 = Some translation updates 155 = April 29th, 2025 156 * Improvement: Tested up to WordPress 6.8 157 * Improvement: Some translation updates 158 * Improvement: Check for autoloader in cron 159 * Fix: 2FA methods can now be set on profile page 156 160 157 161 = 9.3.3 = -
really-simple-ssl/tags/9.3.4/security/wordpress/two-fa/class-rsssl-two-factor-profile-settings.php
r3279755 r3283875 70 70 * @return void 71 71 */ 72 private function __construct() 73 { 74 if (is_user_logged_in()) { 75 $user_id = get_current_user_id(); 76 $user = get_user_by('ID', $user_id); 77 global $pagenow; 78 79 if ('profile.php' === $pagenow || ('user-edit.php' === $pagenow && isset($_GET['user_id']))) { 80 if ($this->validate_two_turned_on_for_user($user)) { 81 add_action('admin_init', array($this, 'add_hooks')); 82 } 83 } 84 } 85 } 72 private function __construct() { 73 if ( is_user_logged_in() ) { 74 $user_id = get_current_user_id(); 75 $user = get_user_by( 'ID', $user_id ); 76 global $pagenow; 77 78 $relevant_ajax_actions = [ 'change_method_to_email', 'resend_email_code_profile' ]; 79 80 if ( 81 'profile.php' === $pagenow || 82 ( 'user-edit.php' === $pagenow && isset( $_GET['user_id'] ) ) || 83 ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['action'] ) && in_array( $_REQUEST['action'], $relevant_ajax_actions, true ) ) 84 ) { 85 if ( $this->validate_two_turned_on_for_user( $user ) ) { 86 add_action( 'admin_init', array( $this, 'add_hooks' ) ); 87 } 88 } 89 90 } 91 } 86 92 87 93 /** … … 157 163 * 158 164 */ 159 public function start_email_validation_callback(): void 160 { 161 if(!is_user_logged_in()) { 162 wp_send_json_error( array( 'message' => __( 'User not logged in.', 'really-simple-ssl' ) ), 401 ); 163 } 164 $user = get_user_by('id', get_current_user_id()); 165 // Sending the email with the code. 166 Rsssl_Two_Factor_Email::get_instance()->generate_and_email_token($user, true); 167 $token = get_user_meta( $user->ID, Rsssl_Two_Factor_Email::RSSSL_TOKEN_META_KEY, true ); 168 wp_send_json_success( array( 'message' => __('Verification code sent', 'really-simple-ssl'), 'token' => $token ), 200 ); 169 } 165 public function start_email_validation_callback(): void 166 { 167 168 if ( ! is_user_logged_in() ) { 169 wp_send_json_error( 170 array( 'message' => __( 'User not logged in.', 'really-simple-ssl' ) ), 171 401 172 ); 173 return; 174 } 175 176 $user = get_user_by( 'id', get_current_user_id() ); 177 178 if ( ! $user ) { 179 wp_send_json_error( 180 array( 'message' => __( 'User could not be retrieved.', 'really-simple-ssl' ) ), 181 500 182 ); 183 return; 184 } 185 186 // Sending the email with the code. 187 Rsssl_Two_Factor_Email::get_instance()->generate_and_email_token( $user, true ); 188 189 $token = get_user_meta( $user->ID, Rsssl_Two_Factor_Email::RSSSL_TOKEN_META_KEY, true ); 190 191 if ( ! $token ) { 192 wp_send_json_error( 193 array( 'message' => __( 'Failed to generate verification token.', 'really-simple-ssl' ) ), 194 500 195 ); 196 return; 197 } 198 199 wp_send_json_success( 200 array( 201 'message' => __( 'Verification code sent.', 'really-simple-ssl' ), 202 'token' => $token, 203 ), 204 200 205 ); 206 } 207 170 208 171 209 /** -
really-simple-ssl/trunk/languages/really-simple-ssl.pot
r3275580 r3283875 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2025-04-1 7T08:55:13+00:00\n"12 "POT-Creation-Date: 2025-04-10T06:41:48+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.11.0\n" -
really-simple-ssl/trunk/readme.txt
r3276398 r3283875 5 5 Requires at least: 5.9 6 6 License: GPL2 7 Tested up to: 6. 97 Tested up to: 6.8 8 8 Requires PHP: 7.4 9 9 Stable tag: 9.3.3 10 10 11 Easily improve site security with WordPress Hardening, Two-Factor Authentication (2FA), Login Protection, Vulnerability Detection and SSL certificate. 11 12 … … 152 153 == Changelog == 153 154 = 9.3.4 = 154 = Tested up to WordPress 6.8 155 = Some translation updates 155 = April 29th, 2025 156 * Improvement: Tested up to WordPress 6.8 157 * Improvement: Some translation updates 158 * Improvement: Check for autoloader in cron 159 * Fix: 2FA methods can now be set on profile page 156 160 157 161 = 9.3.3 = -
really-simple-ssl/trunk/security/wordpress/two-fa/class-rsssl-two-factor-profile-settings.php
r3275580 r3283875 70 70 * @return void 71 71 */ 72 private function __construct() 73 { 74 if (is_user_logged_in()) { 75 $user_id = get_current_user_id(); 76 $user = get_user_by('ID', $user_id); 77 global $pagenow; 78 79 if ('profile.php' === $pagenow || ('user-edit.php' === $pagenow && isset($_GET['user_id']))) { 80 if ($this->validate_two_turned_on_for_user($user)) { 81 add_action('admin_init', array($this, 'add_hooks')); 82 } 83 } 84 } 85 } 72 private function __construct() { 73 if ( is_user_logged_in() ) { 74 $user_id = get_current_user_id(); 75 $user = get_user_by( 'ID', $user_id ); 76 global $pagenow; 77 78 $relevant_ajax_actions = [ 'change_method_to_email', 'resend_email_code_profile' ]; 79 80 if ( 81 'profile.php' === $pagenow || 82 ( 'user-edit.php' === $pagenow && isset( $_GET['user_id'] ) ) || 83 ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['action'] ) && in_array( $_REQUEST['action'], $relevant_ajax_actions, true ) ) 84 ) { 85 if ( $this->validate_two_turned_on_for_user( $user ) ) { 86 add_action( 'admin_init', array( $this, 'add_hooks' ) ); 87 } 88 } 89 90 } 91 } 86 92 87 93 /** … … 157 163 * 158 164 */ 159 public function start_email_validation_callback(): void 160 { 161 if(!is_user_logged_in()) { 162 wp_send_json_error( array( 'message' => __( 'User not logged in.', 'really-simple-ssl' ) ), 401 ); 163 } 164 $user = get_user_by('id', get_current_user_id()); 165 // Sending the email with the code. 166 Rsssl_Two_Factor_Email::get_instance()->generate_and_email_token($user, true); 167 $token = get_user_meta( $user->ID, Rsssl_Two_Factor_Email::RSSSL_TOKEN_META_KEY, true ); 168 wp_send_json_success( array( 'message' => __('Verification code sent', 'really-simple-ssl'), 'token' => $token ), 200 ); 169 } 165 public function start_email_validation_callback(): void 166 { 167 168 if ( ! is_user_logged_in() ) { 169 wp_send_json_error( 170 array( 'message' => __( 'User not logged in.', 'really-simple-ssl' ) ), 171 401 172 ); 173 return; 174 } 175 176 $user = get_user_by( 'id', get_current_user_id() ); 177 178 if ( ! $user ) { 179 wp_send_json_error( 180 array( 'message' => __( 'User could not be retrieved.', 'really-simple-ssl' ) ), 181 500 182 ); 183 return; 184 } 185 186 // Sending the email with the code. 187 Rsssl_Two_Factor_Email::get_instance()->generate_and_email_token( $user, true ); 188 189 $token = get_user_meta( $user->ID, Rsssl_Two_Factor_Email::RSSSL_TOKEN_META_KEY, true ); 190 191 if ( ! $token ) { 192 wp_send_json_error( 193 array( 'message' => __( 'Failed to generate verification token.', 'really-simple-ssl' ) ), 194 500 195 ); 196 return; 197 } 198 199 wp_send_json_success( 200 array( 201 'message' => __( 'Verification code sent.', 'really-simple-ssl' ), 202 'token' => $token, 203 ), 204 200 205 ); 206 } 207 170 208 171 209 /**
Note: See TracChangeset
for help on using the changeset viewer.