Changeset 1947563
- Timestamp:
- 09/26/2018 06:02:07 PM (8 years ago)
- Location:
- coschedule-by-todaymade
- Files:
-
- 9 added
- 4 edited
-
tags/3.2.2 (added)
-
tags/3.2.2/_access-denied.php (added)
-
tags/3.2.2/_missing-token.php (added)
-
tags/3.2.2/frame.php (added)
-
tags/3.2.2/plugin_setup.php (added)
-
tags/3.2.2/readme.txt (added)
-
tags/3.2.2/tm-scheduler.php (added)
-
trunk/_access-denied.php (added)
-
trunk/_missing-token.php (added)
-
trunk/frame.php (modified) (3 diffs)
-
trunk/plugin_setup.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/tm-scheduler.php (modified) (43 diffs)
Legend:
- Unmodified
- Added
- Removed
-
coschedule-by-todaymade/trunk/frame.php
r1733430 r1947563 2 2 if ( get_option( 'tm_coschedule_token' ) ) { 3 3 if ( current_user_can( 'edit_posts' ) ) { 4 $url = "https://app.coschedule.com/#/authenticate?calendarID=" . urlencode( get_option( 'tm_coschedule_calendar_id' ) );5 $url .= "&wordpressSiteID=" . urlencode( get_option( 'tm_coschedule_wordpress_site_id' ) );4 $url = "https://app.coschedule.com/#/authenticate?calendarID=" . rawurlencode( get_option( 'tm_coschedule_calendar_id' ) ); 5 $url .= "&wordpressSiteID=" . rawurlencode( get_option( 'tm_coschedule_wordpress_site_id' ) ); 6 6 $url .= "&redirect=" . $redirect . "&build=" . $this->build; 7 7 $url .= "&userID=" . $this->current_user_id; … … 9 9 $userToken = ''; 10 10 if ( isset( $_GET['tm_cos_user_token'] ) ) { 11 $userToken = $_GET['tm_cos_user_token'];11 $userToken = sanitize_text_field( $_GET['tm_cos_user_token'] ); 12 12 } 13 13 14 14 if ( isset( $userToken ) && ! empty( $userToken ) ) { 15 $url .= '&userToken=' . urlencode( $userToken );15 $url .= '&userToken=' . rawurlencode( $userToken ); 16 16 } 17 17 … … 42 42 <?php 43 43 } else { 44 include( '_access-denied.html' );44 include( plugin_dir_path( __FILE__ ) . '_access-denied.php' ); 45 45 } 46 46 } else { 47 include( '_missing-token.html' );47 include( plugin_dir_path( __FILE__ ) . '_missing-token.php' ); 48 48 } -
coschedule-by-todaymade/trunk/plugin_setup.php
r1920580 r1947563 178 178 <?php 179 179 } else { 180 include( plugin_dir_path( __FILE__ ) . '_access-denied. html' );180 include( plugin_dir_path( __FILE__ ) . '_access-denied.php' ); 181 181 } -
coschedule-by-todaymade/trunk/readme.txt
r1935815 r1947563 5 5 Requires at least: 3.5 6 6 Tested up to: 4.9.6 7 Stable tag: 3.2. 17 Stable tag: 3.2.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 90 90 91 91 == Changelog == 92 = 3.2.2 = 93 * Updates for WordPress VIP standards 94 92 95 = 3.2.1 = 93 96 * Removed a legacy fix for Edit Flow timestamps that has been addressed by the Edit Flow plugin. … … 327 330 328 331 == Upgrade Notice == 332 = 3.2.2 = 333 * Updates for WordPress VIP standards 334 329 335 = 3.2.1 = 330 336 * Removed a legacy fix for Edit Flow timestamps that has been addressed by the Edit Flow plugin. -
coschedule-by-todaymade/trunk/tm-scheduler.php
r1935815 r1947563 3 3 Plugin Name: CoSchedule 4 4 Description: Plan, organize, and execute every content marketing project in one place with CoSchedule, an all-in-one content marketing editorial calendar solution. 5 Version: 3.2. 15 Version: 3.2.2 6 6 Author: CoSchedule 7 7 Author URI: http://coschedule.com/ … … 12 12 if ( ! class_exists( 'tm_coschedule' ) ) { 13 13 14 // Include Http Class14 // include the Http Class 15 15 if ( ! class_exists( 'WP_Http' ) ) { 16 16 /** @noinspection PhpIncludeInspection */ … … 24 24 private $app = "https://app.coschedule.com"; 25 25 private $assets = "https://assets.coschedule.com"; 26 private $version = "3.2. 1";26 private $version = "3.2.2"; 27 27 private $build; 28 28 private $connected = false; … … 48 48 49 49 // Load variables 50 $this->build = intval( "8 1" );50 $this->build = intval( "82" ); 51 51 $this->token = get_option( 'tm_coschedule_token' ); 52 52 $this->calendar_id = get_option( 'tm_coschedule_calendar_id' ); … … 54 54 $this->synced_build = get_option( 'tm_coschedule_synced_build' ); 55 55 $this->is_wp_vip = ( defined( 'WPCOM_IS_VIP_ENV' ) && ( true === WPCOM_IS_VIP_ENV ) ); 56 $this->base64_decode_disabled = in_array( 'base64_decode', explode( ',', str_replace( ' ', '', ini_get( 'disable_functions' ) ) ) );56 $this->base64_decode_disabled = in_array( 'base64_decode', explode( ',', str_replace( ' ', '', ini_get( 'disable_functions' ) ) ), true ); 57 57 $this->use_wp_json_encode = function_exists( 'wp_json_encode' ); 58 58 … … 248 248 249 249 if ( ! array_key_exists('tm_coschedule_calendar', $submenu) ) { 250 $submenu['tm_coschedule_calendar'] = array(); 250 $submenu['tm_coschedule_calendar'] = array(); // WPCS: override ok. 251 251 } 252 252 … … 254 254 if ( true === $this->connected && $submenu['tm_coschedule_calendar'][1] && $submenu['tm_coschedule_calendar'][1][0] === "Open In Web App") { 255 255 $url = $this->app . '/#/calendar/' . $this->calendar_id . '/schedule'; 256 $submenu['tm_coschedule_calendar'][1] = array( '<span class="cos-submenu-new-window">Open In Web App</span>', 'edit_posts', esc_url( $url ) ); 256 $submenu['tm_coschedule_calendar'][1] = array( '<span class="cos-submenu-new-window">Open In Web App</span>', 'edit_posts', esc_url( $url ) ); // WPCS: override ok. 257 257 } 258 258 } … … 262 262 */ 263 263 public function admin_submenu_new_window_items_jquery() { 264 $cache_bust = urlencode( $this->get_cache_bust() );264 $cache_bust = rawurlencode( $this->get_cache_bust() ); 265 265 $url = $this->assets . '/plugin/js/cos-plugin-new-window.js?cb=' . $cache_bust; 266 266 wp_enqueue_script( 'cos_js_plugin_new_window', $url, false, null, true ); … … 288 288 */ 289 289 public function plugin_settings_scripts() { 290 $cache_bust = urlencode( $this->get_cache_bust() );290 $cache_bust = rawurlencode( $this->get_cache_bust() ); 291 291 wp_enqueue_style( 'cos_css', $this->assets . '/plugin/css/cos-plugin-setup.css?cb=' . $cache_bust ); 292 292 wp_enqueue_script( 'cos_js_config', $this->assets . '/config.js?cb=' . $cache_bust, false, null, true ); … … 299 299 public function plugin_calendar_page() { 300 300 if ( ! current_user_can( 'edit_posts' ) ) { 301 wp_die( __( 'You do not have sufficient permissions to access this page.') );301 wp_die( esc_html( __( 'You do not have sufficient permissions to access this page.' ) ) ); 302 302 } 303 303 304 304 // Check if connected 305 305 if ( true === $this->connected ) { 306 $redirect = 'schedule'; 307 include( sprintf( "%s/frame.php", dirname( __FILE__ ) ) ); 306 include( plugin_dir_path( __FILE__ ) . 'frame.php' ); 308 307 } else { 309 308 $this->plugin_settings_scripts(); 310 include( sprintf( "%s/plugin_setup.php", dirname( __FILE__ ) ));309 include( plugin_dir_path( __FILE__ ) . 'plugin_setup.php' ); 311 310 } 312 311 } … … 332 331 */ 333 332 public function meta_box_setup() { 334 if ( true == $this->meta_box_enabled() && true === $this->connected ) {333 if ( true === $this->meta_box_enabled() && true === $this->connected ) { 335 334 $this->metabox_iframe_styles(); 336 335 $this->metabox_iframe_scripts(); … … 352 351 */ 353 352 public function metabox_iframe_styles() { 354 $cache_bust = urlencode( $this->get_cache_bust() );353 $cache_bust = rawurlencode( $this->get_cache_bust() ); 355 354 $url = $this->assets . '/plugin/css/cos-metabox.css?cb=' . $cache_bust; 356 355 wp_enqueue_style( 'cos_metabox_css', $url ); … … 361 360 */ 362 361 public function metabox_iframe_scripts() { 363 $cache_bust = urlencode( $this->get_cache_bust() );362 $cache_bust = rawurlencode( $this->get_cache_bust() ); 364 363 $resizer_url = $this->assets . '/plugin/js/cos-iframe-resizer.js?cb=' . $cache_bust; 365 364 $resizer_exec_url = $this->assets . '/plugin/js/cos-iframe-resizer-exec.js?cb=' . $cache_bust; … … 377 376 $wordpress_site_id = get_option( 'tm_coschedule_wordpress_site_id' ); 378 377 $query_params = array( 379 "calendarID" => urlencode( $calendar_id ),380 "wordpressSiteID" => urlencode( $wordpress_site_id ),381 "postID" => urlencode( $post->ID ),382 "build" => urlencode( $this->build ),383 "userID" => urlencode( $this->current_user_id ),384 "isMetabox" => urlencode( 'true' )378 "calendarID" => rawurlencode( $calendar_id ), 379 "wordpressSiteID" => rawurlencode( $wordpress_site_id ), 380 "postID" => rawurlencode( $post->ID ), 381 "build" => rawurlencode( $this->build ), 382 "userID" => rawurlencode( $this->current_user_id ), 383 "isMetabox" => rawurlencode( 'true' ) 385 384 ); 386 385 $url = untrailingslashit( $this->app ) . "/#/authenticate"; … … 437 436 try { 438 437 if ( isset( $_GET['token'] ) ) { 439 $token = $_GET['token'];438 $token = sanitize_text_field( $_GET['token'] ); 440 439 } elseif ( isset( $data_args['token'] ) ) { 441 440 $token = $data_args['token']; … … 446 445 if ( true === $this->valid_token( $token ) ) { 447 446 448 if ( is_array( $_GET ) && array_key_exists( 'post_id', $_GET ) ) {449 $post_id = $_GET['post_id'];447 if ( is_array( $_GET ) && array_key_exists( 'post_id', $_GET ) && isset( $_GET['post_id'] )) { 448 $post_id = sanitize_text_field( $_GET['post_id'] ); 450 449 } elseif ( is_array( $data_args ) && array_key_exists( 'post_id', $data_args ) ) { 451 450 $post_id = $data_args['post_id']; … … 465 464 466 465 // if indication is wp_cron not run or disabled, force the issue // 467 if ( false === $wp_cron_response || 'disabled' == $wp_cron_response ) {466 if ( false === $wp_cron_response || 'disabled' === $wp_cron_response ) { 468 467 $publish_missed_schedule_posts_result = $this->publish_missed_schedule_posts( $post_id ); 469 468 } else { … … 520 519 $this->sanitize_param( $post_id ); 521 520 522 // download it to temporary spot // 523 $attachment_pointer = download_url( $url ); 524 $file_array = array( 525 'name' => basename( $url ), 526 ); 527 528 // track where in process // 529 $stage = 'download'; 530 531 // check for download errors // 521 $attachment_pointer = media_sideload_image( $url, $post_id, null, 'id' ); 522 523 // check for sideload error // 532 524 if ( ! is_wp_error( $attachment_pointer ) ) { 533 525 534 $file_array['tmp_name'] = $attachment_pointer; 535 536 // handle media, $post_id === 0 will not associate media with a post // 537 $attachment_pointer = media_handle_sideload( $file_array, $post_id ); 538 539 // track where in process // 540 $stage = 'sideload'; 541 542 // check for sideload error // 543 if ( ! is_wp_error( $attachment_pointer ) ) { 544 545 // extract url of attachment // 546 $response = array(); 547 $response['url'] = $url; 548 $response['attachment_url'] = wp_get_attachment_url( $attachment_pointer ); 549 550 // respond OK // 551 $this->respond_json_and_die( $response ); 552 553 return; 554 } else { 555 // failed, remove temporary file // 556 @unlink( $file_array['tmp_name'] ); 557 } 558 } 559 560 // report error // 561 if ( is_wp_error( $attachment_pointer ) ) { 562 throw new Exception( 'Sideload failed during ' . $stage . ' with WP Error: ' . $attachment_pointer->get_error_message() ); 526 // extract url of attachment // 527 $response = array(); 528 $response['url'] = $url; 529 $response['attachment_url'] = wp_get_attachment_url( $attachment_pointer ); 530 531 // respond OK // 532 $this->respond_json_and_die( $response ); 533 534 return; 563 535 } else { 564 throw new Exception( 'Sideload failed during ' . $stage . ' for unknown reason.');536 throw new Exception( 'Sideload failed during sideload with WP Error: ' . $attachment_pointer->get_error_message() ); 565 537 } 566 538 … … 656 628 $this->respond_json_and_die( $post ); 657 629 } catch ( Exception $e ) { 630 $data = array(); 658 631 $data['error'] = $e->getMessage(); 659 632 $this->respond_json_and_die( $data ); … … 682 655 exit; 683 656 } catch ( Exception $e ) { 657 $data = array(); 684 658 $data['error'] = $e->getMessage(); 685 659 $this->respond_json_and_die( $data ); … … 708 682 } 709 683 710 return wp_verify_nonce( $_GET[ 'cos_preview' ], 'coschedule_preview_' . $this->token .' _post_id-' . $posts[0]->ID );684 return wp_verify_nonce( sanitize_text_field( $_GET[ 'cos_preview' ] ), 'coschedule_preview_' . $this->token .' _post_id-' . $posts[0]->ID ); 711 685 } 712 686 … … 813 787 814 788 // Sanitize $_POST or $_GET params 815 if ( isset( $_POST['token'] ) && isset( $_POST['calendar_id'] ) && isset( $_POST['wordpress_site_id'] ) ) { 816 $params['token'] = $_POST['token'];817 $params['calendar_id'] = $_POST['calendar_id'];818 $params['wordpress_site_id'] = $_POST['wordpress_site_id'];789 if ( isset( $_POST['token'] ) && isset( $_POST['calendar_id'] ) && isset( $_POST['wordpress_site_id'] ) ) { // WPCS: CSRF ok. 790 $params['token'] = sanitize_text_field( $_POST['token'] ); 791 $params['calendar_id'] = sanitize_text_field( $_POST['calendar_id'] ); 792 $params['wordpress_site_id'] = sanitize_text_field( $_POST['wordpress_site_id'] ); 819 793 } elseif ( isset( $_GET['token'] ) && isset( $_GET['calendar_id'] ) && isset( $_GET['wordpress_site_id'] ) ) { 820 $params['token'] = $_GET['token'];821 $params['calendar_id'] = $_GET['calendar_id'];822 $params['wordpress_site_id'] = $_GET['wordpress_site_id'];794 $params['token'] = sanitize_text_field( $_GET['token'] ); 795 $params['calendar_id'] = sanitize_text_field( $_GET['calendar_id'] ); 796 $params['wordpress_site_id'] = sanitize_text_field( $_GET['wordpress_site_id'] ); 823 797 } elseif ( isset( $data_args['token'] ) && isset( $data_args['calendar_id'] ) && isset( $data_args['wordpress_site_id'] ) ) { 824 798 $params['token'] = $data_args['token']; … … 851 825 try { 852 826 if ( isset( $_GET['token'] ) ) { 853 $token = $_GET['token'];827 $token = sanitize_text_field( $_GET['token'] ); 854 828 } else { 855 829 $token = $data_args['token']; … … 874 848 try { 875 849 if ( isset( $_GET['post_types_list'] ) ) { 876 $list = $_GET['post_types_list'];850 $list = sanitize_text_field( $_GET['post_types_list'] ); 877 851 } elseif ( isset( $data_args['post_types_list'] ) ) { 878 852 $list = $data_args['post_types_list']; … … 899 873 public function tm_aj_action() { 900 874 try { 901 // favor POST values for compatibility //902 if ( isset( $_POST['action'] ) ) { // plugin_build > 40 will prefer POST903 $args = $_POST; 904 } else { // fallback to GET params //875 // favor POST values for compatibility, fallback to GET params (plugin_build > 40 will prefer POST) 876 if ( isset( $_POST['action'] ) ) { 877 $args = $_POST; // WPCS: CSRF ok. 878 } else { 905 879 $args = $_GET; 906 880 } … … 969 943 // do not allow some functions when in WP-VIP environments 970 944 if ( true === $this->is_wp_vip ) { 971 unset( $defer_token_check[ array_search( 'tm_aj_trigger_cron', $defer_token_check ) ] );972 unset( $private_functions[ array_search( 'tm_aj_trigger_cron', $private_functions ) ] );945 unset( $defer_token_check[ array_search( 'tm_aj_trigger_cron', $defer_token_check, true ) ] ); 946 unset( $private_functions[ array_search( 'tm_aj_trigger_cron', $private_functions, true ) ] ); 973 947 } 974 948 … … 977 951 978 952 // Validate allowed 979 if ( ! in_array( $func, $allowed ) ) {953 if ( ! in_array( $func, $allowed, true ) ) { 980 954 throw new Exception( 'Invalid API call. Method not allowed.' ); 981 955 } 982 956 983 957 // Only invoke validation for those functions not having it internally 984 if ( ! in_array( $func, $defer_token_check ) ) {958 if ( ! in_array( $func, $defer_token_check, true ) ) { 985 959 // Validate 'token' arg 986 960 if ( ! isset( $args['token'] ) ) { … … 998 972 999 973 // Is the target function private ? 1000 $is_private = in_array( $func, $private_functions );974 $is_private = in_array( $func, $private_functions, true ); 1001 975 1002 976 // wrap model in order to preserve it through call_user_func_array invocation // … … 1069 1043 /** @noinspection PhpIncludeInspection */ 1070 1044 /** @noinspection PhpUndefinedMethodInspection */ 1071 require_once trailingslashit( $wp_filesystem->wp_plugins_dir() ) . 'jetpack/modules/markdown/easy-markdown.php'; 1045 $plugins_path = trailingslashit( $wp_filesystem->wp_plugins_dir() ); 1046 require_once( $plugins_path . 'jetpack/modules/markdown/easy-markdown.php' ); 1072 1047 1073 1048 if ( class_exists( 'WPCom_Markdown' ) ) { … … 1094 1069 // Validate call 1095 1070 if ( isset( $_GET['token'] ) ) { 1096 $token = $_GET['token'];1071 $token = sanitize_text_field( $_GET['token'] ); 1097 1072 } else { 1098 1073 $token = $data_args['token']; … … 1171 1146 $the_excerpt = html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ); 1172 1147 $excerpt_length = 35; // Sets excerpt length by word count 1173 $the_excerpt = strip_tags( strip_shortcodes( $the_excerpt ) ); //Strips tags and images1148 $the_excerpt = wp_strip_all_tags( strip_shortcodes( $the_excerpt ) ); //Strips tags and images 1174 1149 $words = explode( ' ', $the_excerpt, $excerpt_length + 1 ); 1175 1150 … … 1359 1334 1360 1335 // Check if post type is supported 1361 return in_array( $post_type, $custom_post_types_list_array );1336 return in_array( $post_type, $custom_post_types_list_array, true ); 1362 1337 } 1363 1338 … … 1408 1383 // This exists to ensure that if a user loads an older post in the WordPress dashboard that the metabox properly loads as we only retain the most recent 500 posts. 1409 1384 if ( isset( $_GET['post'] ) ) { 1410 $post_id = $_GET['post'];1385 $post_id = sanitize_text_field( $_GET['post'] ); 1411 1386 $this->sanitize_param( $post_id ); 1412 1387 $this->sync_post_callback( $post_id ); … … 1573 1548 public function save_timezone_callback() { 1574 1549 if ( true === $this->connected ) { 1575 $params = array(); 1576 1577 if ( $timezone_string = get_option( 'timezone_string' ) ) { 1550 $params = array(); 1551 $timezone_string = get_option( 'timezone_string' ); 1552 $gmt_offset = get_option( 'gmt_offset' ); 1553 1554 if ( $timezone_string ) { 1578 1555 $params['timezone_string'] = $timezone_string; 1579 1556 } 1580 if ( $gmt_offset = get_option( 'gmt_offset' )) {1557 if ( $gmt_offset ) { 1581 1558 $params['gmt_offset'] = $gmt_offset; 1582 1559 } … … 1591 1568 public function save_blogname_callback() { 1592 1569 if ( true === $this->connected ) { 1593 $params = array(); 1594 1595 if ( $blogname = get_option( 'blogname' ) ) { 1570 $params = array(); 1571 $blogname = get_option( 'blogname' ); 1572 1573 if ( $blogname ) { 1596 1574 $params['blogname'] = $blogname; 1597 1575 } … … 1859 1837 } elseif ( isset( $_REQUEST['post_type'] ) ) { 1860 1838 //lastly check the post_type querystring 1861 $type = $_REQUEST['post_type'];1839 $type = sanitize_text_field( $_REQUEST['post_type'] ); 1862 1840 $this->sanitize_param( $type ); 1863 1841 } else { … … 1924 1902 */ 1925 1903 public function publish_missed_schedule_posts( $post_id ) { 1926 global $wpdb;1927 1904 $publish_missed_schedule_posts_response = array(); 1928 1905 … … 1932 1909 1933 1910 if ( is_numeric( $post_id ) ) { 1934 $qry = "SELECT ID FROM {$wpdb->posts} " . 1935 "WHERE ID = %d " . 1936 "AND ( ( post_date > 0 && post_date <= %s ) ) " . 1937 "AND post_status = 'future' " . 1938 "LIMIT 1"; 1939 $sql = $wpdb->prepare( $qry, $post_id, $post_date ); 1911 $args = array( 1912 'p' => $post_id, 1913 'post_status' => array( 'future' ), 1914 'date_query' => array( 1915 array( 1916 'before' => $post_date, 1917 ), 1918 ), 1919 ); 1940 1920 } else { 1941 $qry = "SELECT ID FROM {$wpdb->posts} " . 1942 "WHERE ( ( post_date > 0 && post_date <= %s ) ) " . 1943 "AND post_status = 'future' " . 1944 "LIMIT 0,10"; 1945 $sql = $wpdb->prepare( $qry, $post_date ); 1946 } 1947 $post_ids = $wpdb->get_col( $sql ); 1921 $args = array( 1922 'post_status' => array( 'future' ), 1923 'posts_per_page' => '10', 1924 'order' => 'ASC', 1925 'orderby' => 'post_date', 1926 'date_query' => array( 1927 array( 1928 'before' => $post_date, 1929 ), 1930 ), 1931 ); 1932 } 1933 $query = new WP_Query( $args ); 1934 $post_ids = wp_list_pluck( $query->posts, 'ID' ); 1948 1935 1949 1936 $count_missed_schedule = count( $post_ids ); … … 1956 1943 continue; 1957 1944 } 1958 // !!! LET THE MAGIC HAPPEN !!! //1959 1945 wp_publish_post( $post_id ); 1960 1946 } … … 2001 1987 if ( isset( $data ) ) { 2002 1988 if ( true === $is_json ) { 2003 // adapt_json_encode will handle data escape // 2004 $data = $this->adapt_json_encode( $data ); 1989 if ( $this->use_wp_json_encode ) { 1990 echo wp_json_encode( $data ); 1991 } else { 1992 echo json_encode( $data ); 1993 } 2005 1994 } else { 2006 $this->sanitize_param( $data);1995 echo esc_html( esc_sql( $data ) ); 2007 1996 } 2008 echo $data;2009 1997 } 2010 1998 2011 1999 } catch ( Exception $e ) { 2012 2000 header( 'Content-Type: text/plain' ); 2013 echo 'Exception in respond_and_die(...): ' . $e->getMessage();2001 echo esc_html( __( 'Exception in respond_and_die(...): ' . $e->getMessage() ) ); 2014 2002 } 2015 2003 … … 2064 2052 2065 2053 $output = $output . chr( (int) $chr1 ); 2066 if ( $enc3 != 64 ) {2054 if ( $enc3 !== 64 ) { 2067 2055 $output = $output . chr( (int) $chr2 ); 2068 2056 } 2069 if ( $enc4 != 64 ) {2057 if ( $enc4 !== 64 ) { 2070 2058 $output = $output . chr( (int) $chr3 ); 2071 2059 } … … 2137 2125 // Version guard to avoid blowing up in unsupported versions 2138 2126 if ( version_compare( $wp_version, $coschedule_min_wp_version, '<' ) ) { 2139 if ( isset( $_REQUEST['action'] ) && ( 'error_scrape' == $_REQUEST['action'] ) ) {2127 if ( isset( $_REQUEST['action'] ) && ( 'error_scrape' === $_REQUEST['action'] ) ) { 2140 2128 2141 2129 $plugin_data = get_plugin_data( __FILE__, false ); … … 2147 2135 $activation_error .= '</div>'; 2148 2136 2149 die( $activation_error); // die() to stop execution2137 die( esc_html( __( $activation_error ) ) ); // die() to stop execution 2150 2138 } else { 2151 trigger_error( $ignore, E_USER_ERROR ); // throw an error, execution flow returns2139 trigger_error( esc_html( __( $ignore ) ), E_USER_ERROR ); // throw an error, execution flow returns 2152 2140 } 2153 2141 // note, no need for return here as error or die will return execution to caller
Note: See TracChangeset
for help on using the changeset viewer.