Companion Auto Update - Version 3.3.6

Version Description

(January 14, 2019) = * Security improvements

Download this release

Release Info

Developer Papin
Plugin Icon 128x128 Companion Auto Update
Version 3.3.6
Comparing to
See all releases

Code changes from version 3.3.5 to 3.3.6

admin/dashboard.php CHANGED
@@ -17,26 +17,25 @@
17
  global $wpdb;
18
  $table_name = $wpdb->prefix . "auto_updates";
19
 
20
- $plugins = $_POST['plugins'];
21
- $themes = $_POST['themes'];
22
- $minor = $_POST['minor'];
23
- $major = $_POST['major'];
24
- $translations = $_POST['translations'];
25
- $send = $_POST['cau_send'];
26
- $sendupdate = $_POST['cau_send_update'];
27
- $wpemails = $_POST['wpemails'];
28
-
29
  $email = sanitize_text_field( $_POST['cau_email'] );
30
 
31
- $wpdb->query( " UPDATE $table_name SET onoroff = '$plugins' WHERE name = 'plugins' " );
32
- $wpdb->query( " UPDATE $table_name SET onoroff = '$themes' WHERE name = 'themes' " );
33
- $wpdb->query( " UPDATE $table_name SET onoroff = '$minor' WHERE name = 'minor' " );
34
- $wpdb->query( " UPDATE $table_name SET onoroff = '$major' WHERE name = 'major' " );
35
- $wpdb->query( " UPDATE $table_name SET onoroff = '$translations' WHERE name = 'translations' " );
36
- $wpdb->query( " UPDATE $table_name SET onoroff = '$email' WHERE name = 'email' " );
37
- $wpdb->query( " UPDATE $table_name SET onoroff = '$send' WHERE name = 'send' " );
38
- $wpdb->query( " UPDATE $table_name SET onoroff = '$sendupdate' WHERE name = 'sendupdate' " );
39
- $wpdb->query( " UPDATE $table_name SET onoroff = '$wpemails' WHERE name = 'wpemails' " );
40
 
41
  echo '<div id="message" class="updated"><p><b>'.__( 'Settings saved.' ).'</b></p></div>';
42
 
17
  global $wpdb;
18
  $table_name = $wpdb->prefix . "auto_updates";
19
 
20
+ $plugins = sanitize_text_field( $_POST['plugins'] );
21
+ $themes = sanitize_text_field( $_POST['themes'] );
22
+ $minor = sanitize_text_field( $_POST['minor'] );
23
+ $major = sanitize_text_field( $_POST['major'] );
24
+ $translations = sanitize_text_field( $_POST['translations'] );
25
+ $send = sanitize_text_field( $_POST['cau_send'] );
26
+ $sendupdate = sanitize_text_field( $_POST['cau_send_update'] );
27
+ $wpemails = sanitize_text_field( $_POST['wpemails'] );
 
28
  $email = sanitize_text_field( $_POST['cau_email'] );
29
 
30
+ $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'plugins'", $plugins ) );
31
+ $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'themes'", $themes ) );
32
+ $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'minor'", $minor ) );
33
+ $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'major'", $major ) );
34
+ $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'translations'", $translations ) );
35
+ $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'email'", $email ) );
36
+ $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'send'", $send ) );
37
+ $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'sendupdate'", $sendupdate ) );
38
+ $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'wpemails'", $wpemails ) );
39
 
40
  echo '<div id="message" class="updated"><p><b>'.__( 'Settings saved.' ).'</b></p></div>';
41
 
admin/pluginlist.php CHANGED
@@ -16,11 +16,12 @@ if( isset( $_POST['submit'] ) ) {
16
  $noUpdateCount = 0;
17
 
18
  foreach ( $_POST['post'] as $key ) {
19
- $noUpdateList .= $key.', ';
20
  $noUpdateCount++;
21
  }
22
 
23
- $wpdb->query( " UPDATE $table_name SET onoroff = '$noUpdateList' WHERE name = 'notUpdateList' " );
 
24
  echo '<div id="message" class="updated"><p><b>'.__('Succes', 'companion-auto-update').' &ndash;</b> '.sprintf( esc_html__( '%1$s plugins have been added to the no-update-list', 'companion-auto-update' ), $noUpdateCount ).'.</p></div>';
25
  }
26
 
16
  $noUpdateCount = 0;
17
 
18
  foreach ( $_POST['post'] as $key ) {
19
+ $noUpdateList .= sanitize_text_field( $key ).', ';
20
  $noUpdateCount++;
21
  }
22
 
