iThemes Sync - Version 2.0.18

Version Description

  • Bug Fix: Adding validation to manage-site verb
Download this release

Release Info

Developer layotte
Plugin Icon 128x128 iThemes Sync
Version 2.0.18
Comparing to
See all releases

Code changes from version 2.0.17 to 2.0.18

Files changed (5) hide show
  1. history.txt +2 -0
  2. init.php +1 -1
  3. lang/ithemes-sync.pot +3 -3
  4. readme.txt +4 -1
  5. verbs/manage-site.php +8 -0
history.txt CHANGED
@@ -215,3 +215,5 @@
215
  Enhancement: 2FA Authorization from Sync Dashbaord
216
  2.0.17 - 2019-08-13 - Lew Ayotte
217
  Bug Fix: Missing updater files from 2.0.16
 
 
215
  Enhancement: 2FA Authorization from Sync Dashbaord
216
  2.0.17 - 2019-08-13 - Lew Ayotte
217
  Bug Fix: Missing updater files from 2.0.16
218
+ 2.0.18 - 2019-10-07 - Lew Ayotte
219
+ Bug Fix: Adding validation to manage-site verb
init.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: iThemes Sync
4
  Plugin URI: http://ithemes.com/sync
5
  Description: Manage updates to your WordPress sites easily in one place.
6
  Author: iThemes
7
- Version: 2.0.17
8
  Author URI: http://ithemes.com/
9
  Domain Path: /lang/
10
  iThemes Package: ithemes-sync
4
  Plugin URI: http://ithemes.com/sync
5
  Description: Manage updates to your WordPress sites easily in one place.
6
  Author: iThemes
7
+ Version: 2.0.18
8
  Author URI: http://ithemes.com/
9
  Domain Path: /lang/
10
  iThemes Package: ithemes-sync
lang/ithemes-sync.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the iThemes Sync package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: iThemes Sync 2.0.17\n"
6
  "Report-Msgid-Bugs-To: http://ithemes.com/support/\n"
7
- "POT-Creation-Date: 2019-08-13 15:29:34+00:00\n"
8
  "PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -35,7 +35,7 @@ msgstr ""
35
  msgid "iThemes Sync is now hidden from your user again."
36
  msgstr ""
37
 
38
- #. #-#-#-#-# ithemes-sync.pot (iThemes Sync 2.0.17) #-#-#-#-#
39
  #. Plugin Name of the plugin/theme
40
  #: admin.php:179 admin.php:185 settings-page.php:268
41
  msgid "iThemes Sync"
2
  # This file is distributed under the same license as the iThemes Sync package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: iThemes Sync 2.0.18\n"
6
  "Report-Msgid-Bugs-To: http://ithemes.com/support/\n"
7
+ "POT-Creation-Date: 2019-10-08 17:06:31+00:00\n"
8
  "PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
35
  msgid "iThemes Sync is now hidden from your user again."
36
  msgstr ""
37
 
38
+ #. #-#-#-#-# ithemes-sync.pot (iThemes Sync 2.0.18) #-#-#-#-#
39
  #. Plugin Name of the plugin/theme
40
  #: admin.php:179 admin.php:185 settings-page.php:268
41
  msgid "iThemes Sync"
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: ithemes, layotte, blepoxp
3
  Tags: manage multiple Sites, backup, security, migrate, SEO, manage updates, administration, update manager, reports, sync, google analytics, optimize, uptime, ithemes, customize dashboard, client sites, maintenance, management, google webmaster tools, reporting
4
  Requires at least: 4.5
5
  Tested up to: 5.3
6
- Stable tag: 2.0.17
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/quick-guide-gplv3.html
9
 
@@ -86,6 +86,9 @@ Make steady, reliable income for WordPress maintenance with iThemes Sync Pro’s
86
 
87
  == Changelog ==
88
 
 
 
 
89
  = 2.0.17 =
90
  * Bug Fix: Fixing missing updater files from 2.0.16
91
 
3
  Tags: manage multiple Sites, backup, security, migrate, SEO, manage updates, administration, update manager, reports, sync, google analytics, optimize, uptime, ithemes, customize dashboard, client sites, maintenance, management, google webmaster tools, reporting
4
  Requires at least: 4.5
5
  Tested up to: 5.3
6
+ Stable tag: 2.0.18
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/quick-guide-gplv3.html
9
 
86
 
87
  == Changelog ==
88
 
89
+ = 2.0.18 =
90
+ * Bug Fix: Adding validation to manage-site verb
91
+
92
  = 2.0.17 =
93
  * Bug Fix: Fixing missing updater files from 2.0.16
94
 
verbs/manage-site.php CHANGED
@@ -10,6 +10,8 @@ Version History
10
  Initial version
11
  */
12
 
 
 
13
  class Ithemes_Sync_Verb_Manage_Site extends Ithemes_Sync_Verb {
14
  public static $name = 'manage-site';
15
  public static $description = 'Allows the site to be synced or unsynced from the Sync dashboard';
@@ -25,6 +27,12 @@ class Ithemes_Sync_Verb_Manage_Site extends Ithemes_Sync_Verb {
25
  public function run( $arguments ) {
26
  $arguments = Ithemes_Sync_Functions::merge_defaults( $arguments, $this->default_arguments );
27
 
 
 
 
 
 
 
28
  if ( empty( $arguments['action'] ) || ! in_array( $arguments['action'], array( 'sync', 'unsync' ) ) ) {
29
  return new WP_Error( 'missing-action', 'The action argument is missing or invalid. The action value should be sent in the action argument can contain the value `sync` or `unsync`.' );
30
  }
10
  Initial version
11
  */
12
 
13
+ require_once( $GLOBALS['ithemes_sync_path'] . '/server.php' );
14
+
15
  class Ithemes_Sync_Verb_Manage_Site extends Ithemes_Sync_Verb {
16
  public static $name = 'manage-site';
17
  public static $description = 'Allows the site to be synced or unsynced from the Sync dashboard';
27
  public function run( $arguments ) {
28
  $arguments = Ithemes_Sync_Functions::merge_defaults( $arguments, $this->default_arguments );
29
 
30
+ $validate = Ithemes_Sync_Server::validate( $arguments['site_id'], $arguments['it_username'], $arguments['site_key'] );
31
+
32
+ if ( is_wp_error( $validate ) ) {
33
+ return new WP_Error( 'invalid-credentials', $validate->get_error_message() );
34
+ }
35
+
36
  if ( empty( $arguments['action'] ) || ! in_array( $arguments['action'], array( 'sync', 'unsync' ) ) ) {
37
  return new WP_Error( 'missing-action', 'The action argument is missing or invalid. The action value should be sent in the action argument can contain the value `sync` or `unsync`.' );
38
  }