Plugin Directory

Changeset 2453867


Ignore:
Timestamp:
01/11/2021 12:07:49 PM (5 years ago)
Author:
ethicalhack3r
Message:

New 1.14.2 version release

Location:
wpscan
Files:
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wpscan/tags/1.14.2/app/Notification.php

    r2452411 r2453867  
    8080     */
    8181    public function add_meta_box_notification() {
    82         if ( $this->parent->is_wp_cron_disabled() ) {
    83             return;
    84         }
    85 
    8682        add_meta_box(
    8783            'wpscan-metabox-notification',
  • wpscan/tags/1.14.2/app/Plugin.php

    r2452411 r2453867  
    8484        add_action( 'in_admin_header', array( $this, 'deactivate_screen' ) );
    8585
    86         // Check if wp cron is disabled
    87         if ( $this->is_wp_cron_disabled() ) {
    88             add_action( 'admin_notices', array( $this, 'wp_cron_alert' ) );
    89         }
    90 
    9186        if ( defined( 'WPSCAN_API_TOKEN' ) ) {
    9287            add_action( 'admin_init', array( $this, 'api_token_from_constant' ) );
     
    158153            include_once plugin_dir_path( WPSCAN_PLUGIN_FILE ) . 'views/deactivate.php';
    159154        }
    160     }
    161 
    162     /**
    163      * Check if WP-Cron is disabled
    164      *
    165      * @since 1.14.0
    166      * @access public
    167      * @return bool
    168      */
    169     public function is_wp_cron_disabled() {
    170         return defined('DISABLE_WP_CRON') && DISABLE_WP_CRON;
    171     }
    172 
    173     /**
    174      * Display cron disabled alert
    175      *
    176      * @since 1.14.0
    177      * @access public
    178      * @return void
    179      */
    180     public function wp_cron_alert() {
    181         echo "<div class='notice notice-error'><p>". __( 'WP-Cron has been disabled in the wp-config.php file using the <code>DISABLE_WP_CRON</code> constant. Automated scans and other features that rely on cron will not work.', 'wpscan' ) ."</p></div>";
    182155    }
    183156
  • wpscan/tags/1.14.2/app/Settings.php

    r2452411 r2453867  
    3030        add_action( 'admin_notices', array( $this, 'got_api_token' ) );
    3131        add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue' ) );
    32 
    33         if ( ! $this->parent->is_wp_cron_disabled() ) {
    34             add_action( 'add_option_' . $this->parent->OPT_SCANNING_INTERVAL, array( $this, 'schedule_event' ), 10, 2 );
    35             add_action( 'update_option_' . $this->parent->OPT_SCANNING_INTERVAL, array( $this, 'schedule_event' ), 10, 2 );
    36             add_action( 'update_option_' . $this->parent->OPT_SCANNING_TIME, array( $this, 'schedule_event' ), 10, 2 );
    37         }
    38 
     32        add_action( 'add_option_' . $this->parent->OPT_SCANNING_INTERVAL, array( $this, 'schedule_event' ), 10, 2 );
     33        add_action( 'update_option_' . $this->parent->OPT_SCANNING_INTERVAL, array( $this, 'schedule_event' ), 10, 2 );
     34        add_action( 'update_option_' . $this->parent->OPT_SCANNING_TIME, array( $this, 'schedule_event' ), 10, 2 );
    3935        add_action( 'update_option_' . $this->parent->OPT_IGNORE_ITEMS, array( $this, 'update_ignored_items' ), 10, 2 );
    4036    }
     
    8581
    8682        register_setting( $this->page, $this->parent->OPT_IGNORE_ITEMS );
    87 
    88         if ( ! $this->parent->is_wp_cron_disabled() ) {
    89             register_setting( $this->page, $this->parent->OPT_SCANNING_INTERVAL, 'sanitize_text_field' );
    90             register_setting( $this->page, $this->parent->OPT_SCANNING_TIME, 'sanitize_text_field' );
    91         }
     83        register_setting( $this->page, $this->parent->OPT_SCANNING_INTERVAL, 'sanitize_text_field' );
     84        register_setting( $this->page, $this->parent->OPT_SCANNING_TIME, 'sanitize_text_field' );
    9285
    9386        $section = $this->page . '_section';
     
    108101        );
    109102
    110         if ( ! $this->parent->is_wp_cron_disabled() ) {
    111 
    112             add_settings_field(
    113                 $this->parent->OPT_SCANNING_INTERVAL,
    114                 __( 'Automated Scanning', 'wpscan' ),
    115                 array( $this, 'field_scanning_interval' ),
    116                 $this->page,
    117                 $section
    118             );
    119 
    120             add_settings_field(
    121                 $this->parent->OPT_SCANNING_TIME,
    122                 __( 'Scanning Time', 'wpscan' ),
    123                 array( $this, 'field_scanning_time' ),
    124                 $this->page,
    125                 $section
    126             );
    127 
    128         }
     103        add_settings_field(
     104            $this->parent->OPT_SCANNING_INTERVAL,
     105            __( 'Automated Scanning', 'wpscan' ),
     106            array( $this, 'field_scanning_interval' ),
     107            $this->page,
     108            $section
     109        );
     110
     111        add_settings_field(
     112            $this->parent->OPT_SCANNING_TIME,
     113            __( 'Scanning Time', 'wpscan' ),
     114            array( $this, 'field_scanning_time' ),
     115            $this->page,
     116            $section
     117        );
    129118
    130119        add_settings_field(
  • wpscan/tags/1.14.2/app/Summary.php

    r2452411 r2453867  
    101101        </p>
    102102
    103             <?php if ( ! $this->parent->is_wp_cron_disabled() && wp_next_scheduled( $this->parent->WPSCAN_SCHEDULE ) ) { ?>
     103            <?php if ( wp_next_scheduled( $this->parent->WPSCAN_SCHEDULE ) ) { ?>
    104104                <p>
    105105                    <?php _e( 'The next scan will automatically be run on ', 'wpscan' ) ?>
  • wpscan/tags/1.14.2/readme.txt

    r2452843 r2453867  
    44Requires at least: 3.4
    55Tested up to: 5.6
    6 Stable tag: 1.14.1
     6Stable tag: 1.14.2
    77Requires PHP: 5.5
    88License: GPLv3
     
    7878
    7979== Changelog ==
     80
     81= 1.14.2 =
     82
     83* Revert DISABLE_WP_CRON check
     84* Fix HTTPS check
    8085
    8186= 1.14.1 =
  • wpscan/tags/1.14.2/security-checks/https/check.php

    r2452411 r2453867  
    6161    $vulnerabilities = $this->get_vulnerabilities();
    6262
    63     // The current page is using HTTPS.
    64     if ( is_ssl() ) {
    65       $wp_url   = get_bloginfo( 'wpurl' );
    66       $site_url = get_bloginfo( 'url' );
     63    $wp_url   = get_bloginfo( 'wpurl' );
     64    $site_url = get_bloginfo( 'url' );
    6765
    68       // Is the configured WordPress URL using HTTPS?
    69       if ( 'https' !== substr( $wp_url, 0, 5 ) || 'https' !== substr( $site_url, 0, 5 ) ) {
    70         $this->add_vulnerability( __( 'The website seems to support HTTPS but it is not configured to be used by default', 'wpscan' ), 'medium', 'https' );
    71       }
    72     } else {
     66    // Check if the current page is using HTTPS.
     67    if ( 'https' !== substr( $wp_url, 0, 5 ) || 'https' !== substr( $site_url, 0, 5 ) ) {
    7368      // No HTTPS used.
    7469      $this->add_vulnerability( __( 'The website does not seem to be using HTTPS (SSL/TLS) encryption for communications', 'wpscan' ), 'high', 'https' );
  • wpscan/tags/1.14.2/wpscan.php

    r2452843 r2453867  
    44 * Plugin URI:    http://wordpress.org/plugins/wpscan/
    55 * Description:   WPScan WordPress Security Scanner. Scans your system for security vulnerabilities listed in the WPScan Vulnerability Database.
    6  * Version:       1.14.1
     6 * Version:       1.14.2
    77 * Author:        WPScan Team
    88 * Author URI:    https://wpscan.com/
  • wpscan/trunk/app/Notification.php

    r2452411 r2453867  
    8080     */
    8181    public function add_meta_box_notification() {
    82         if ( $this->parent->is_wp_cron_disabled() ) {
    83             return;
    84         }
    85 
    8682        add_meta_box(
    8783            'wpscan-metabox-notification',
  • wpscan/trunk/app/Plugin.php

    r2452411 r2453867  
    8484        add_action( 'in_admin_header', array( $this, 'deactivate_screen' ) );
    8585
    86         // Check if wp cron is disabled
    87         if ( $this->is_wp_cron_disabled() ) {
    88             add_action( 'admin_notices', array( $this, 'wp_cron_alert' ) );
    89         }
    90 
    9186        if ( defined( 'WPSCAN_API_TOKEN' ) ) {
    9287            add_action( 'admin_init', array( $this, 'api_token_from_constant' ) );
     
    158153            include_once plugin_dir_path( WPSCAN_PLUGIN_FILE ) . 'views/deactivate.php';
    159154        }
    160     }
    161 
    162     /**
    163      * Check if WP-Cron is disabled
    164      *
    165      * @since 1.14.0
    166      * @access public
    167      * @return bool
    168      */
    169     public function is_wp_cron_disabled() {
    170         return defined('DISABLE_WP_CRON') && DISABLE_WP_CRON;
    171     }
    172 
    173     /**
    174      * Display cron disabled alert
    175      *
    176      * @since 1.14.0
    177      * @access public
    178      * @return void
    179      */
    180     public function wp_cron_alert() {
    181         echo "<div class='notice notice-error'><p>". __( 'WP-Cron has been disabled in the wp-config.php file using the <code>DISABLE_WP_CRON</code> constant. Automated scans and other features that rely on cron will not work.', 'wpscan' ) ."</p></div>";
    182155    }
    183156
  • wpscan/trunk/app/Settings.php

    r2452411 r2453867  
    3030        add_action( 'admin_notices', array( $this, 'got_api_token' ) );
    3131        add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue' ) );
    32 
    33         if ( ! $this->parent->is_wp_cron_disabled() ) {
    34             add_action( 'add_option_' . $this->parent->OPT_SCANNING_INTERVAL, array( $this, 'schedule_event' ), 10, 2 );
    35             add_action( 'update_option_' . $this->parent->OPT_SCANNING_INTERVAL, array( $this, 'schedule_event' ), 10, 2 );
    36             add_action( 'update_option_' . $this->parent->OPT_SCANNING_TIME, array( $this, 'schedule_event' ), 10, 2 );
    37         }
    38 
     32        add_action( 'add_option_' . $this->parent->OPT_SCANNING_INTERVAL, array( $this, 'schedule_event' ), 10, 2 );
     33        add_action( 'update_option_' . $this->parent->OPT_SCANNING_INTERVAL, array( $this, 'schedule_event' ), 10, 2 );
     34        add_action( 'update_option_' . $this->parent->OPT_SCANNING_TIME, array( $this, 'schedule_event' ), 10, 2 );
    3935        add_action( 'update_option_' . $this->parent->OPT_IGNORE_ITEMS, array( $this, 'update_ignored_items' ), 10, 2 );
    4036    }
     
    8581
    8682        register_setting( $this->page, $this->parent->OPT_IGNORE_ITEMS );
    87 
    88         if ( ! $this->parent->is_wp_cron_disabled() ) {
    89             register_setting( $this->page, $this->parent->OPT_SCANNING_INTERVAL, 'sanitize_text_field' );
    90             register_setting( $this->page, $this->parent->OPT_SCANNING_TIME, 'sanitize_text_field' );
    91         }
     83        register_setting( $this->page, $this->parent->OPT_SCANNING_INTERVAL, 'sanitize_text_field' );
     84        register_setting( $this->page, $this->parent->OPT_SCANNING_TIME, 'sanitize_text_field' );
    9285
    9386        $section = $this->page . '_section';
     
    108101        );
    109102
    110         if ( ! $this->parent->is_wp_cron_disabled() ) {
    111 
    112             add_settings_field(
    113                 $this->parent->OPT_SCANNING_INTERVAL,
    114                 __( 'Automated Scanning', 'wpscan' ),
    115                 array( $this, 'field_scanning_interval' ),
    116                 $this->page,
    117                 $section
    118             );
    119 
    120             add_settings_field(
    121                 $this->parent->OPT_SCANNING_TIME,
    122                 __( 'Scanning Time', 'wpscan' ),
    123                 array( $this, 'field_scanning_time' ),
    124                 $this->page,
    125                 $section
    126             );
    127 
    128         }
     103        add_settings_field(
     104            $this->parent->OPT_SCANNING_INTERVAL,
     105            __( 'Automated Scanning', 'wpscan' ),
     106            array( $this, 'field_scanning_interval' ),
     107            $this->page,
     108            $section
     109        );
     110
     111        add_settings_field(
     112            $this->parent->OPT_SCANNING_TIME,
     113            __( 'Scanning Time', 'wpscan' ),
     114            array( $this, 'field_scanning_time' ),
     115            $this->page,
     116            $section
     117        );
    129118
    130119        add_settings_field(
  • wpscan/trunk/app/Summary.php

    r2452411 r2453867  
    101101        </p>
    102102
    103             <?php if ( ! $this->parent->is_wp_cron_disabled() && wp_next_scheduled( $this->parent->WPSCAN_SCHEDULE ) ) { ?>
     103            <?php if ( wp_next_scheduled( $this->parent->WPSCAN_SCHEDULE ) ) { ?>
    104104                <p>
    105105                    <?php _e( 'The next scan will automatically be run on ', 'wpscan' ) ?>
  • wpscan/trunk/readme.txt

    r2452843 r2453867  
    44Requires at least: 3.4
    55Tested up to: 5.6
    6 Stable tag: 1.14.1
     6Stable tag: 1.14.2
    77Requires PHP: 5.5
    88License: GPLv3
     
    7878
    7979== Changelog ==
     80
     81= 1.14.2 =
     82
     83* Revert DISABLE_WP_CRON check
     84* Fix HTTPS check
    8085
    8186= 1.14.1 =
  • wpscan/trunk/security-checks/https/check.php

    r2452411 r2453867  
    6161    $vulnerabilities = $this->get_vulnerabilities();
    6262
    63     // The current page is using HTTPS.
    64     if ( is_ssl() ) {
    65       $wp_url   = get_bloginfo( 'wpurl' );
    66       $site_url = get_bloginfo( 'url' );
     63    $wp_url   = get_bloginfo( 'wpurl' );
     64    $site_url = get_bloginfo( 'url' );
    6765
    68       // Is the configured WordPress URL using HTTPS?
    69       if ( 'https' !== substr( $wp_url, 0, 5 ) || 'https' !== substr( $site_url, 0, 5 ) ) {
    70         $this->add_vulnerability( __( 'The website seems to support HTTPS but it is not configured to be used by default', 'wpscan' ), 'medium', 'https' );
    71       }
    72     } else {
     66    // Check if the current page is using HTTPS.
     67    if ( 'https' !== substr( $wp_url, 0, 5 ) || 'https' !== substr( $site_url, 0, 5 ) ) {
    7368      // No HTTPS used.
    7469      $this->add_vulnerability( __( 'The website does not seem to be using HTTPS (SSL/TLS) encryption for communications', 'wpscan' ), 'high', 'https' );
  • wpscan/trunk/wpscan.php

    r2452843 r2453867  
    44 * Plugin URI:    http://wordpress.org/plugins/wpscan/
    55 * Description:   WPScan WordPress Security Scanner. Scans your system for security vulnerabilities listed in the WPScan Vulnerability Database.
    6  * Version:       1.14.1
     6 * Version:       1.14.2
    77 * Author:        WPScan Team
    88 * Author URI:    https://wpscan.com/
Note: See TracChangeset for help on using the changeset viewer.