23
+ $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'notUpdateList'", $noUpdateList ) );
24
+
25
  echo '<div id="message" class="updated"><p><b>'.__('Succes', 'companion-auto-update').' &ndash;</b> '.sprintf( esc_html__( '%1$s plugins have been added to the no-update-list', 'companion-auto-update' ), $noUpdateCount ).'.</p></div>';
26
  }
27
 
admin/schedule.php CHANGED
@@ -12,10 +12,10 @@ if( isset( $_POST['submit'] ) ) {
12
  check_admin_referer( 'cau_save_schedule' );
13
 
14
  // Set variables
15
- $plugin_sc = $_POST['plugin_schedule'];
16
- $theme_sc = $_POST['theme_schedule'];
17
- $core_sc = $_POST['core_schedule'];
18
- $schedule_mail = $_POST['schedule_mail'];
19
 
20
 
21
  // First clear schedules
@@ -32,8 +32,8 @@ if( isset( $_POST['submit'] ) ) {
32
  if( $plugin_sc == 'daily' ) {
33
 
34
  $date = date( 'Y-m-d' );
35
- $hours = $_POST['pluginScheduleTimeH'];
36
- $minutes = $_POST['pluginScheduleTimeM'];
37
  $seconds = date( 's' );
38
  $fullDate = $date.' '.$hours.':'.$minutes.':'.$seconds;
39
  $pluginSetTime = strtotime( $fullDate );
@@ -52,8 +52,8 @@ if( isset( $_POST['submit'] ) ) {
52
  if( $theme_sc == 'daily' ) {
53
 
54
  $dateT = date( 'Y-m-d' );
55
- $hoursT = $_POST['ThemeScheduleTimeH'];
56
- $minutesT = $_POST['ThemeScheduleTimeM'];
57
  $secondsT = date( 's' );
58
  $fullDateT = $dateT.' '.$hoursT.':'.$minutesT.':'.$secondsT;
59
  $themeSetTime = strtotime( $fullDateT );
@@ -72,8 +72,8 @@ if( isset( $_POST['submit'] ) ) {
72
  if( $core_sc == 'daily' ) {
73
 
74
  $dateC = date( 'Y-m-d' );
75
- $hoursC = $_POST['CoreScheduleTimeH'];
76
- $minutesC = $_POST['CoreScheduleTimeM'];
77
  $secondsC = date( 's' );
78
  $fullDateC = $dateC.' '.$hoursC.':'.$minutesC.':'.$secondsC;
79
  $coreSetTime = strtotime( $fullDateC );
12
  check_admin_referer( 'cau_save_schedule' );
13
 
14
  // Set variables
15
+ $plugin_sc = sanitize_text_field( $_POST['plugin_schedule'] );
16
+ $theme_sc = sanitize_text_field( $_POST['theme_schedule'] );
17
+ $core_sc = sanitize_text_field( $_POST['core_schedule'] );
18
+ $schedule_mail = sanitize_text_field( $_POST['schedule_mail'] );
19
 
20
 
21
  // First clear schedules
32
  if( $plugin_sc == 'daily' ) {
33
 
34
  $date = date( 'Y-m-d' );
35
+ $hours = sanitize_text_field( $_POST['pluginScheduleTimeH'] );
36
+ $minutes = sanitize_text_field( $_POST['pluginScheduleTimeM'] );
37
  $seconds = date( 's' );
38
  $fullDate = $date.' '.$hours.':'.$minutes.':'.$seconds;
39
  $pluginSetTime = strtotime( $fullDate );
52
  if( $theme_sc == 'daily' ) {
53
 
54
  $dateT = date( 'Y-m-d' );
55
+ $hoursT = sanitize_text_field( $_POST['ThemeScheduleTimeH'] );
56
+ $minutesT = sanitize_text_field( $_POST['ThemeScheduleTimeM'] );
57
  $secondsT = date( 's' );
58
  $fullDateT = $dateT.' '.$hoursT.':'.$minutesT.':'.$secondsT;
59
  $themeSetTime = strtotime( $fullDateT );
72
  if( $core_sc == 'daily' ) {
73
 
74
  $dateC = date( 'Y-m-d' );
75
+ $hoursC = sanitize_text_field( $_POST['CoreScheduleTimeH'] );
76
+ $minutesC = sanitize_text_field( $_POST['CoreScheduleTimeM'] );
77
  $secondsC = date( 's' );
78
  $fullDateC = $dateC.' '.$hoursC.':'.$minutesC.':'.$secondsC;
79
  $coreSetTime = strtotime( $fullDateC );
admin/support.php CHANGED
@@ -5,7 +5,7 @@
5
  <ul>
6
  <li><a href="https://codeermeneer.nl/stuffs/faq-auto-updater/" target="_blank"><?php _e( 'Frequently Asked Questions', 'companion-auto-update' ); ?></a></li>
7
  <li><a href="https://wordpress.org/support/plugin/companion-auto-update" target="_blank"><?php _e( 'Support Forums' ); ?></a></li>
8
- <li><a href="<?php echo admin_url( cau_menloc().'?page=cau-settings&tab=status&cau_page=status' ); ?>"><?php _e( 'Systeminfo', 'companion-auto-update' ); ?> &raquo; <?php _e( 'Status', 'companion-auto-update' ); ?></a></li>
9
  </ul>
10
  </div><div class="welcome-column welcome-column welcome-column-third">
11
  <h3><?php _e( 'Want to contribute?', 'companion-auto-update' ); ?></h3>
5
  <ul>
6
  <li><a href="https://codeermeneer.nl/stuffs/faq-auto-updater/" target="_blank"><?php _e( 'Frequently Asked Questions', 'companion-auto-update' ); ?></a></li>
7
  <li><a href="https://wordpress.org/support/plugin/companion-auto-update" target="_blank"><?php _e( 'Support Forums' ); ?></a></li>
8
+ <li><a href="<?php echo admin_url( cau_menloc().'?page=cau-settings&tab=status&cau_page=status' ); ?>"><?php _e( 'Status', 'companion-auto-update' ); ?></a></li>
9
  </ul>
10
  </div><div class="welcome-column welcome-column welcome-column-third">
11
  <h3><?php _e( 'Want to contribute?', 'companion-auto-update' ); ?></h3>
cau_functions.php CHANGED
@@ -501,6 +501,7 @@ function cau_hideUpdateNag() {
501
  }
502
  }
503
  }
 
504
  add_action( 'admin_head', 'cau_hideUpdateNag', 100 );
505
 
506
  ?>
501
  }
502
  }
503
  }
504
+
505
  add_action( 'admin_head', 'cau_hideUpdateNag', 100 );
506
 
507
  ?>
companion-auto-update.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Companion Auto Update
4
  * Plugin URI: http://codeermeneer.nl/portfolio/companion-auto-update/
5
  * Description: This plugin auto updates all plugins, all themes and the wordpress core.
6
- * Version: 3.3.5
7
  * Author: Papin Schipper
8
  * Author URI: http://codeermeneer.nl/
9
  * Contributors: papin
3
  * Plugin Name: Companion Auto Update
4
  * Plugin URI: http://codeermeneer.nl/portfolio/companion-auto-update/
5
  * Description: This plugin auto updates all plugins, all themes and the wordpress core.
6
+ * Version: 3.3.6
7
  * Author: Papin Schipper
8
  * Author URI: http://codeermeneer.nl/
9
  * Contributors: papin
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/dakel/5/
4
  Tags: auto, automatic, background, update, updates, updating, automatic updates, automatic background updates, easy update, wordpress update, theme update, plugin update, up-to-date, security, update latest version, update core, update wp, update wp core, major updates, minor updates, update to new version, update core, update plugin, update plugins, update plugins automatically, update theme, plugin, theme, advance, control, mail, notifations, enable
5
  Requires at least: 3.5.0
6
  Tested up to: 5.0
7
- Stable tag: 3.3.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -71,6 +71,9 @@ For some reason this plugin seems to have trouble with updating themes by Elegan
71
 
72
  == Changelog ==
73
 
 
 
 
74
  = 3.3.5 (January 5, 2019) =
75
  * New: See WordPress & PHP version on the status page
76
  * New: WordPress core updates now show in status log
4
  Tags: auto, automatic, background, update, updates, updating, automatic updates, automatic background updates, easy update, wordpress update, theme update, plugin update, up-to-date, security, update latest version, update core, update wp, update wp core, major updates, minor updates, update to new version, update core, update plugin, update plugins, update plugins automatically, update theme, plugin, theme, advance, control, mail, notifations, enable
5
  Requires at least: 3.5.0
6
  Tested up to: 5.0
7
+ Stable tag: 3.3.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
71
 
72
  == Changelog ==
73
 
74
+ = 3.3.6 (January 14, 2019) =
75
+ * Security improvements
76
+
77
  = 3.3.5 (January 5, 2019) =
78
  * New: See WordPress & PHP version on the status page
79
  * New: WordPress core updates now show in status log