Plugin Directory

Changeset 3344279


Ignore:
Timestamp:
08/14/2025 05:03:21 AM (7 months ago)
Author:
malcure
Message:

new release

Location:
wp-malware-removal/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-malware-removal/trunk/inc/pro.php

    r3328887 r3344279  
    349349            global $wp_version;
    350350            WP_CLI::log( WP_CLI::colorize( '%n%wMalcure Advanced Edition ' . $wpmr->plugin_data['Version'] . '%B' ) );
    351             WP_CLI::log( WP_CLI::colorize( '%n%wRegistration Details : %B' . print_r( $wpmr->get_setting( 'user' ), 1 ) . '%n' ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r -- Required for CLI debugging and info display
     351           
     352            // Display clean registration details
     353            $user_details = $wpmr->get_setting( 'user' );
     354            if ( ! empty( $user_details ) ) {
     355                WP_CLI::log( WP_CLI::colorize( '%n%wRegistration Details:%n' ) );
     356                if ( isset( $user_details['ID'] ) ) {
     357                    WP_CLI::log( "\tUser ID       : " . $user_details['ID'] );
     358                }
     359                if ( isset( $user_details['user_email'] ) ) {
     360                    WP_CLI::log( "\tEmail         : " . $user_details['user_email'] );
     361                }
     362                if ( isset( $user_details['first_name'] ) ) {
     363                    WP_CLI::log( "\tFirst Name    : " . $user_details['first_name'] );
     364                }
     365                if ( isset( $user_details['last_name'] ) ) {
     366                    WP_CLI::log( "\tLast Name     : " . $user_details['last_name'] );
     367                }
     368            }
     369           
    352370            $this->license_req();
    353371            // WP_CLI::log( print_r( $wpmr->plugin_data, 1 ) );
     
    669687                                array( 'license', 'customer_email', 'site_count', 'activations_left', 'license_limit', 'expires' )
    670688                            ) ) {
    671 
    672                             WP_CLI::log( "\t" . ucwords( preg_replace( '/[^A-Za-z0-9 ]/', ' ', $key ) ) . ' : ' . $value );
     689                            $formatted_key = ucwords( str_replace( '_', ' ', $key ) );
     690                            $formatted_value = $value;
     691                            // Format specific values for better readability
     692                            if ( $key === 'license' ) {
     693                                $formatted_key = 'License';
     694                                $formatted_value = ucfirst( $value );
     695                            } elseif ( $key === 'expires' ) {
     696                                $formatted_key = 'Expires';
     697                            } elseif ( $key === 'customer_email' ) {
     698                                $formatted_key = 'Customer Email';
     699                            } elseif ( $key === 'license_limit' ) {
     700                                $formatted_key = 'License Limit';
     701                                $formatted_value = ( $value == 0 ) ? 'unlimited' : $value;
     702                            } elseif ( $key === 'site_count' ) {
     703                                $formatted_key = 'Site Count';
     704                            } elseif ( $key === 'activations_left' ) {
     705                                $formatted_key = 'Activations Left';
     706                                $formatted_value = ( $value == 999999 || $value == 0 ) ? 'unlimited' : $value;
     707                            }
     708
     709                            WP_CLI::log( "\t" . str_pad( $formatted_key, 18, ' ', STR_PAD_RIGHT ) . ': ' . $formatted_value );
    673710                        }
    674711                    }
  • wp-malware-removal/trunk/readme.txt

    r3333119 r3344279  
    55Tested up to: 6.8
    66Requires PHP: 5.6
    7 Stable tag: 17.2
     7Stable tag: 17.3
    88License: MIT
    99License URI: https://opensource.org/licenses/MIT
     
    190190== Changelog ==
    191191
     192= 17.3 =
     193Bugfix: Potential false negatives for certain default files.
     194Bugfix: Fixed formating in WP CLI commands.
     195
    192196= 17.2 =
    193197Bugfix: File cleanup not working in advanced edition.
  • wp-malware-removal/trunk/wpmr.php

    r3333119 r3344279  
    1111 * Plugin Name: Malcure Malware Scanner — #1 Toolset for Malware Removal
    1212 * Description: Ultra-precision, comphrensive malware scanner and security hardening to protect your site and find viruses, infections & other security threats & vulnerabilities. Detects over 50,000+ security threats & vulnerabilities. Do not forget to report bugs and share your reviews.
    13  * Version:     17.2
     13 * Version:     17.3
    1414 * Author:      Malcure
    1515 * Author URI:  https://malcure.com
     
    30733073            do_action( 'wpmr_scan_init', $GLOBALS['WPMR'] );
    30743074        }
     3075
    30753076        return $response;
    30763077    }
     
    34893490                continue;
    34903491            }
     3492
    34913493            $checksum_failure = $this->fails_checksum( $file );
    34923494            // $this->flog( 'Checksum failure: ' . $checksum_failure );
     
    36943696            $page_for_posts = get_option( 'page_for_posts' );
    36953697            $page_on_front  = get_option( 'page_on_front' );
     3698            // there may be a chance that only one of these is set: page_on_front has not been set but page_for_posts has been set
    36963699            return $this->check_page_hack( get_permalink( $page_for_posts ) ) || $this->check_page_hack( get_permalink( $page_on_front ) );
    36973700        } else {
     
    37003703    }
    37013704
    3702     function check_page_hack( $url ) {
     3705    function check_page_hack( $url = '' ) {
     3706        if ( empty( $url ) || ! filter_var( $url, FILTER_VALIDATE_URL ) ) {
     3707            $this->flog( 'Invalid URL ' . print_r( $url, 1 ) . ' in ' . __FUNCTION__ );
     3708            return false;
     3709        }
    37033710        $url = add_query_arg( array( uniqid() => uniqid( '', 1 ) ), trailingslashit( $url ) );
    37043711        if ( ! $content = $this->get_remote_response( $url ) ) {
     
    40654072        if ( ! in_array( $hash, $checksums ) || $this->is_file_blacklisted( $hash ) ) {
    40664073            if ( ! $this->is_registered() ) {
    4067                 if ( $this->normalise_path( $local_file ) == $this->normalise_path( trailingslashit( ABSPATH ) . 'wp-config.php' ) ||
    4068                 $this->normalise_path( $local_file ) == $this->normalise_path( trailingslashit( ABSPATH ) . '.htaccess' ) ||
    4069                 $this->normalise_path( $local_file ) == $this->normalise_path( trailingslashit( WP_CONTENT_DIR ) . 'index.php' ) ||
    4070                 $this->normalise_path( $local_file ) == $this->normalise_path( trailingslashit( WP_PLUGIN_DIR ) . 'index.php' ) ||
    4071                 $this->normalise_path( $local_file ) == $this->normalise_path( trailingslashit( get_theme_root() ) . 'index.php' )
     4074                if (
     4075                    $this->normalise_path( $local_file ) == $this->normalise_path( trailingslashit( ABSPATH ) . 'wp-config.php' ) ||
     4076                    $this->normalise_path( $local_file ) == $this->normalise_path( trailingslashit( ABSPATH ) . '.htaccess' ) ||
     4077                    $this->normalise_path( $local_file ) == $this->normalise_path( trailingslashit( WP_CONTENT_DIR ) . 'index.php' ) ||
     4078                    $this->normalise_path( $local_file ) == $this->normalise_path( trailingslashit( WP_PLUGIN_DIR ) . 'index.php' ) ||
     4079                    $this->normalise_path( $local_file ) == $this->normalise_path( trailingslashit( get_theme_root() ) . 'index.php' )
    40724080                ) {
    4073                     return false; // ignore known files that may not have a checksum at all
     4081                    // uncommenting the next line could lead to false negatives
     4082                    // return false; // ignore known files that may not have a checksum at all
    40744083                }
    40754084            }
    40764085            return 'missing';
    40774086        }
    4078 
    40794087        return;
    40804088    }
     
    41664174                $checksums = $this->sha256_get_core_checksums( $wp_version ); // defaults to en_US
    41674175            }
    4168             if ( ! $checksums ) {
    4169                 $checksums = array();
    4170             }
     4176            if ( ! $checksums ) {
     4177                $checksums = array();
     4178            }
    41714179
    41724180            $plugin_checksums = $this->get_plugin_checksums();
     
    64616469            wp_send_json_error( 'Please update to Malcure Advanced Edition to use this feature.' );
    64626470        }
    6463         $file     = base64_decode( sanitize_text_field( wp_unslash( $_REQUEST['file'] ) ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated -- Validated via check_ajax_referer
     6471
     6472        $file = base64_decode( sanitize_text_field( wp_unslash( $_REQUEST['file'] ) ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated -- Validated via check_ajax_referer
     6473
     6474        if ( $this->is_in_core_wp_dir( $this->normalise_path( $file ) ) ) {
     6475            wp_send_json_error( 'Whitelisting core WordPress files is not allowed. File: ' . $file );
     6476        }
     6477
    64646478        $checksum = @hash_file( 'sha256', $this->normalise_path( $file ) );
    64656479        if ( $checksum ) {
Note: See TracChangeset for help on using the changeset viewer.