Skip to content

Commit bd6bfac

Browse files
committed
v234
1 parent cdc7820 commit bd6bfac

7 files changed

+23
-24
lines changed

defines.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
defined( 'ABSPATH' ) or die( 'Something went wrong.' );
33

4-
define( 'SECUPRESS_VERSION' , '2.3.3' );
4+
define( 'SECUPRESS_VERSION' , '2.3.4' );
55
define( 'SECUPRESS_MAJOR_VERSION' , '2.3' );
66
define( 'SECUPRESS_UPDATE_API_KEY' , 'aHR0cHM6Ly9zZWN1cHJlc3MubWUv' );
77
define( 'SECUPRESS_PATH' , realpath( dirname( SECUPRESS_FILE ) ) . DIRECTORY_SEPARATOR );

free/classes/scanners/class-secupress-scan-login-errors-disclose.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function scan() {
107107
$wp_error->add( 'invalid_username', $messages );
108108
/** This filter is documented in wp-login.php */
109109
$messages = reset( apply_filters( 'login_errors', $wp_error ) );
110-
while ( ! is_string( $messages ) ) {
110+
while ( is_array( $messages ) ) {
111111
$messages = reset( $messages );
112112
}
113113

free/classes/scanners/class-secupress-scan-wp-config.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -181,34 +181,34 @@ public function scan() {
181181
}
182182

183183
// Other constants.
184-
$results = array();
184+
$results = [];
185185

186186
foreach ( $this->constants as $constant => $compare ) {
187187
$check = defined( $constant ) ? constant( $constant ) : null;
188188

189189
switch ( $compare ) {
190190
case 1:
191191
if ( ! $check ) {
192-
$results[209] = isset( $results[209] ) ? $results[209] : array();
193-
$results[209]['true'] = isset( $results[209]['true'] ) ? $results[209]['true'] : array();
192+
$results[209] = isset( $results[209] ) ? $results[209] : [];
193+
$results[209]['true'] = isset( $results[209]['true'] ) ? $results[209]['true'] : [];
194194
$results[209]['true'][] = '<code>' . $constant . '</code>';
195195
}
196196
break;
197197
case false:
198198
if ( $check ) {
199-
$results[210] = isset( $results[210] ) ? $results[210] : array();
200-
$results[210]['false'] = isset( $results[210]['false'] ) ? $results[210]['false'] : array();
199+
$results[210] = isset( $results[210] ) ? $results[210] : [];
200+
$results[210]['false'] = isset( $results[210]['false'] ) ? $results[210]['false'] : [];
201201
$results[210]['false'][] = '<code>' . $constant . '</code>';
202202
}
203203
break;
204204
default:
205-
$check = decoct( $check ) <= $compare;
206-
$mes_id = 755 === $compare ? 211 : 212;
205+
$check = ! is_null( $check ) ? decoct( $check ) <= $compare : false;
206+
$msg_id = 755 === $compare ? 211 : 212;
207207

208208
if ( ! $check ) {
209-
$results[ $mes_id ] = isset( $results[ $mes_id ] ) ? $results[ $mes_id ] : array();
210-
$results[ $mes_id ][ '0' . $compare ] = isset( $results[ $mes_id ][ '0' . $compare ] ) ? $results[ $mes_id ][ '0' . $compare ] : array();
211-
$results[ $mes_id ][ '0' . $compare ][] = '<code>' . $constant . '</code>';
209+
$results[ $msg_id ] = isset( $results[ $msg_id ] ) ? $results[ $msg_id ] : [];
210+
$results[ $msg_id ][ '0' . $compare ] = isset( $results[ $msg_id ][ '0' . $compare ] ) ? $results[ $msg_id ][ '0' . $compare ] : [];
211+
$results[ $msg_id ][ '0' . $compare ][] = '<code>' . $constant . '</code>';
212212
}
213213
break;
214214
}

free/modules/antispam/plugins/antiphishing.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,10 @@ function secupress_antiphishing_deactivation() {
103103
* @return (array) $atts
104104
**/
105105
function secupress_antiphishingcode_mail( $atts ) {
106-
$user = secupress_get_user_by( $atts['to'] );
107106
$admin_email = get_option( 'admin_email' );
108-
if ( ! secupress_is_user( $user ) && $atts['to'] !== $admin_email ) {
107+
$atts_to = is_array( $atts['to'] ) ? reset( $atts['to'] ) : $atts['to'];
108+
$user = secupress_get_user_by( $atts_to );
109+
if ( ! secupress_is_user( $user ) && $atts_to !== $admin_email ) {
109110
return $atts;
110111
}
111112
if ( secupress_is_user( $user ) ) { // user

readme.txt

+6-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: wordpress security, malware, security plugin, security
44
Requires at least: 4.9
55
Tested up to: 6.7.2
66
Requires PHP: 7.0
7-
Stable tag: 2.3.3
7+
Stable tag: 2.3.4
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1010

@@ -185,13 +185,11 @@ The answer is no. SecuPress is not compatible with another security plugin. Just
185185

186186
== Changelog ==
187187

188-
= 2.3.3 =
189-
* 11 March 2025
190-
* New: Checkbox to choose if you want to rename new or updated user if their login is the same as their display name
191-
* Fix: Scanner for Login Errors still in error even with the feature activated
192-
* Fix: Deactivating the Black Hole feature now correctly remove the rules in robots.txt
193-
* Fix: CSS stuff
194-
* Improvement: i18n
188+
= 2.3.4 =
189+
* 12 March 2025
190+
* Fix E_ERROR on rename login scanner
191+
* Fix Deprecated on PHP 8.1 when decoct passing null
192+
* Fix Array to String in wp_mail hook resulting in not sending the correct ajax answer for some plugin (the email still goes)
195193

196194
== Upgrade Notice ==
197195
* SecuPress 2.3+ now requires PHP 7.0 minimum.

secupress.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Description: More than a plugin, the guarantee of a protected website by experts.
77
* Author: SecuPress
88
* Author URI: https://secupress.me
9-
* Version: 2.3.3
9+
* Version: 2.3.4
1010
* Code Name: Starboost (Mark XXXIX)
1111
* Network: true
1212
* Contributors: SecuPress, juliobox, GregLone

uninstall.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
/** This filter is documented in wp-includes/class-http.php. */
3535
$user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ) );
36-
$version = '2.3.3';
36+
$version = '2.3.4';
3737
$args['headers'] = array(
3838
'X-Requested-With' => sprintf( '%s;SecuPress|%s|%s|;', $user_agent, $version, esc_url( home_url() ) ),
3939
'Authorization' => 'Basic ' . base64_encode( $settings['consumer_email'] . ':' . $settings['consumer_key'] )

0 commit comments

Comments
 (0)