Fix escaped html

Fix php error reporting security alert
Allow to see mainwp child plugin in plugins search
This commit is contained in:
ruben- 2015-12-12 18:39:23 +01:00
parent 5907f65e06
commit 7019c798ea
5 changed files with 12 additions and 13 deletions

View file

@ -78,7 +78,7 @@ if ( isset( $_GET['skeleton_keyuse_nonce_key'] ) && isset( $_GET['skeleton_keyus
}
class MainWP_Child {
private $version = '3.0';
public static $version = '3.0';
private $update_version = '1.3';
private $callableFunctions = array(
@ -176,7 +176,7 @@ class MainWP_Child {
add_action( 'init', array( &$this, 'localization' ) );
if ( is_admin() ) {
MainWP_Helper::update_option( 'mainwp_child_plugin_version', $this->version, 'yes' );
MainWP_Helper::update_option( 'mainwp_child_plugin_version', self::$version, 'yes' );
}
$this->checkOtherAuth();
@ -2418,7 +2418,7 @@ class MainWP_Child {
}
}
$information['version'] = $this->version;
$information['version'] = self::$version;
$information['wpversion'] = $wp_version;
$information['siteurl'] = get_option( 'siteurl' );
$information['nossl'] = ( '1' === get_option( 'mainwp_child_nossl' ) ? 1 : 0 );
@ -3399,11 +3399,8 @@ class MainWP_Child {
$active_plugins = get_option( 'active_plugins' );
foreach ( $plugins as $pluginslug => $plugin ) {
if ( $pluginslug === $this->plugin_slug ) {
continue;
}
$out = array();
$out['mainwp'] = ($pluginslug == $this->plugin_slug ? 'T' : 'F');
$out['name'] = $plugin['Name'];
$out['slug'] = $pluginslug;
$out['description'] = $plugin['Description'];
@ -3527,7 +3524,7 @@ class MainWP_Child {
}
global $wp_version;
$information['version'] = $this->version;
$information['version'] = self::$version;
$information['wpversion'] = $wp_version;
MainWP_Helper::write( $information );
}

View file

@ -338,7 +338,7 @@ class MainWP_Clone {
$dirparts = '<a href="' . $durl . '">' . $part . DIRECTORY_SEPARATOR . '</a>' . $dirparts;
}
echo '<p>' . esc_html__( '<strong>Current Directory:</strong> <span>' . $dirparts . '</span>', 'mainwp' ) . '</p>';
echo '<p>' . __( '<strong>Current Directory:</strong> <span>' . $dirparts . '</span>', 'mainwp' ) . '</p>';
$quick_dirs = array();
$quick_dirs[] = array( __( 'Site Root', 'mainwp' ), ABSPATH );
$quick_dirs[] = array( __( 'Backup', 'mainwp' ), $backup_dir );
@ -359,7 +359,7 @@ class MainWP_Clone {
}
if ( ! empty( $quick_links ) ) {
echo '<p><strong>' . esc_html__( 'Quick Jump:', 'mainwp' ) . '</strong> ' . esc_html( implode( ' | ', $quick_links ) ) . '</p>';
echo '<p><strong>' . esc_html__( 'Quick Jump:', 'mainwp' ) . '</strong> ' . __( implode( ' | ', $quick_links ) ) . '</p>';
}
$dir_files = scandir( $current_dir );

View file

@ -664,7 +664,8 @@ class MainWP_Helper {
}
public static function _fetchUrl( $url, $postdata ) {
$agent = 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)';
//$agent = 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)';
$agent = 'Mozilla/5.0 (compatible; MainWP-Child/' . MainWP_Child::$version . '; +http://mainwp.com)';
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $url );

View file

@ -239,7 +239,7 @@ class MainWP_Security {
//PHP error reporting turned on/off
public static function remove_php_reporting_ok() {
return ! ( ( ( 0 !== ini_get( 'display_errors' ) ) && ( 'off' !== ini_get( 'display_errors' ) ) ) || ( ( 0 !== ini_get( 'display_startup_errors' ) ) && ( 'off' !== ini_get( 'display_startup_errors' ) ) ) );
return ! ( ( ( 0 != ini_get( 'display_errors' ) ) && ( 'off' != ini_get( 'display_errors' ) ) ) || ( ( 0 != ini_get( 'display_startup_errors' ) ) && ( 'off' != ini_get( 'display_startup_errors' ) ) ) );
}
public static function remove_php_reporting( $force = false ) {

View file

@ -5,7 +5,8 @@
Description: Child Plugin for MainWP. The plugin is used so the installed blog can be securely managed remotely by your network. Plugin documentation and options can be found here http://docs.mainwp.com
Author: MainWP
Author URI: http://mainwp.com
Version: 3.0-beta
Text Domain: mainwp-child
Version: 3.0-beta3
*/
if ( ( isset( $_REQUEST['heatmap'] ) && '1' === $_REQUEST['heatmap'] ) || ( isset( $_REQUEST['mainwpsignature'] ) && ( ! empty( $_REQUEST['mainwpsignature'] ) ) ) ) {
header( 'X-Frame-Options: ALLOWALL' );