InfiniteWP Client - Version 1.3.2

Version Description

  • Fix: Dropbox backup upload in single call more then 50MB file not uploading issue.
Download this release

Release Info

Developer infinitewp
Plugin Icon 128x128 InfiniteWP Client
Version 1.3.2
Comparing to
See all releases

Code changes from version 1.2.15 to 1.3.2

Files changed (43) hide show
  1. addons/backup_repository/backup_repository.class.php +5 -47
  2. addons/brokenlinks/brokenlinks.class.php +7 -7
  3. addons/file_editor/file_editor.class.php +9 -9
  4. addons/google_webmasters/google_webmasters.class.php +1 -0
  5. addons/manage_users/user.class.php +12 -12
  6. addons/post_links/link.class.php +1 -1
  7. addons/post_links/post.class.php +8 -8
  8. addons/wordfence/wordfence.class.php +1 -1
  9. backup.class.multicall.php +6114 -0
  10. backup.class.php → backup.class.singlecall.php +1057 -916
  11. core.class.php +64 -11
  12. helper.class.php +21 -21
  13. init.php +251 -68
  14. installer.class.php +37 -37
  15. lib/Google/Auth/Abstract.php +41 -41
  16. lib/Google/Auth/AssertionCredentials.php +133 -133
  17. lib/Google/Auth/Exception.php +22 -22
  18. lib/Google/Auth/LoginTicket.php +69 -69
  19. lib/Google/Auth/OAuth2.php +587 -587
  20. lib/Google/Auth/Simple.php +92 -92
  21. lib/Google/Cache/Abstract.php +53 -53
  22. lib/Google/Cache/Apc.php +73 -73
  23. lib/Google/Cache/Exception.php +21 -21
  24. lib/Google/Cache/File.php +145 -145
  25. lib/Google/Cache/Memcache.php +137 -137
  26. lib/Google/Cache/Null.php +56 -56
  27. lib/Google/Client.php +608 -608
  28. lib/Google/Collection.php +94 -94
  29. lib/Google/Config.php +315 -315
  30. lib/Google/Exception.php +20 -20
  31. lib/Google/Http/Batch.php +143 -143
  32. lib/Google/Http/CacheParser.php +184 -184
  33. lib/Google/Http/MediaFileUpload.php +304 -305
  34. lib/Google/Http/REST.php +139 -139
  35. lib/Google/Http/Request.php +476 -476
  36. lib/Google/IO/Abstract.php +312 -312
  37. lib/Google/IO/Curl.php +135 -135
  38. lib/Google/IO/Exception.php +22 -22
  39. lib/Google/IO/Stream.php +182 -182
  40. lib/Google/IO/cacerts.pem +2183 -2183
  41. lib/Google/Model.php +250 -250
  42. lib/Google/Service.php +39 -39
  43. lib/Google/Service/Drive.php +0 -2079
addons/backup_repository/backup_repository.class.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- class IWP_MMB_Backup_Repository extends IWP_MMB_Backup
3
  {
4
  /*var $site_name;
5
  var $statuses;
@@ -33,7 +33,7 @@ class IWP_MMB_Backup_Repository extends IWP_MMB_Backup
33
  }*/
34
 
35
  function backup_repository($args){
36
-
37
  if (!empty($args))
38
  extract($args);
39
 
@@ -53,6 +53,7 @@ class IWP_MMB_Backup_Repository extends IWP_MMB_Backup
53
  $backup_file = $results[count($results) - 1]['server']['file_path'];
54
  }
55
 
 
56
  if ($backup_file && file_exists($backup_file)) {
57
  //FTP, Amazon S3 or Dropbox
58
  if (isset($account_info['iwp_ftp']) && !empty($account_info)) {
@@ -80,50 +81,7 @@ class IWP_MMB_Backup_Repository extends IWP_MMB_Backup
80
  $return = $this->dropbox_backup($account_info['iwp_dropbox']);
81
  $this->update_status($task_name, 'dropbox', true);
82
  iwp_mmb_print_flush('Dropbox upload: End');
83
- }
84
-
85
- if (isset($account_info['iwp_gdrive']) && !empty($account_info['iwp_gdrive'])) {
86
-
87
- $this->update_status($task_name,'gDrive');
88
- $account_info['iwp_gdrive']['backup_file'] = $backup_file;
89
- iwp_mmb_print_flush('google Drive upload: Start');
90
- $gdrive_result = $this->google_drive_backup($account_info['iwp_gdrive']);
91
- $this->update_status($task_name, 'gDrive', true);
92
- iwp_mmb_print_flush('google Drive upload: End');
93
-
94
- if ($gdrive_result == false && $del_host_file) {
95
- @unlink($backup_file);
96
- $return = false;
97
- }
98
-
99
- if (is_array($gdrive_result) && isset($gdrive_result['error'])) {
100
- return $gdrive_result;
101
- }
102
-
103
- //update the tasks different method for gDrive
104
-
105
- if(!empty($gdrive_result))
106
- {
107
- $tasks = $this->tasks;
108
- $task = $tasks['Backup Now'];
109
- $results = $task['task_results'];
110
- if (is_array($results) && count($results)) {
111
- $results[count($results) - 1]['gDrive'] = $gdrive_result;
112
- //$results[count($results) - 1]['gDriveOrgFileName'] = basename($backup_url); //not required
113
- unset($results[count($results) - 1]['server']);
114
- }
115
-
116
- /* $paths['gDrive'] = $gdrive_result; //different from other upload ; storing the gDrive backupfile ID in the paths array for delete operation
117
- $paths['gDriveOrgFileName'] = basename($backup_url); */
118
-
119
- $tasks['Backup Now']['task_results'] = $results;
120
- $this->tasks = $tasks;
121
-
122
- $this->update_status($task_name,'gDrive', true);
123
- unset($paths['server']);
124
- $return = true;
125
- }
126
- }
127
 
128
  if ($return == true && $del_host_file) {
129
  @unlink($backup_file);
@@ -135,7 +93,7 @@ class IWP_MMB_Backup_Repository extends IWP_MMB_Backup
135
 
136
  } else {
137
  $return = array(
138
- 'error' => 'Backup file not found on your server. Please try again.'
139
  );
140
  }
141
 
1
  <?php
2
+ class IWP_MMB_Backup_Repository extends IWP_MMB_Backup_Singlecall
3
  {
4
  /*var $site_name;
5
  var $statuses;
33
  }*/
34
 
35
  function backup_repository($args){
36
+
37
  if (!empty($args))
38
  extract($args);
39
 
53
  $backup_file = $results[count($results) - 1]['server']['file_path'];
54
  }
55
 
56
+
57
  if ($backup_file && file_exists($backup_file)) {
58
  //FTP, Amazon S3 or Dropbox
59
  if (isset($account_info['iwp_ftp']) && !empty($account_info)) {
81
  $return = $this->dropbox_backup($account_info['iwp_dropbox']);
82
  $this->update_status($task_name, 'dropbox', true);
83
  iwp_mmb_print_flush('Dropbox upload: End');
84
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
 
86
  if ($return == true && $del_host_file) {
87
  @unlink($backup_file);
93
 
94
  } else {
95
  $return = array(
96
+ 'error' => 'Backup file not found on your server. Please try again.', 'error_code' => 'backup_file_not_found_on_server'
97
  );
98
  }
99
 
addons/brokenlinks/brokenlinks.class.php CHANGED
@@ -105,7 +105,7 @@ class IWP_MMB_BLC extends IWP_MMB_Core
105
  }
106
  return $success;
107
  } else {
108
- return array('error'=>"Broken Link Checker plugin is not activated");
109
  }
110
  }
111
 
@@ -118,7 +118,7 @@ class IWP_MMB_BLC extends IWP_MMB_Core
118
  $rez['linkType']=$params['linkType'];
119
  return $rez;
120
  } else {
121
- return array('error'=>"Broken Link Checker plugin is not activated");
122
  }
123
  }
124
 
@@ -133,7 +133,7 @@ class IWP_MMB_BLC extends IWP_MMB_Core
133
  $rez['linkType']=$params['linkType'];
134
  return $rez;
135
  } else {
136
- return array('error'=>"Broken Link Checker plugin is not activated");
137
  }
138
  }
139
 
@@ -153,11 +153,11 @@ class IWP_MMB_BLC extends IWP_MMB_Core
153
  if ( $link->save() ){
154
  $rez = array('old_link_id'=>$params['linkID'],'linkType'=>$params['linkType'],'marked'=>1);
155
  } else {
156
- $rez = array('error'=>'Action couldn\'t be completed');
157
  }
158
  return $rez;
159
  } else {
160
- return array('error'=>"Broken Link Checker plugin is not activated");
161
  }
162
  }
163
  function blc_dismiss_link($params){
@@ -179,11 +179,11 @@ class IWP_MMB_BLC extends IWP_MMB_Core
179
  if ( $link->save() ){
180
  $rez = array('old_link_id'=>$params['linkID'],'linkType'=>$params['linkType'],'dismissvalue_set'=>1);
181
  } else {
182
- $rez = array('error'=>'Action couldn\'t be completed');
183
  }
184
  return $rez;
185
  } else {
186
- return array('error'=>"Broken Link Checker plugin is not activated");
187
  }
188
  }
189
 
105
  }
106
  return $success;
107
  } else {
108
+ return array('error'=>"Broken Link Checker plugin is not activated", 'error_code' => 'blc_plugin_not_activated_blc_get_all_links');
109
  }
110
  }
111
 
118
  $rez['linkType']=$params['linkType'];
119
  return $rez;
120
  } else {
121
+ return array('error'=>"Broken Link Checker plugin is not activated", 'error_code' => 'blc_plugin_not_activated_blc_update_link');
122
  }
123
  }
124
 
133
  $rez['linkType']=$params['linkType'];
134
  return $rez;
135
  } else {
136
+ return array('error'=>"Broken Link Checker plugin is not activated", 'error_code' => 'blc_plugin_not_activated_blc_unlink');
137
  }
138
  }
139
 
153
  if ( $link->save() ){
154
  $rez = array('old_link_id'=>$params['linkID'],'linkType'=>$params['linkType'],'marked'=>1);
155
  } else {
156
+ $rez = array('error'=>'Action couldn\'t be completed', 'error_code' => 'blc_plugin_action_couldnt_completed_blc_mark_as_not_broken');
157
  }
158
  return $rez;
159
  } else {
160
+ return array('error'=>"Broken Link Checker plugin is not activated", 'error_code' => 'blc_plugin_not_activated_blc_mark_as_not_broken');
161
  }
162
  }
163
  function blc_dismiss_link($params){
179
  if ( $link->save() ){
180
  $rez = array('old_link_id'=>$params['linkID'],'linkType'=>$params['linkType'],'dismissvalue_set'=>1);
181
  } else {
182
+ $rez = array('error'=>'Action couldn\'t be completed', 'error_code' => 'blc_plugin_action_couldnt_completed_blc_set_dismiss_status');
183
  }
184
  return $rez;
185
  } else {
186
+ return array('error'=>"Broken Link Checker plugin is not activated", 'error_code' => 'blc_plugin_not_activated_blc_set_dismiss_status');
187
  }
188
  }
189
 
addons/file_editor/file_editor.class.php CHANGED
@@ -193,14 +193,14 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
193
  extract($params);
194
  if (!function_exists('gzinflate')) {
195
  return array(
196
- 'error' => 'Gzip library functions are not available.'
197
  );
198
  }else{
199
  $fileContent = gzinflate($fileContent);
200
  }
201
  if (!$this->is_server_writable()) {
202
  return array(
203
- 'error' => 'Failed, please add FTP details'
204
  );
205
  }
206
 
@@ -208,14 +208,14 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
208
  ob_start();
209
  if (false === ($creds = request_filesystem_credentials($url, '', false, ABSPATH, null) ) ) {
210
  return array(
211
- 'error' => 'Unable to get file system credentials'
212
  ); // stop processing here
213
  }
214
  ob_end_clean();
215
 
216
  if ( ! WP_Filesystem($creds, ABSPATH) ) {
217
  return array(
218
- 'error' => 'Unable to initiate file system. Please check you have entered valid FTP credentials.'
219
  ); // stop processing here
220
  }
221
 
@@ -229,7 +229,7 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
229
  $is_dir_created = mkdir($new_temp_folder);// new folder should be empty
230
  if(!$is_dir_created){
231
  return array(
232
- 'error' => 'Unable to create a temporary directory.'
233
  );
234
  }
235
 
@@ -238,19 +238,19 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
238
  $remote_abspath = trailingslashit($remote_abspath);
239
  }else{
240
  return array(
241
- 'error' => 'Unable to locate WP root directory using file system.'
242
  );
243
  }
244
 
245
  if($folderPath == 'root' && ($filePath == 'wp-config' || $filePath == 'wp-config.php' ) ){
246
  return array(
247
- 'error' => 'wp-config file is not allowed.'
248
  );
249
  }
250
 
251
  $file = $this->get_file_editor_vars($remote_abspath,$folderPath,$filePath,$ext);
252
  if($file === false){
253
- return array('error' => 'File path given is invalid.');
254
  }
255
 
256
  $new_temp_subfolders = $new_temp_folder;
@@ -259,7 +259,7 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
259
  $is_subdir_created = mkdir($new_temp_subfolders);// new folder should be empty
260
  if(!$is_subdir_created){
261
  return array(
262
- 'error' => 'Unable to create a temporary directory.'
263
  );
264
  }
265
  }
193
  extract($params);
194
  if (!function_exists('gzinflate')) {
195
  return array(
196
+ 'error' => 'Gzip library functions are not available.', 'error_code' => 'gzip_library_functions_are_not_available'
197
  );
198
  }else{
199
  $fileContent = gzinflate($fileContent);
200
  }
201
  if (!$this->is_server_writable()) {
202
  return array(
203
+ 'error' => 'Failed, please add FTP details', 'error_code' => 'failed_please_add_FTP_details_file_editor_upload'
204
  );
205
  }
206
 
208
  ob_start();
209
  if (false === ($creds = request_filesystem_credentials($url, '', false, ABSPATH, null) ) ) {
210
  return array(
211
+ 'error' => 'Unable to get file system credentials', 'error_code' => 'unable_to_get_file_system_credentials_file_editor_upload'
212
  ); // stop processing here
213
  }
214
  ob_end_clean();
215
 
216
  if ( ! WP_Filesystem($creds, ABSPATH) ) {
217
  return array(
218
+ 'error' => 'Unable to initiate file system. Please check you have entered valid FTP credentials.', 'error_code' => 'unable_to_initiate_file_system_check_ftp_credentials_file_editor_upload'
219
  ); // stop processing here
220
  }
221
 
229
  $is_dir_created = mkdir($new_temp_folder);// new folder should be empty
230
  if(!$is_dir_created){
231
  return array(
232
+ 'error' => 'Unable to create a temporary directory.', 'error_code' => 'unable_to_create_temporary_directory_file_editor_upload'
233
  );
234
  }
235
 
238
  $remote_abspath = trailingslashit($remote_abspath);
239
  }else{
240
  return array(
241
+ 'error' => 'Unable to locate WP root directory using file system.', 'error_code' => 'unable_to_locate_root_directory_remote_abspath_file_editor_upload'
242
  );
243
  }
244
 
245
  if($folderPath == 'root' && ($filePath == 'wp-config' || $filePath == 'wp-config.php' ) ){
246
  return array(
247
+ 'error' => 'wp-config file is not allowed.', 'error_code' => 'config_file_is_not_allowed_file_editor_upload'
248
  );
249
  }
250
 
251
  $file = $this->get_file_editor_vars($remote_abspath,$folderPath,$filePath,$ext);
252
  if($file === false){
253
+ return array('error' => 'File path given is invalid.', 'error_code' => 'file_path_given_is_invalid_file_editor_upload');
254
  }
255
 
256
  $new_temp_subfolders = $new_temp_folder;
259
  $is_subdir_created = mkdir($new_temp_subfolders);// new folder should be empty
260
  if(!$is_subdir_created){
261
  return array(
262
+ 'error' => 'Unable to create a temporary directory.', 'error_code' => 'unable_to_locate_wp_root_directory_using_file_system_file_editor_upload'
263
  );
264
  }
265
  }
addons/google_webmasters/google_webmasters.class.php CHANGED
@@ -9,6 +9,7 @@ if(!function_exists('iwp_mmb_create_webmasters_redirect_table')){
9
  global $wpdb;
10
 
11
  $IWP_MMB_WEBMASTERS_REDIRECT_TABLE_VERSION = get_site_option( 'iwp_webmasters_redirect_table_version' );
 
12
  if(version_compare($IWP_MMB_WEBMASTERS_REDIRECT_TABLE_VERSION, '1.0') == -1){
13
 
14
  $table_name = $wpdb->base_prefix . "iwp_redirects";
9
  global $wpdb;
10
 
11
  $IWP_MMB_WEBMASTERS_REDIRECT_TABLE_VERSION = get_site_option( 'iwp_webmasters_redirect_table_version' );
12
+
13
  if(version_compare($IWP_MMB_WEBMASTERS_REDIRECT_TABLE_VERSION, '1.0') == -1){
14
 
15
  $table_name = $wpdb->base_prefix . "iwp_redirects";
addons/manage_users/user.class.php CHANGED
@@ -81,10 +81,10 @@ class IWP_MMB_User extends IWP_MMB_Core
81
  include_once(ABSPATH . WPINC . '/registration.php');
82
 
83
  if(username_exists($args['user_login']))
84
- return array('error' => 'Username already exists');
85
 
86
  if (email_exists($args['user_email']))
87
- return array('error' => 'Email already exists');
88
 
89
  if(!function_exists('wp_insert_user'))
90
  include_once (ABSPATH . 'wp-admin/includes/user.php');
@@ -99,7 +99,7 @@ class IWP_MMB_User extends IWP_MMB_Core
99
  }
100
  return $user_id;
101
  }else{
102
- return array('error' => 'User not added. Please try again.');
103
  }
104
 
105
  }
@@ -130,7 +130,7 @@ class IWP_MMB_User extends IWP_MMB_Core
130
  $userdata['ID'] = $user_obj->ID;
131
  $result = wp_update_user($userdata);
132
  } else {
133
- $result = array('error' => 'No password provided.');
134
  }
135
  break;
136
  case 'change-role':
@@ -142,13 +142,13 @@ class IWP_MMB_User extends IWP_MMB_Core
142
  $userdata['role'] = strtolower($new_role);
143
  $result = wp_update_user($userdata);
144
  } else {
145
- $result = array('error' => 'Cannot change role to the only one left admin user.');
146
  }
147
  } else {
148
- $result = array('error' => 'Cannot change role to user assigned for InfiniteWP.');
149
  }
150
  } else {
151
- $result = array('error' => 'No role provided.');
152
  }
153
  break;
154
  case 'delete-user':
@@ -159,25 +159,25 @@ class IWP_MMB_User extends IWP_MMB_Core
159
  if($to_user != false){
160
  $result = wp_delete_user($user_obj->ID, $to_user->ID);
161
  } else {
162
- $result = array('error' => 'User not deleted. User to reassign posts doesn\'t exist.');
163
  }
164
  } else {
165
  $result = wp_delete_user($user_obj->ID);
166
  }
167
  } else {
168
- $result = array('error' => 'Cannot delete the only one left admin user.');
169
  }
170
  } else {
171
- $result = array('error' => 'Cannot delete user assigned for InfiniteWP.');
172
  }
173
 
174
  break;
175
  default:
176
- $result = array('error' => 'Wrong action provided. Please try again.');
177
  break;
178
  }
179
  } else {
180
- $result = array('error' => 'User not found.');
181
  }
182
 
183
  if(is_wp_error($result)){
81
  include_once(ABSPATH . WPINC . '/registration.php');
82
 
83
  if(username_exists($args['user_login']))
84
+ return array('error' => 'Username already exists', 'error_code' => 'username_already_exists');
85
 
86
  if (email_exists($args['user_email']))
87
+ return array('error' => 'Email already exists', 'error_code' => 'email_already_exists');
88
 
89
  if(!function_exists('wp_insert_user'))
90
  include_once (ABSPATH . 'wp-admin/includes/user.php');
99
  }
100
  return $user_id;
101
  }else{
102
+ return array('error' => 'User not added. Please try again.', 'error_code' => 'user_not_added_please_try_again');
103
  }
104
 
105
  }
130
  $userdata['ID'] = $user_obj->ID;
131
  $result = wp_update_user($userdata);
132
  } else {
133
+ $result = array('error' => 'No password provided.', 'error_code' => 'no_password_provided');
134
  }
135
  break;
136
  case 'change-role':
142
  $userdata['role'] = strtolower($new_role);
143
  $result = wp_update_user($userdata);
144
  } else {
145
+ $result = array('error' => 'Cannot change role to the only one left admin user.', 'error_code' => 'cannot_change_role_to_the_only_one_left_admin_user');
146
  }
147
  } else {
148
+ $result = array('error' => 'Cannot change role to user assigned for InfiniteWP.', 'error_code' => 'cannot_change_role_to_user_assigned_to_InfiniteWP');
149
  }
150
  } else {
151
+ $result = array('error' => 'No role provided.', 'error_code' => 'no_role_provided');
152
  }
153
  break;
154
  case 'delete-user':
159
  if($to_user != false){
160
  $result = wp_delete_user($user_obj->ID, $to_user->ID);
161
  } else {
162
+ $result = array('error' => 'User not deleted. User to reassign posts doesn\'t exist.', 'error_code' => 'user_not_deleted_user_to_reassign_posts_doesnt_exist');
163
  }
164
  } else {
165
  $result = wp_delete_user($user_obj->ID);
166
  }
167
  } else {
168
+ $result = array('error' => 'Cannot delete the only one left admin user.', 'error_code' => 'cannot_delete_the_only_one_left_admin_user');
169
  }
170
  } else {
171
+ $result = array('error' => 'Cannot delete user assigned for InfiniteWP.', 'error_code' => 'cannot_delete_user_assigned_for_InfiniteWP');
172
  }
173
 
174
  break;
175
  default:
176
+ $result = array('error' => 'Wrong action provided. Please try again.', 'error_code' => 'wrong_action_provided_please_try_again');
177
  break;
178
  }
179
  } else {
180
+ $result = array('error' => 'User not found.', 'error_code' => 'user_not_found');
181
  }
182
 
183
  if(is_wp_error($result)){
addons/post_links/link.class.php CHANGED
@@ -68,7 +68,7 @@ class IWP_MMB_Link extends IWP_MMB_Core
68
 
69
  $is_success = wp_insert_link($params);
70
 
71
- return $is_success ? true : array('error' => 'Failed to add link.');
72
  }
73
 
74
  function remove_element($arr, $val){
68
 
69
  $is_success = wp_insert_link($params);
70
 
71
+ return $is_success ? true : array('error' => 'Failed to add link.', 'error_code' => 'failed_to_add_link');
72
  }
73
 
74
  function remove_element($arr, $val){
addons/post_links/post.class.php CHANGED
@@ -152,13 +152,13 @@ class IWP_MMB_Post extends IWP_MMB_Core
152
  }
153
 
154
  if(isset($upload['error']) && !empty($upload['error'])){
155
- return array('error' => $upload['error']);
156
  }
157
  $file_name = basename($no_thumb);
158
  $tmp_file = download_url($no_thumb);
159
 
160
  if(is_wp_error($tmp_file)){
161
- return array('error' => $tmp_file->get_error_message());
162
  }
163
 
164
  $attach_upload['url'] = $upload['url'] . '/' . $file_name;
@@ -234,7 +234,7 @@ class IWP_MMB_Post extends IWP_MMB_Core
234
  }
235
  } else {
236
  @unlink($tmp_file);
237
- return array('error' => "Cannot create attachment file in ".$attach_upload['path']." Please set correct permissions.");
238
 
239
  }
240
  @unlink($tmp_file);
@@ -250,12 +250,12 @@ class IWP_MMB_Post extends IWP_MMB_Core
250
  $file_name = basename($img['src']);
251
 
252
  if(isset($upload['error']) && !empty($upload['error'])){
253
- return array('error' => $upload['error']);
254
  }
255
 
256
  $tmp_file = download_url($img['src']);
257
  if(is_wp_error($tmp_file)){
258
- return array('error' => $tmp_file->get_error_message());
259
  }
260
 
261
  $attach_upload['url'] = $upload['url'] . '/' . $file_name;
@@ -295,7 +295,7 @@ class IWP_MMB_Post extends IWP_MMB_Core
295
 
296
  } else {
297
  @unlink($tmp_file);
298
- return array('error' => "Cannot create attachment file in ".$attach_upload['path']." Please set correct permissions.");
299
  }
300
  @unlink($tmp_file);
301
  }
@@ -344,7 +344,7 @@ class IWP_MMB_Post extends IWP_MMB_Core
344
  if($post_data['iwp_post_edit'] && $post_data['iwp_force_publish']){
345
  $post_id = wp_insert_post($post_data);
346
  } elseif($post_data['iwp_post_edit'] && !$post_data['iwp_force_publish']) {
347
- return array('error' => "Post not found.");
348
  } else {
349
  $post_id = wp_insert_post($post_data);
350
  }
@@ -369,7 +369,7 @@ class IWP_MMB_Post extends IWP_MMB_Core
369
  if ($post_featured_img != '') {
370
  $file_name = basename($post_featured_img);
371
  if(isset($upload['error']) && !empty($upload['error'])){
372
- return array('error' => $upload['error']);
373
  }
374
  $tmp_file = download_url($post_featured_img);
375
  if(is_wp_error($tmp_file)){
152
  }
153
 
154
  if(isset($upload['error']) && !empty($upload['error'])){
155
+ return array('error' => $upload['error'], 'error_code' => 'upload_error');
156
  }
157
  $file_name = basename($no_thumb);
158
  $tmp_file = download_url($no_thumb);
159
 
160
  if(is_wp_error($tmp_file)){
161
+ return array('error' => $tmp_file->get_error_message(), 'error_code' => 'error_download_img_thumb_url');
162
  }
163
 
164
  $attach_upload['url'] = $upload['url'] . '/' . $file_name;
234
  }
235
  } else {
236
  @unlink($tmp_file);
237
+ return array('error' => "Cannot create attachment file in ".$attach_upload['path']." Please set correct permissions.", 'error_code' =>'cannot_create_attachment_file_set_correct_permissions' );
238
 
239
  }
240
  @unlink($tmp_file);
250
  $file_name = basename($img['src']);
251
 
252
  if(isset($upload['error']) && !empty($upload['error'])){
253
+ return array('error' => $upload['error'], 'error_code' => 'upload_error_post_atta_img');
254
  }
255
 
256
  $tmp_file = download_url($img['src']);
257
  if(is_wp_error($tmp_file)){
258
+ return array('error' => $tmp_file->get_error_message(), 'error_code' => 'download_url_wp_error_post_atta_img');
259
  }
260
 
261
  $attach_upload['url'] = $upload['url'] . '/' . $file_name;
295
 
296
  } else {
297
  @unlink($tmp_file);
298
+ return array('error' => "Cannot create attachment file in ".$attach_upload['path']." Please set correct permissions.", 'error_code' => 'cannot_create_attachment_post_featured_img');
299
  }
300
  @unlink($tmp_file);
301
  }
344
  if($post_data['iwp_post_edit'] && $post_data['iwp_force_publish']){
345
  $post_id = wp_insert_post($post_data);
346
  } elseif($post_data['iwp_post_edit'] && !$post_data['iwp_force_publish']) {
347
+ return array('error' => "Post not found.", 'error_code' => 'post_not_found');
348
  } else {
349
  $post_id = wp_insert_post($post_data);
350
  }
369
  if ($post_featured_img != '') {
370
  $file_name = basename($post_featured_img);
371
  if(isset($upload['error']) && !empty($upload['error'])){
372
+ return array('error' => $upload['error'], 'error_code' => 'error_post_featured_img');
373
  }
374
  $tmp_file = download_url($post_featured_img);
375
  if(is_wp_error($tmp_file)){
addons/wordfence/wordfence.class.php CHANGED
@@ -32,7 +32,7 @@ class IWP_WORDFENCE extends IWP_MMB_Core
32
  if($this->_checkWordFence()) {
33
  return wordfence::ajax_scan_callback();
34
  } else {
35
- return array('error'=>"Word Fence plugin is not activated");
36
  }
37
  }
38
 
32
  if($this->_checkWordFence()) {
33
  return wordfence::ajax_scan_callback();
34
  } else {
35
+ return array('error'=>"Word Fence plugin is not activated", 'error_code' => 'wordfence_plugin_is_not_activated');
36
  }
37
  }
38
 
backup.class.multicall.php ADDED
@@ -0,0 +1,6114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /************************************************************
3
+ * This plugin was modified by Revmakx *
4
+ * Copyright (c) 2012 Revmakx *
5
+ * www.revmakx.com *
6
+ * *
7
+ ************************************************************/
8
+ /*************************************************************
9
+ *
10
+ * backup.class.php
11
+ *
12
+ * Manage Backups
13
+ *
14
+ *
15
+ * Copyright (c) 2011 Prelovac Media
16
+ * www.prelovac.com
17
+ **************************************************************/
18
+
19
+ if(!defined('IWP_BACKUP_DIR')){
20
+ define('IWP_BACKUP_DIR', WP_CONTENT_DIR . '/infinitewp/backups');
21
+ }
22
+
23
+ if(!defined('IWP_DB_DIR')){
24
+ define('IWP_DB_DIR', IWP_BACKUP_DIR . '/iwp_db');
25
+ }
26
+
27
+ if(!defined('PCLZIP_TEMPORARY_DIR')){
28
+ define('PCLZIP_TEMPORARY_DIR', WP_CONTENT_DIR . '/infinitewp/temp/');
29
+ }
30
+
31
+ //require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.split.php';
32
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
33
+
34
+
35
+
36
+ $zip_errors = array(
37
+ 'No error',
38
+ 'No error',
39
+ 'Unexpected end of zip file',
40
+ 'A generic error in the zipfile format was detected',
41
+ 'zip was unable to allocate itself memory',
42
+ 'A severe error in the zipfile format was detected',
43
+ 'Entry too large to be split with zipsplit',
44
+ 'Invalid comment format',
45
+ 'zip -T failed or out of memory',
46
+ 'The user aborted zip prematurely',
47
+ 'zip encountered an error while using a temp file. Please check if this domain\'s account has enough disk space.',
48
+ 'Read or seek error',
49
+ 'zip has nothing to do',
50
+ 'Missing or empty zip file',
51
+ 'Error writing to a file. Please check if this domain\'s account has enough disk space.',
52
+ 'zip was unable to create a file to write to',
53
+ 'bad command line parameters',
54
+ 'no error',
55
+ 'zip could not open a specified file to read'
56
+ );
57
+ $unzip_errors = array(
58
+ 'No error',
59
+ 'One or more warning errors were encountered, but processing completed successfully anyway',
60
+ 'A generic error in the zipfile format was detected',
61
+ 'A severe error in the zipfile format was detected.',
62
+ 'unzip was unable to allocate itself memory.',
63
+ 'unzip was unable to allocate memory, or encountered an encryption error',
64
+ 'unzip was unable to allocate memory during decompression to disk',
65
+ 'unzip was unable allocate memory during in-memory decompression',
66
+ 'unused',
67
+ 'The specified zipfiles were not found',
68
+ 'Bad command line parameters',
69
+ 'No matching files were found',
70
+ 50 => 'The disk is (or was) full during extraction',
71
+ 51 => 'The end of the ZIP archive was encountered prematurely.',
72
+ 80 => 'The user aborted unzip prematurely.',
73
+ 81 => 'Testing or extraction of one or more files failed due to unsupported compression methods or unsupported decryption.',
74
+ 82 => 'No files were found due to bad decryption password(s)'
75
+ );
76
+
77
+
78
+ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
79
+ {
80
+ var $site_name;
81
+ var $statuses;
82
+ var $tasks;
83
+ var $s3;
84
+ var $ftp;
85
+ var $dropbox;
86
+ var $statusLogVar;
87
+ var $hisID;
88
+ var $backup_url;
89
+ var $backup_settings_vals = array();
90
+ var $iwpScriptStartTime;
91
+ function __construct()
92
+ {
93
+ parent::__construct();
94
+ $this->site_name = str_replace(array(
95
+ "_",
96
+ "/",
97
+ "~"
98
+ ), array(
99
+ "",
100
+ "-",
101
+ "-"
102
+ ), rtrim($this->remove_http(get_bloginfo('url')), "/"));
103
+ $this->statuses = array(
104
+ 'db_dump' => 1,
105
+ 'db_zip' => 2,
106
+ 'files_zip' => 3,
107
+ 'finished' => 100
108
+ );
109
+ $this->tasks = get_option('iwp_client_multi_backup_temp_values');
110
+ $this->iwpScriptStartTime = $GLOBALS['IWP_MMB_PROFILING']['ACTION_START'];
111
+ }
112
+
113
+ function set_resource_limit()
114
+ {
115
+ $changed = array('execution_time' => 0, 'memory_limit' => 0, 'ini_memory_limit' => ini_get('memory_limit'), 'ini_execution_time' => ini_get('max_execution_time'));
116
+ @ignore_user_abort(true);
117
+
118
+
119
+ $mod_memory = (@ini_set('memory_limit', -1) == false) ? $changed['memory_limit'] = false : $changed['memory_limit'] = 1;
120
+
121
+ @ini_set('memory_limit', '-1');
122
+
123
+ if ( (int) @ini_get('max_execution_time') < 1200 ) {
124
+ $mod_exec = @ini_set('max_execution_time', 1200) == false ? $changed['execution_time'] = false : $changed['execution_time'] = 1; //twenty minutes
125
+ @set_time_limit(1200);
126
+
127
+ }
128
+
129
+ return $changed;
130
+
131
+ }
132
+
133
+
134
+ function trigger_check($datas)
135
+ {
136
+ if(!empty($datas))
137
+ {
138
+ $this->set_resource_limit();
139
+ $responseParams = $this -> getRequiredData($datas['backupParentHID'],"responseParams");
140
+ if(empty($responseParams))
141
+ {
142
+ return $this->statusLog($datas['backupParentHID'], array('stage' => 'trigger_check', 'status' => 'error', 'statusMsg' => 'Error while fetching table data', 'statusCode' => 'error_while_fetching_table_data'));
143
+ }
144
+ $action = $responseParams['nextFunc'];
145
+ if(empty($action))
146
+ {
147
+ return $this->statusLog($datas['backupParentHID'], array('stage' => 'trigger_check', 'status' => 'error', 'statusMsg' => 'Calling Next Function failed - Error while fetching table data', 'statusCode' => 'calling_next_function_failed_error_while_fetching_table_data'));
148
+ }
149
+
150
+ unset($responseParams);
151
+
152
+ if(method_exists('IWP_MMB_Backup_Multicall', $action)){
153
+ $result = self::$action($datas['backupParentHID']);
154
+ return $result;
155
+ }
156
+ }
157
+ }
158
+
159
+ function set_backup_task($params)
160
+ {
161
+ if(!empty($params))
162
+ {
163
+ //darkCode testing purpose static values
164
+ if((empty($params['args']['file_block_size']))||($params['args']['file_block_size'] < 1))
165
+ {
166
+ $params['args']['file_block_size'] = 5; //MB
167
+ }
168
+ if($params['args']['disable_comp'] == '')
169
+ {
170
+ $params['args']['is_compressed'] = true;
171
+ }
172
+ else
173
+ {
174
+ $params['args']['is_compressed'] = false;
175
+ }
176
+ if((empty($params['args']['file_loop_break_time']))||($params['args']['file_loop_break_time'] < 6))
177
+ {
178
+ $params['args']['file_loop_break_time'] = 23;
179
+ }
180
+ if((empty($params['args']['db_loop_break_time']))||($params['args']['db_loop_break_time'] < 6))
181
+ {
182
+ $params['args']['db_loop_break_time'] = 23;
183
+ }
184
+ if($params['account_info'])
185
+ {
186
+ if((empty($params['account_info']['upload_loop_break_time']))||($params['account_info']['upload_loop_break_time'] < 6))
187
+ {
188
+ $params['account_info']['upload_loop_break_time'] = 23;
189
+ }
190
+ if((empty($params['account_info']['upload_file_block_size']))||($params['account_info']['upload_file_block_size'] < 1))
191
+ {
192
+ $params['account_info']['upload_file_block_size'] = (5*1024*1024)+1;
193
+ }
194
+ else
195
+ {
196
+ $params['account_info']['upload_file_block_size'] = ($params['account_info']['upload_file_block_size']*1024*1024)+1;
197
+ }
198
+ $params['account_info']['actual_file_size'] = 0;
199
+
200
+ }
201
+ $this->statusLog($historyID, array('stage' => 'verification', 'status' => 'processing', 'statusMsg' => 'verificationInitiated'),$params);
202
+
203
+ $historyID = $params['args']['parentHID'];
204
+
205
+ $this->hisID = $historyID;
206
+
207
+
208
+ $setMemory = $this->set_resource_limit();
209
+
210
+ if(file_exists(IWP_BACKUP_DIR) && is_dir(IWP_BACKUP_DIR)){
211
+ $this->statusLog($historyID, array('stage' => 'verification', 'status' => 'processing', 'statusMsg' => 'Directory Writable'));
212
+ }else{
213
+ $mkdir = @mkdir(IWP_BACKUP_DIR, 0755, true);
214
+ if(!$mkdir){
215
+ return $this->statusLog($historyID, array('stage' => 'verification', 'status' => 'error', 'statusMsg' => 'Permission denied; Make sure you have write permission for the wp-content folder.', 'statusCode' => 'permission_denied_make_sure_you_have_write_permission_for_the_wp_content_folder'));
216
+ }
217
+ }
218
+ if(is_writable(IWP_BACKUP_DIR)){
219
+ @file_put_contents(IWP_BACKUP_DIR . '/index.php', ''); //safe
220
+
221
+ }else{
222
+ $chmod = chmod(IWP_BACKUP_DIR, 777);
223
+ if(!is_writable(IWP_BACKUP_DIR)){
224
+ return $this->statusLog($historyID, array('stage' => 'verification', 'status' => 'error', 'statusMsg' => IWP_BACKUP_DIR.' directory is not writable. Please set 755 or 777 file permission and try again.', 'statusCode' => 'backup_dir_is_not_writable'));
225
+ }
226
+ }
227
+
228
+ //pclzip temp folder creation
229
+
230
+ if(file_exists(PCLZIP_TEMPORARY_DIR) && is_dir(PCLZIP_TEMPORARY_DIR))
231
+ {
232
+ $this->statusLog($historyID, array('stage' => 'verification', 'status' => 'processing', 'statusMsg' => 'Directorywritable'));
233
+ }
234
+ else
235
+ {
236
+ $mkdir = @mkdir(PCLZIP_TEMPORARY_DIR, 0755, true);
237
+ if(!$mkdir){
238
+ return $this->statusLog($historyID, array('stage' => 'verification', 'status' => 'error', 'statusMsg' => 'Error creating database backup folder (' . PCLZIP_TEMPORARY_DIR . '). Make sure you have corrrect write permissions.', 'statusCode' => 'error_creating_database_backup_folder'));
239
+ }
240
+ }
241
+ if(is_writable(PCLZIP_TEMPORARY_DIR))
242
+ {
243
+ @file_put_contents(PCLZIP_TEMPORARY_DIR . '/index.php', ''); //safe
244
+ }
245
+ else
246
+ {
247
+ $chmod = chmod(PCLZIP_TEMPORARY_DIR, 777);
248
+ if(!is_writable(PCLZIP_TEMPORARY_DIR)){
249
+ //$this->statusLog($historyID, "verification", false, "can't set 777");
250
+ return $this->statusLog($historyID, array('stage' => 'verification', 'status' => 'error', 'statusMsg' => PCLZIP_TEMPORARY_DIR.' directory is not writable. Please set 755 or 777 file permission and try again.', 'statusCode' => 'pclzip_dir_not_writable'));
251
+ }
252
+ }
253
+
254
+ //if verification is ok then store the settings in the options table
255
+ $backup_settings_values = array();
256
+ $backup_settings_values['file_block_size'] = $params['args']['file_block_size'];
257
+ $backup_settings_values['is_compressed'] = $params['args']['is_compressed'];
258
+ $backup_settings_values['file_loop_break_time'] = $params['args']['file_loop_break_time'];
259
+ $backup_settings_values['del_host_file'] = $params['args']['del_host_file'];
260
+ $backup_settings_values['task_name'] = $params['args']['backup_name'];
261
+ if($params['account_info'])
262
+ {
263
+ $backup_settings_values['upload_loop_break_time'] = $params['account_info']['upload_loop_break_time'];
264
+ $backup_settings_values['upload_file_block_size'] = $params['account_info']['upload_file_block_size'];
265
+ }
266
+ if($params['args']['what'] != 'files')
267
+ {
268
+ $backup_settings_values['db_loop_break_time'] = $params['args']['db_loop_break_time'];
269
+ }
270
+
271
+ //Remove the old backups (limit)
272
+ $removed = $this->remove_old_backups($params['task_name']);
273
+ if (is_array($removed) && isset($removed['error']))
274
+ {
275
+ return $this->statusLog($this -> hisID, array('stage' => 'removingBackupFiles', 'status' => 'error', 'statusMsg' => 'Error while removing old backups. ('.$removed['error'].')', 'statusCode' => 'error_while_removing_old_backups', 'responseParams' => $result_arr));
276
+ }
277
+
278
+ update_option('iwp_client_multi_backup_temp_values', $backup_settings_values);
279
+ $responseParams = array();
280
+ $responseParams['nextFunc'] = 'backup';
281
+ $responseParams['mechanism'] = 'multiCall';
282
+ return $this->statusLog($historyID, array('stage' => 'verification', 'status' => 'completed', 'statusMsg' => 'verified', 'nextFunc' => 'backup', 'responseParams' => $responseParams));
283
+ }
284
+ }
285
+
286
+ function backup($historyID)
287
+ {
288
+ $zipPartNotOver = true;
289
+ $this -> hisID = $historyID;
290
+ $args = $this->getRequiredData($historyID, "requestParams");
291
+ //argsInsideBackup argsFormat
292
+ extract($args['args']);
293
+ extract($args);
294
+ //$task_name = $args['task_name'];
295
+ //Prepare .zip file name
296
+ $hash = md5(time());
297
+ $label = $type ? $type : 'manual';
298
+ $backup_file_name = $this->site_name . '_' . $label . '_' . $what . '_' . date('Y-m-d') . '_' . $hash . '.zip';
299
+ $backup_file = IWP_BACKUP_DIR . '/' . $this->site_name . '_' . $label . '_' . $what . '_' . date('Y-m-d') . '_' . $hash . '.zip';
300
+ $backup_url = content_url() . '/infinitewp/backups/' . $this->site_name . '_' . $label . '_' . $what . '_' . date('Y-m-d') . '_' . $hash . '.zip';
301
+ $this -> backup_url = $backup_url;
302
+ //$backup_url = $backup_file;
303
+
304
+ $backup_file_info = array();
305
+ $backup_file_info['backup_file_name'] = $backup_file_name;
306
+ $backup_file_info['backup_file'] = $backup_file;
307
+ $backup_file_info['backup_url'] = $backup_url;
308
+
309
+ if(!($account_info))
310
+ {
311
+ $account_info = array();
312
+ }
313
+
314
+ if($what == 'db')
315
+ {
316
+ //DB alone funcion
317
+ $result = $this->backupDB($historyID,$backup_file,$account_info);
318
+ return $result;
319
+ }
320
+ elseif($what == 'files')
321
+ {
322
+ //FIle alone
323
+ $result = $this->backupFiles($historyID,$backup_file,$account_info);
324
+ return $result;
325
+ }
326
+ elseif($what == 'full')
327
+ {
328
+ //both files and db.
329
+
330
+ $result = $this->backupDB($historyID,$backup_file,$account_info);
331
+ //$result = $this->backupFiles($historyID,$backup_file);
332
+ return $result;
333
+ }
334
+
335
+
336
+ }
337
+
338
+ function backup_uploads($historyID)
339
+ {
340
+
341
+ //after creating the backup file dont forget to include it in the account_info array
342
+ $this -> hisID = $historyID;
343
+ $files_to_zip = '';
344
+ $responseParams = $this -> getRequiredData($historyID,"responseParams");
345
+ $account_info = $responseParams['response_data']['account_info'];
346
+ $backup_file = $responseParams['response_data']['backup_file'];
347
+
348
+ //storing the filesize value into settings array - first get the values and then append the value of filesize to it
349
+ $this -> backup_settings_vals = get_option('iwp_client_multi_backup_temp_values', $backup_settings_values);
350
+ $backup_settings_values = $this -> backup_settings_vals;
351
+ $backup_settings_values['actual_file_size'] = iwp_mmb_get_file_size($backup_file);
352
+ update_option('iwp_client_multi_backup_temp_values', $backup_settings_values);
353
+
354
+ if (isset($account_info['iwp_ftp']) && !empty($account_info['iwp_ftp'])) {
355
+ $account_info['iwp_ftp']['backup_file'] = $backup_file;
356
+ iwp_mmb_print_flush('FTP upload: Start');
357
+ $ftp_result = $this->ftp_backup($historyID, $account_info['iwp_ftp']);
358
+ if(!$ftp_result)
359
+ {
360
+ return array('error' => "Unexpected Error", 'error_code' => "unexpected_error");
361
+ }
362
+ else
363
+ {
364
+ return $ftp_result;
365
+ }
366
+ }
367
+
368
+ if (isset($account_info['iwp_amazon_s3']) && !empty($account_info['iwp_amazon_s3'])) {
369
+ $account_info['iwp_amazon_s3']['backup_file'] = $backup_file;
370
+ iwp_mmb_print_flush('Amazon S3 upload: Start');
371
+ $amazons3_result = $this->amazons3_backup($historyID,$account_info['iwp_amazon_s3']);
372
+ iwp_mmb_print_flush('Amazon S3 upload: End');
373
+ if($amazons3_result['status'] == 'partiallyCompleted') //darkCode true loop
374
+ {
375
+ return $amazons3_result;
376
+ }
377
+ if ($amazons3_result !== true && $del_host_file) {
378
+ //@unlink($backup_file);
379
+ }
380
+ if (is_array($amazons3_result) && isset($amazons3_result['error'])) {
381
+ return $amazons3_result;
382
+ }
383
+ return $amazons3_result;
384
+
385
+ }
386
+
387
+ if (isset($account_info['iwp_gdrive']) && !empty($account_info['iwp_gdrive'])) {
388
+ $account_info['iwp_gdrive']['backup_file'] = $backup_file;
389
+ iwp_mmb_print_flush('google Drive upload: Start');
390
+ $gdrive_result = $this->google_drive_backup($historyID, $account_info['iwp_gdrive']);
391
+ iwp_mmb_print_flush('google Drive upload: End');
392
+
393
+ return $gdrive_result;
394
+
395
+ }
396
+
397
+ if (isset($account_info['iwp_dropbox']) && !empty($account_info['iwp_dropbox'])) {
398
+ $this->statusLog($historyID, array('stage' => 'uploadDrobox', 'status' => 'processing', 'statusMsg' => 'tempDirectorywritable'));
399
+
400
+ $account_info['iwp_dropbox']['backup_file'] = $backup_file;
401
+ iwp_mmb_print_flush('Dropbox upload: Start');
402
+ $dropbox_result = $this->dropbox_backup($historyID, $account_info['iwp_dropbox']);
403
+ if($dropbox_result['status'] == 'partiallyCompleted')
404
+ {
405
+ return $dropbox_result;
406
+ }
407
+ iwp_mmb_print_flush('Dropbox upload: End');
408
+ if ($dropbox_result !== true && $del_host_file) {
409
+ //@unlink($backup_file);
410
+ }
411
+
412
+ if (is_array($dropbox_result) && isset($dropbox_result['error'])) {
413
+ return $dropbox_result;
414
+ }
415
+
416
+
417
+
418
+ $this->wpdb_reconnect();
419
+
420
+ return $dropbox_result;
421
+ }
422
+
423
+ if ($del_host_file) {
424
+ //@unlink($backup_file); //darkCode testing purpose
425
+ }
426
+
427
+
428
+ }
429
+
430
+ function backupDB($historyID,$backup_file,$account_info = array())
431
+ {
432
+ $this->statusLog($historyID, array('stage' => 'backupDB', 'status' => 'processing', 'statusMsg' => 'backupDBInitiated'));
433
+
434
+ if(file_exists(IWP_DB_DIR) && is_dir(IWP_DB_DIR))
435
+ {
436
+ $this->statusLog($historyID, array('stage' => 'verification', 'status' => 'processing', 'statusMsg' => 'Directorywritable'));
437
+ }
438
+ else
439
+ {
440
+ $mkdir = @mkdir(IWP_DB_DIR, 0755, true);
441
+ if(!$mkdir){
442
+ return $this->statusLog($historyID, array('stage' => 'verification', 'status' => 'error', 'statusMsg' => 'Error creating database backup folder (' . IWP_DB_DIR . '). Make sure you have corrrect write permissions.', 'statusCode' => 'error_creating_database_backup_folder'));
443
+ }
444
+ }
445
+ if(is_writable(IWP_DB_DIR))
446
+ {
447
+ @file_put_contents(IWP_DB_DIR . '/index.php', ''); //safe
448
+ }
449
+ else
450
+ {
451
+ $chmod = chmod(IWP_DB_DIR, 777);
452
+ if(!is_writable(IWP_DB_DIR)){
453
+ //$this->statusLog($historyID, "verification", false, "can't set 777");
454
+ return $this->statusLog($historyID, array('stage' => 'verification', 'status' => 'error', 'statusMsg' => IWP_DB_DIR.' directory is not writable. Please set 755 or 777 file permission and try again.', 'statusCode' => 'db_dir_not_writable'));
455
+ }
456
+ }
457
+
458
+ if(true) // if the verification is true go for the DB process
459
+ {
460
+ $db_index_file = '<?php
461
+ global $old_url, $old_file_path;
462
+ $old_url = \''.get_option('siteurl').'\';
463
+ $old_file_path = \''.ABSPATH.'\';
464
+ ';
465
+
466
+ @file_put_contents(IWP_DB_DIR . '/index.php', $db_index_file); //safe
467
+
468
+ //$this->statusLog($historyID, "verification", true, "Backup DB directory Created and writable");
469
+ $this->statusLog($historyID, array('stage' => 'verification', 'status' => 'processing', 'statusMsg' => 'BackupDBDirectoryCreatedAndWritable'));
470
+ $res_arr = array();
471
+ $res_arr['response_data'] = array();
472
+ $res_arr['file_name'] = DB_NAME;
473
+ $res_arr['response_data'] = array();
474
+ $res_arr['backup_file'] = $backup_file;
475
+ $res_arr['backup_url'] = $this -> backup_url;
476
+ $res_arr['account_info'] = $account_info;
477
+ $this->statusLog($historyID, array('stage' => 'backupDB', 'status' => 'initiating', 'statusMsg' => 'createdFileNameAndSent','responseParams' => $res_arr));
478
+ $db_result = $this->backupDBPHP($historyID);
479
+
480
+ //arguments format - dbresult_before_zip
481
+ //$result = $this->backupDBZip($historyID,$db_result,$backup_url); //if DB is succsessful do the DB zip
482
+
483
+
484
+ return $db_result;
485
+ }
486
+
487
+ }
488
+
489
+ function backupDBZip($historyID)
490
+ {
491
+ // if the DB backup is successful do the zip operations
492
+ $responseParams = $this -> getRequiredData($historyID,"responseParams");
493
+ $responseParams['category'] = 'dbZip';
494
+ $backup_file = $responseParams['backup_file'];
495
+ $backup_url = $responseParams['backup_url'];
496
+ $responseParams['response_data']['backup_file'] = $backup_file;
497
+ $responseParams['response_data']['backup_url'] = $backup_url;
498
+ $responseParams['response_data']['account_info'] = $responseParams['account_info'];
499
+ $db_result = $responseParams['response_data'];
500
+ $this->statusLog($historyID, array('stage' => 'backupDBZip', 'status' => 'processing', 'statusMsg' => 'backupZipInitiated','responseParams' => $responseParams));
501
+ if ($db_result == false) {
502
+ return array(
503
+ 'error' => 'Failed to backup database.'
504
+ );
505
+ }
506
+ else if (is_array($db_result) && isset($db_result['error'])) {
507
+ return array(
508
+ 'error' => $db_result['error']
509
+ );
510
+ }
511
+ else
512
+ {
513
+ unset($responseParams);
514
+ unset($db_result);
515
+ //perform the zip operations here ..... for DB
516
+ iwp_mmb_print_flush('DB ZIP PCL: Start');
517
+ // fallback to pclzip
518
+ //define('PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
519
+ /* require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
520
+ $archive = new IWPPclZip($backup_file);
521
+ $result = $archive->add(IWP_DB_DIR, PCLZIP_OPT_REMOVE_PATH, IWP_BACKUP_DIR); */
522
+ $result = $this -> backupFilesZIP($historyID);
523
+ iwp_mmb_print_flush('DB ZIP PCL: End');
524
+ /* @unlink($db_result);
525
+ @unlink(IWP_BACKUP_DIR.'/iwp_db/index.php'); //dark comment
526
+ @rmdir(IWP_DB_DIR); */
527
+ if (!$result) {
528
+ return $this->statusLog($historyID, array('stage' => 'backupDBZip', 'status' => 'error', 'statusMsg' => 'Database zip failed', 'statusCode' => 'database_zip_failed'));
529
+ return array(
530
+ 'error' => 'Failed to zip database (pclZip - ' . $archive->error_code . '): .' . $archive->error_string
531
+ );
532
+ }
533
+
534
+ }
535
+ //$this->statusLog($historyID, array('stage' => 'backupDBZip', 'status' => 'completed', 'statusMsg' => 'backupZipCompleted'));
536
+
537
+ return $result;
538
+ }
539
+
540
+
541
+ function backupDBPHP($historyID) //file must be db name alone ; $response_array should be table_name and its fields and callCount
542
+ {
543
+ //getting the settings first
544
+ $this -> backup_settings_vals = get_option('iwp_client_multi_backup_temp_values', $backup_settings_values);
545
+ $backup_settings_values = $this -> backup_settings_vals;
546
+
547
+ //$file_block_size = $backup_settings_values['file_block_size'];
548
+ //$is_compressed = $backup_settings_values['is_compressed'];
549
+ //$file_loop_break_time = $backup_settings_values['file_loop_break_time'];
550
+ //$db_loop_break_time = $backup_settings_values['db_loop_break_time'];
551
+
552
+ //getting the settings by other method
553
+ $requestParams = $this->getRequiredData($historyID, "requestParams");
554
+ $file_block_size = $requestParams['args']['file_block_size']; //darkcode changed
555
+ $is_compressed = $requestParams['args']['is_compressed'];
556
+ $file_loop_break_time = $requestParams['args']['file_loop_break_time'];
557
+ $db_loop_break_time = $requestParams['args']['db_loop_break_time'];
558
+ $zip_split_size = $requestParams['args']['zip_split_size'];
559
+ $responseParams = $this -> getRequiredData($historyID,"responseParams");
560
+ $file = $responseParams['file_name'];
561
+ $total_time_part = 0;
562
+
563
+ if(!$file)
564
+ {
565
+ $file = '';
566
+ }
567
+ $backup_file = $responseParams['backup_file'];
568
+ $backup_url = $responseParams['backup_url'];
569
+ $response_array = $responseParams['response_data'];
570
+ $account_info = $responseParams['account_info'];
571
+ $backupStage = '';
572
+ if(empty($response_array))
573
+ {
574
+ $backupStage = 'backupDB';
575
+ $callCount = 0;
576
+ }
577
+ else
578
+ {
579
+ $callCount = $response_array['callCount'];
580
+ $backupStage = 'backupDBMultiCall';
581
+ }
582
+ //$this->statusLog($historyID, "backupDB", true, "processing", $params, true);
583
+ $this->statusLog($historyID, array('stage' => $backupStage, 'status' => 'processing', 'statusMsg' => 'backupDBInitiated', 'responseParams' => $responseParams));
584
+ global $wpdb;
585
+ $db_folder = IWP_DB_DIR . '/';
586
+ $time = microtime(true);
587
+ $start = $time;
588
+ $break_flag = '';
589
+ $is_continue = '';
590
+ $break_flag_first_key = '';
591
+ $temp_sql_file_name = '';
592
+ iwp_mmb_print_flush('DB DUMP PHP Fail-safe: Start');
593
+ $dump_data = '';
594
+ //$response_array = array();
595
+ //$response_array['db_response'] = array();
596
+ //$response_array['status'] = '';
597
+ //$response_array['callCount'] = 0;
598
+ $left_out_array = array();
599
+ $left_out_table = '';
600
+ $left_out_count = '';
601
+ $db_final_response = array();
602
+ $db_final_response['success'] = array ();
603
+ $db_final_response['success']['type'] = 'db';
604
+ /* $response_array = array (
605
+ 'callCount' => 5,
606
+ 'wp_commentmeta' => 0,
607
+ 'wp_comments' => 16,
608
+ 'wp_links' => 92,
609
+ 'wp_options' => 1149,
610
+ 'wp_postmeta' => 109,
611
+ 'wp_posts' => 116,
612
+ 'wp_term_relationships' => 28,
613
+ 'wp_term_taxonomy' => 79,
614
+ 'wp_terms' => 22,
615
+ );*/
616
+
617
+ $left_out_array = array_slice($response_array,-1,1);
618
+ array_pop($response_array);
619
+ $response_array['callCount'] = $callCount;
620
+ if($file == '')
621
+ {
622
+ $file = DB_NAME;
623
+ }
624
+ $db_final_response['success']['file_name'] = $file;
625
+ //$temp_sql_file_name = $file."-".$callCount.".sql"; //old method
626
+ $temp_sql_file_name = $file.".sql";
627
+ $file = $db_folder . $temp_sql_file_name;
628
+ //file_put_contents($file, '');//safe to reset any old data
629
+ /* if($callCount == 0) //used in old method
630
+ {
631
+ $db_final_response['success']['file'] = $file;
632
+ file_put_contents($file, '');//safe to reset any old data
633
+ } */
634
+ //$tables = $wpdb->get_results('SHOW TABLES', ARRAY_N);
635
+ $tables = $wpdb->get_results('SHOW TABLES LIKE "'.$wpdb->base_prefix.'%"', ARRAY_N);
636
+
637
+ foreach ($tables as $table) {
638
+ $is_continue = '';
639
+ foreach($response_array as $k => $v)
640
+ {
641
+ if($k == $table[0])
642
+ {
643
+ $is_continue = 'set';
644
+ break;
645
+ }
646
+ else
647
+ {
648
+ $is_continue = '';
649
+ }
650
+ }
651
+ if($is_continue == 'set')
652
+ {
653
+ continue;
654
+ }
655
+
656
+ foreach ($left_out_array as $key => $val)
657
+ {
658
+ $left_out_table = $key;
659
+ $left_out_count = $val;
660
+ }
661
+ if($left_out_table != $table[0])
662
+ {
663
+ //drop existing table
664
+ $dump_data = "DROP TABLE IF EXISTS $table[0];";
665
+ file_put_contents($file, $dump_data, FILE_APPEND);
666
+ //create table
667
+ $create_table = $wpdb->get_row("SHOW CREATE TABLE $table[0]", ARRAY_N);
668
+ $dump_data = "\n\n" . $create_table[1] . ";\n\n";
669
+ $response_array[$table[0]] = 0;
670
+ file_put_contents($file, $dump_data, FILE_APPEND);
671
+ //$left_out_count = '';
672
+ }
673
+ $count = $wpdb->get_var("SELECT count(*) FROM $table[0]");
674
+ $count_field = 1;
675
+
676
+ $table_fields = $wpdb->get_results("SHOW COLUMNS FROM $table[0]", ARRAY_A);
677
+ $no_of_cols = count($table_fields);
678
+ $initialCount = 0;
679
+ $done_count = 0;
680
+ $breakingCount = $responseParams['breakingCount'];
681
+ if(!$breakingCount)
682
+ {
683
+ $breakingCount = 0;
684
+ }
685
+ if ($count > 100)
686
+ {
687
+ $count = ceil($count / 100);
688
+ if($left_out_count > 0)
689
+ {
690
+ $temp_left_count = $left_out_count;
691
+ //$done_count = floor($temp_left_count / (100*$no_of_cols));
692
+ $done_count = $breakingCount;
693
+ }
694
+ }
695
+ else if ($count > 0)
696
+ {
697
+ $count = 1;
698
+ }
699
+
700
+ for($i = 0; $i < $count; $i++){
701
+ if($done_count > 0)
702
+ {
703
+ if($done_count > ($i))
704
+ {
705
+ $count_field += 100 * $no_of_cols;
706
+ continue;
707
+ }
708
+ }
709
+
710
+ iwp_mmb_auto_print('backup_db_php_fail_safe');
711
+ $low_limit = $i * 100;
712
+ $qry = "SELECT * FROM $table[0] LIMIT $low_limit, 100";
713
+ $rows = $wpdb->get_results($qry, ARRAY_A);
714
+
715
+
716
+ if (is_array($rows)) {
717
+ foreach ($rows as $row) {
718
+ //insert single row
719
+ if(($table[0] != $left_out_table))
720
+ $dump_data = "INSERT INTO $table[0] VALUES(";
721
+ if(($table[0] == $left_out_table)&&($left_out_count <= $count_field))
722
+ $dump_data = "INSERT INTO $table[0] VALUES(";
723
+ $num_values = count($row);
724
+ $j = 1;
725
+ foreach ($row as $key => $value) {
726
+ $count_field++;
727
+ $response_array[$table[0]] = $count_field;
728
+ if(($left_out_table == $table[0])&&($count_field <= $left_out_count))
729
+ {
730
+ $j++;
731
+ continue;
732
+ }
733
+ $time = microtime(true);
734
+ $finish_part = $time;
735
+ $total_time_part = $finish_part - $this->iwpScriptStartTime;
736
+
737
+ //$dump_data .= $count_field;
738
+
739
+ $value = addslashes($value);
740
+ $value = preg_replace("/\n/Ui", "\\n", $value);
741
+ $num_values == $j ? $dump_data .= "'" . $value . "'" : $dump_data .= "'" . $value . "', ";
742
+
743
+ $j++;
744
+ unset($value);
745
+ if($total_time_part > $db_loop_break_time)
746
+ {
747
+ $break_flag = 'set';
748
+ $break_flag_first_key = 'set';
749
+ //$this -> sendNextCallFlag = '';
750
+ break;
751
+ }
752
+ else
753
+ {
754
+ $break_flag == '';
755
+ }
756
+ }
757
+ if(($left_out_table == $table[0])&&($count_field <= $left_out_count-1))
758
+ {
759
+ continue;
760
+ }
761
+ //if(($break_flag == '')&&($count_field > $left_out_count))
762
+ if(($break_flag == ''))
763
+ {
764
+ $dump_data .= ");\n";
765
+ }
766
+ else
767
+ {
768
+ break;
769
+ }
770
+ /* if($count_field != $left_out_count)
771
+ {
772
+ } */
773
+ file_put_contents($file, $dump_data, FILE_APPEND);
774
+ }
775
+ }
776
+ if($break_flag == 'set')
777
+ {
778
+ break;
779
+ }
780
+ }
781
+
782
+
783
+ if($break_flag == '')
784
+ {
785
+ $dump_data = "\n\n\n";
786
+ file_put_contents($file, $dump_data, FILE_APPEND);
787
+ }
788
+ else
789
+ {
790
+ //$temp_sql_file_name = "DE_dbFailsafeCont"."-".$callCount.".sql";
791
+ file_put_contents($file, $dump_data, FILE_APPEND);
792
+ $callCount++;
793
+ //$response_array['status'] = 'partiallyCompleted';
794
+ $response_array['callCount'] = $callCount;
795
+ $db_final_response['success']['response_data'] = $response_array;
796
+ $db_final_response['success']['breakingCount'] = $i;
797
+ $db_final_response['success']['status'] = 'partiallyCompleted';
798
+ $db_final_response['success']['parentHID'] = $historyID;
799
+ $db_final_response['success']['backupParentHID'] = $historyID;
800
+ $db_final_response['success']['nextFunc'] = 'backupDBPHP';
801
+ $db_final_response['success']['file'] = $file;
802
+ $db_final_response['success']['backup_file'] = $backup_file;
803
+ $db_final_response['success']['backup_url'] = $backup_url;
804
+ $db_final_response['success']['account_info'] = $account_info;
805
+
806
+ //$this->statusLog($historyID, array('stage' => $backupStage, 'status' => 'completed', 'statusMsg' => 'singleCallCompleted'));
807
+ $this->statusLog($historyID, array('stage' => $backupStage, 'status' => 'completed', 'statusMsg' => 'singleDBCallPartiallyCompleted','nextFunc' => 'backupDBPHP', 'responseParams' => $db_final_response['success']));
808
+ $db_res_array = array();
809
+ $db_res_array['status'] = $db_final_response['success']['status'];
810
+ $db_res_array['backupParentHID'] = $db_final_response['success']['backupParentHID'];
811
+ $db_res_array['parentHID'] = $db_final_response['success']['parentHID'];
812
+ return $db_res_array;
813
+
814
+ break;
815
+ }
816
+
817
+ unset($rows);
818
+ unset($dump_data);
819
+ }
820
+
821
+ unset($tables);
822
+ iwp_mmb_print_flush('DB DUMP PHP Fail-safe: End');
823
+
824
+
825
+ if (iwp_mmb_get_file_size($file) == 0 || !is_file($file))
826
+ {
827
+ //@unlink($file);
828
+ $this->statusLog($historyID, array('stage' => $backupStage, 'status' => 'error', 'statusMsg' => 'DatabaseBackupFailed', 'statusCode' => 'database_backup_failed'));
829
+ return array(
830
+ 'error' => 'Database backup failed. Try to enable MySQL dump on your server.', 'error_code' => 'database_backup_failed_try_to_enable_mysql_dump_on_your_server' //returning here may not be necessary
831
+ );
832
+ }
833
+ $db_final_response['success']['response_data'] = $response_array;
834
+ $db_final_response['success']['backup_file'] = $backup_file;
835
+ $db_final_response['success']['backup_url'] = $backup_url;
836
+ $db_final_response['success']['parentHID'] = $historyID;
837
+ $db_final_response['success']['backupParentHID'] = $historyID;
838
+ $db_final_response['success']['nextFunc'] = 'backupDBZip';
839
+ $db_final_response['success']['account_info'] = $account_info;
840
+ //$this->statusLog($historyID, "backupDB", true, "completed", $params, true);
841
+ //$this->statusLog($historyID, array('stage' => $backupStage, 'status' => 'completed', 'statusMsg' => 'backupDBCompleted'));
842
+ $db_final_response['success']['status'] = 'partiallyCompleted';
843
+ unset($response_array);
844
+ $this->statusLog($historyID, array('stage' => $backupStage, 'status' => 'completed', 'statusMsg' => 'backupDBCompleted','nextFunc' => 'backupDBZip', 'responseParams' => $db_final_response['success']));
845
+ unset($db_final_response['success']['response_data']);
846
+ //to continue in the same call
847
+ if(($db_loop_break_time - $total_time_part) > 5)
848
+ {
849
+ return $this->backupDBZip($historyID);
850
+ }
851
+ else
852
+ {
853
+ $db_res_array = array();
854
+ $db_res_array['status'] = $db_final_response['success']['status'];
855
+ $db_res_array['backupParentHID'] = $db_final_response['success']['backupParentHID'];
856
+ $db_res_array['parentHID'] = $db_final_response['success']['parentHID'];
857
+ return $db_res_array;
858
+ }
859
+
860
+ }
861
+
862
+ function backupFiles($historyID, $backup_file='', $account_info = array(), $exclude = array(), $include = array())
863
+ {
864
+ $this -> hisID = $historyID;
865
+
866
+ //for exclude and include
867
+ $requestParams = $this->getRequiredData($historyID, "requestParams");
868
+ $exclude = $requestParams['args']['exclude'];
869
+ $include = $requestParams['args']['include'];
870
+ $exclude_extensions = $requestParams['args']['exclude_extensions'];
871
+ $exclude_file_size = $requestParams['args']['exclude_file_size'];
872
+ if(empty($exclude_extensions))
873
+ {
874
+ $exclude_extensions = array();
875
+ }
876
+ else if($exclude_extensions == 'eg. .zip,.mp4')
877
+ {
878
+ $exclude_extensions = array();
879
+ }
880
+ else
881
+ {
882
+ $exclude_extensions_array = explode(",",$exclude_extensions);
883
+ $exclude_extensions = array();
884
+ $exclude_extensions = $exclude_extensions_array;
885
+ }
886
+ if($backup_file != '')
887
+ {
888
+ $this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'processing', 'statusMsg' => 'backupFilesInitiated'));
889
+ }
890
+ $backup_url = $this -> backup_url;
891
+ if($backup_file == '')
892
+ {
893
+ $responseParams = $this -> getRequiredData($this -> hisID, "responseParams");
894
+ $backup_file = $responseParams['response_data']['backup_file'];
895
+ $backup_url = $responseParams['response_data']['backup_url'];
896
+ $category = $responseParams['category'];
897
+ $account_info = $responseParams['response_data']['account_info'];
898
+ $zip_split_part = $responseParams['response_data']['zip_split_part'];
899
+ if(empty($zip_split_part))
900
+ {
901
+ $zip_split_part = 0;
902
+ }
903
+ $this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'processing', 'statusMsg' => 'backupFilesInitiated','responseParams' => $responseParams));
904
+ }
905
+ /* if($category == "fileZipAfterDBZip")
906
+ {
907
+ $account_info = $responseParams['account_info'];
908
+ } */
909
+
910
+
911
+
912
+ //Always remove backup folders
913
+ $remove = array(
914
+ trim(basename(WP_CONTENT_DIR)) . "/infinitewp/backups",
915
+ trim(basename(WP_CONTENT_DIR)) . "/" . md5('iwp_mmb-client') . "/iwp_backups",
916
+ trim(basename(WP_CONTENT_DIR)) . "/cache",
917
+ trim(basename(WP_CONTENT_DIR)) . "/w3tc"
918
+ );
919
+
920
+ if((!empty($exclude_file_size))||(!empty($exclude_extensions)))
921
+ {
922
+ //removing files which are larger than the specified size
923
+ $total_files_array = get_all_files_from_dir(ABSPATH, $remove);
924
+ $files_excluded_by_size = array();
925
+ foreach($total_files_array as $key => $value)
926
+ {
927
+ $this_base_name = basename($value);
928
+ $skip_after_ext = false;
929
+ //file extension based exclude
930
+ if(is_array($exclude_extensions) && (!empty($exclude_extensions)))
931
+ {
932
+ foreach($exclude_extensions as $ext)
933
+ {
934
+ $this_pos = strrpos($this_base_name, $ext);
935
+ if($this_pos !== false)
936
+ {
937
+ if(substr($this_base_name, $this_pos) == $ext)
938
+ {
939
+ $files_excluded_by_size[] = substr($value, strlen(ABSPATH));
940
+ $skip_after_ext = true; //to skip the file exclude by size
941
+ break;
942
+ }
943
+ }
944
+ }
945
+ }
946
+ if($skip_after_ext)
947
+ {
948
+ continue;
949
+ }
950
+ //file size based exclude
951
+ if(!empty($exclude_file_size))
952
+ {
953
+ if(iwp_mmb_get_file_size($value) >= $exclude_file_size*1024*1024)
954
+ {
955
+ $files_excluded_by_size[] = substr($value, strlen(ABSPATH));
956
+ }
957
+ }
958
+ }
959
+ $remove = array_merge($remove, $files_excluded_by_size);
960
+ }
961
+ $exclude = array_merge($exclude, $remove);
962
+
963
+ //Exclude paths
964
+
965
+
966
+ //Include paths by default
967
+ $add = array(
968
+ trim(WPINC),
969
+ trim(basename(WP_CONTENT_DIR)),
970
+ "wp-admin"
971
+ );
972
+ chdir(ABSPATH);
973
+ $include_data = array();
974
+ if (!empty($include) && is_array($include)) {
975
+ foreach ($include as $data) {
976
+ if ($data && file_exists(ABSPATH . $data))
977
+ $include_data[] = ABSPATH . $data . '/';
978
+ }
979
+ }
980
+
981
+ foreach ($add as $data) {
982
+ if (file_exists(ABSPATH . $data))
983
+ $include_data[] = ABSPATH . $data . '/';
984
+ }
985
+
986
+ //Include root files
987
+ if ($handle = opendir(ABSPATH)) {
988
+ while (false !== ($file = readdir($handle))) {
989
+ if ($file != "." && $file != ".." && !is_dir($file) && file_exists(ABSPATH . $file)) {
990
+ $include_data[] = ABSPATH . $file;
991
+ }
992
+ }
993
+ closedir($handle);
994
+ }
995
+
996
+ //exclude paths
997
+ $exclude_data = array();
998
+ if (!empty($exclude) && is_array($exclude)) {
999
+ foreach ($exclude as $data) {
1000
+ if (is_dir(ABSPATH . $data))
1001
+ $exclude_data[] = $data . '/';
1002
+ else
1003
+ $exclude_data[] = $data;
1004
+ }
1005
+ }
1006
+
1007
+ foreach ($remove as $rem) {
1008
+ $exclude_data[] = $rem . '/';
1009
+ }
1010
+
1011
+ iwp_mmb_print_flush('Exclude Include Time Taken');
1012
+
1013
+ $result_arr = array();
1014
+ $result_arr['response_data']['nextCount'] = 0;
1015
+ $result_arr['status'] = 'processing';
1016
+ $result_arr['category'] = $category;
1017
+ $result_arr['response_data']['include_data'] = $include_data;
1018
+ $result_arr['response_data']['exclude_data'] = $exclude_data;
1019
+ $result_arr['response_data']['backup_file'] = $backup_file;
1020
+ $result_arr['response_data']['backup_url'] = $backup_url;
1021
+ $result_arr['response_data']['account_info'] = $account_info;
1022
+ $result_arr['response_data']['zip_split_part'] = $zip_split_part;
1023
+ //$result_arr['response_data']['files_excluded_by_size'] = $files_excluded_by_size;
1024
+
1025
+ $this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'processing', 'statusMsg' => 'backupFileSingleCallStage1Complete','responseParams' => $result_arr));
1026
+ unset($result_arr);
1027
+ $result = $this->backupFilesZIP($this -> hisID);
1028
+ return $result;
1029
+ }
1030
+
1031
+
1032
+ function backupFilesZIP($historyID)
1033
+ {
1034
+ $this -> hisID = $historyID;
1035
+ $files_to_zip = '';
1036
+ $files_with_error = array();
1037
+ $files_excluded_by_size = array();
1038
+ $start34 = microtime(true);
1039
+ //get the backup settings values from options table
1040
+ $this -> backup_settings_vals = get_option('iwp_client_multi_backup_temp_values', $backup_settings_values);
1041
+ $backup_settings_values = $this -> backup_settings_vals;
1042
+ //$file_block_size = $backup_settings_values['file_block_size'];
1043
+ //$is_compressed = $backup_settings_values['is_compressed'];
1044
+ //$file_loop_break_time = $backup_settings_values['file_loop_break_time'];
1045
+ //$task_name = $backup_settings_values['task_name'];
1046
+
1047
+ //get the settings by other method
1048
+ $requestParams = $this->getRequiredData($historyID, "requestParams");
1049
+ $file_block_size = $requestParams['args']['file_block_size']; //darkcode changed
1050
+ $is_compressed = $requestParams['args']['is_compressed'];
1051
+ $file_loop_break_time = $requestParams['args']['file_loop_break_time'];
1052
+ $task_name = $requestParams['args']['backup_name'];
1053
+ $exclude_file_size = $requestParams['args']['exclude_file_size'];
1054
+ $zip_split_size = $requestParams['args']['zip_split_size'];
1055
+
1056
+ if($backup_settings_values['dbFileHashValue'][$historyID])
1057
+ {
1058
+ $dbFileHashValue = $backup_settings_values['dbFileHashValue'][$historyID];
1059
+ }
1060
+ else
1061
+ {
1062
+ $dbFileHashValue = array();
1063
+ }
1064
+ $responseParams = $this -> getRequiredData($historyID,"responseParams");
1065
+ $category = $responseParams['category']; //Am getting the category to perform the dbZip actions
1066
+
1067
+ if(!$responseParams)
1068
+ {
1069
+ return $this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'error', 'statusMsg' => 'Backup of files failed - Error while fetching table data', 'statusCode' => 'backup_of_files_failed_error_while_fetching_table_data'));
1070
+ }
1071
+
1072
+ $include_data = $responseParams['response_data']['include_data'];
1073
+ $exclude_data = $responseParams['response_data']['exclude_data'];
1074
+ $backup_file = $responseParams['response_data']['backup_file'];
1075
+ $backup_url = $responseParams['response_data']['backup_url'];
1076
+ $nextCount = $responseParams['response_data']['nextCount'];
1077
+ $account_info = $responseParams['response_data']['account_info'];
1078
+ $files_with_error = $responseParams['response_data']['files_with_error'];
1079
+ $files_excluded_by_size = $responseParams['response_data']['files_excluded_by_size'];
1080
+ $p_filedescr_list = $responseParams['response_data']['p_filedescr_list'];
1081
+ $zip_split_part = $responseParams['response_data']['zip_split_part'];
1082
+ $is_new_zip = $responseParams['response_data']['is_new_zip'];
1083
+ /* if(empty($zip_split_part))
1084
+ {
1085
+ $zip_split_part = 1;
1086
+ } */
1087
+ if((!empty($zip_split_part))&&(!empty($is_new_zip)))
1088
+ {
1089
+ if(strpos($backup_file, '_iwp_part_'))
1090
+ {
1091
+ $backup_file = substr($backup_file, 0, strpos($backup_file, '_iwp_part_')).'_iwp_part_'.$zip_split_part.'.zip';
1092
+ $backup_url = substr($backup_url, 0, strpos($backup_url, '_iwp_part_')).'_iwp_part_'.$zip_split_part.'.zip';
1093
+ }
1094
+ else
1095
+ {
1096
+ $backup_file = substr($backup_file, 0, strpos($backup_file, '.zip')).'_iwp_part_'.$zip_split_part.'.zip';
1097
+ $backup_url = substr($backup_url, 0, strpos($backup_url, '.zip')).'_iwp_part_'.$zip_split_part.'.zip';
1098
+ }
1099
+ }
1100
+ else
1101
+ {
1102
+ $zip_split_part = 0;
1103
+ }
1104
+
1105
+ if(!$p_filedescr_list)
1106
+ {
1107
+ $p_filedescr_list = array();
1108
+ }
1109
+ if(!$files_with_error)
1110
+ {
1111
+ $files_with_error = array();
1112
+ }
1113
+ if(!$files_excluded_by_size)
1114
+ {
1115
+ $files_excluded_by_size = array();
1116
+ }
1117
+
1118
+ include_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
1119
+ //define('PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
1120
+
1121
+ //include_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.split.php';
1122
+ $returnArr = array();
1123
+ if(!$nextCount)
1124
+ {
1125
+ $nextCount = 0;
1126
+ }
1127
+ if((($nextCount != 0)||($category == 'fileZipAfterDBZip'))&&(empty($is_new_zip)))
1128
+ {
1129
+ unset($responseParams);
1130
+ $initialFileSize = iwp_mmb_get_file_size($backup_file)/1024/1024;
1131
+ $returnArr = $this->backupFilesNext($include_data, $exclude_data, $backup_file, $backup_url, $nextCount, $p_filedescr_list, $account_info, $files_with_error, $files_excluded_by_size, $zip_split_part);
1132
+ $fileNextTimeTaken = microtime(true) - $this->iwpScriptStartTime;
1133
+ echo "<br>Total file size".(iwp_mmb_get_file_size($backup_file)/1024/1024);
1134
+ $file_size_in_this_call = (iwp_mmb_get_file_size($backup_file)/1024/1024) - $initialFileSize;
1135
+ echo "<br>file size in this call".$file_size_in_this_call;
1136
+ echo "<br>Time taken in this call ".$fileNextTimeTaken."<br>";
1137
+ if(($file_size_in_this_call == 0) && !(is_array($returnArr) && !empty($returnArr['error'])) && !(is_array($returnArr) && !empty($returnArr['isGetFileList'])))
1138
+ {
1139
+ return array( 'error' => 'Zip-error: Unable to zip', 'error_code' => 'zip_error_unable_to_zip');
1140
+ }
1141
+ return $returnArr;
1142
+ }
1143
+ else
1144
+ {
1145
+ //$nextCount = 0;
1146
+ $this->statusLog($this->hisID, array('stage' => 'backupFiles', 'status' => 'processing', 'statusMsg' => 'backupSingleCallInitiated','responseParams' => $responseParams));
1147
+
1148
+ $time = microtime(true);
1149
+ $start = $time;
1150
+ //$archive = new IWPPclZip('../archive.zip');
1151
+ $archive = new IWPPclZip($backup_file);
1152
+ if($category == 'dbZip')
1153
+ {
1154
+ if(empty($p_filedescr_list))
1155
+ {
1156
+ //define('PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
1157
+ $p_filedescr_list_array = $archive->getFileList(IWP_DB_DIR, PCLZIP_OPT_REMOVE_PATH, IWP_BACKUP_DIR, PCLZIP_OPT_CHUNK_BLOCK_SIZE, $file_block_size, PCLZIP_OPT_HISTORY_ID, $historyID); //darkCode set the file block size here .. static values
1158
+ $p_filedescr_list = $p_filedescr_list_array['p_filedescr_list'];
1159
+ unset($p_filedescr_list_array['p_filedescr_list']);
1160
+
1161
+ if($p_filedescr_list_array['status'] == 'partiallyCompleted')
1162
+ {
1163
+ $result_arr = array();
1164
+ $result_arr = $responseParams;
1165
+ $result_arr['nextFunc'] = 'backupFilesZIP';
1166
+ $result_arr['response_data']['p_filedescr_list'] = $p_filedescr_list;
1167
+ unset($p_filedescr_list);
1168
+ $result_arr['response_data']['complete_folder_list'] = $p_filedescr_list_array['complete_folder_list'];
1169
+ unset($p_filedescr_list_array);
1170
+ $this->statusLog($this -> hisID, array('stage' => 'gettingFileList', 'status' => 'processing', 'statusMsg' => 'gettingFileListInMultiCall','responseParams' => $result_arr));
1171
+ $resArray = array();
1172
+ $resArray['status'] = 'partiallyCompleted';
1173
+ $resArray['backupParentHID'] = $historyID;
1174
+ return $resArray;
1175
+ }
1176
+ elseif(($p_filedescr_list_array['status'] == 'error')||(!$p_filedescr_list_array))
1177
+ {
1178
+ return $this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'error', 'statusMsg' => 'Backup of files failed - Error while preparing file list', 'statusCode' => 'dbZip_backup_of_files_failed_error_while_preparing_file_list'));
1179
+ }
1180
+ elseif($p_filedescr_list_array['status'] == 'completed')
1181
+ {
1182
+
1183
+ }
1184
+ }
1185
+ }
1186
+ else
1187
+ {
1188
+ if(empty($p_filedescr_list))
1189
+ {
1190
+ $p_filedescr_list_array = $archive->getFileList($include_data, PCLZIP_OPT_REMOVE_PATH, ABSPATH, PCLZIP_OPT_IWP_EXCLUDE, $exclude_data, PCLZIP_OPT_CHUNK_BLOCK_SIZE, $file_block_size, PCLZIP_OPT_HISTORY_ID, $historyID); //testing darkCode set the file block size here .. static values
1191
+
1192
+ $p_filedescr_list = $p_filedescr_list_array['p_filedescr_list'];
1193
+ unset($p_filedescr_list_array['p_filedescr_list']);
1194
+ $next_file_index = $p_filedescr_list_array['next_file_index'];
1195
+
1196
+ /* $resArray = array();
1197
+ $resArray['status'] = 'completed';
1198
+ //$resArray['backupParentHID'] = $historyID;
1199
+ return $resArray;
1200
+ exit; */
1201
+
1202
+ if($p_filedescr_list_array['status'] == 'partiallyCompleted')
1203
+ {
1204
+ $result_arr = array();
1205
+ $result_arr = $responseParams;
1206
+ $result_arr['nextFunc'] = 'backupFilesZIP';
1207
+ $result_arr['response_data']['p_filedescr_list'] = $p_filedescr_list;
1208
+ unset($p_filedescr_list);
1209
+ $result_arr['response_data']['next_file_index'] = $next_file_index;
1210
+ $result_arr['response_data']['complete_folder_list'] = $p_filedescr_list_array['complete_folder_list'];
1211
+ unset($p_filedescr_list_array);
1212
+ $this->statusLog($this -> hisID, array('stage' => 'gettingFileList', 'status' => 'processing', 'statusMsg' => 'gettingFileListInMultiCall','responseParams' => $result_arr));
1213
+
1214
+ $resArray = array();
1215
+ $resArray['status'] = 'partiallyCompleted';
1216
+ $resArray['backupParentHID'] = $historyID;
1217
+ return $resArray;
1218
+ }
1219
+ elseif(($p_filedescr_list_array['status'] == 'error')||(!$p_filedescr_list_array))
1220
+ {
1221
+ return $this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'error', 'statusMsg' => 'Backup of files failed - Error while preparing file list', 'statusCode' => 'backup_of_files_failed_error_while_preparing_file_list'));
1222
+ }
1223
+ elseif($p_filedescr_list_array['status'] == 'completed')
1224
+ {
1225
+
1226
+ }
1227
+ }
1228
+ }
1229
+ //usort($p_filedescr_list, "cmp");
1230
+ $p_options = array ( //darkCode static values
1231
+ 77021 => true, //tempFile ON
1232
+ 77007 => !($is_compressed), //if we dont need to compress .. set as true
1233
+ 77020 => 63082332, //setting tempFIle threshold value here
1234
+ 78999 => $file_block_size,
1235
+ );
1236
+ $v_result = 1;
1237
+ $v_header = array();
1238
+ $p_result_list = array();
1239
+ $v_nb = sizeof($p_result_list);
1240
+ $v_header_list = array();
1241
+ $v_comment = '';
1242
+ //$nextCount = 0;
1243
+ $archive->privOpenFd('wb');
1244
+ $p_filedescr_list_omitted = array();
1245
+ $omitted_flag = '';
1246
+ $p_filedescr_list_size = sizeof($p_filedescr_list);
1247
+ echo "loopStarted";
1248
+ for ($j=$nextCount; ($j<$p_filedescr_list_size) && ($v_result==1); $j++) {
1249
+ // ----- Format the filename
1250
+ $p_filedescr_list[$j]['filename'] = IWPPclZipUtilTranslateWinPath($p_filedescr_list[$j]['filename'], false);
1251
+
1252
+ // ----- Skip empty file names
1253
+
1254
+ // TBC : Can this be possible ? not checked in DescrParseAtt ?
1255
+ if ($p_filedescr_list[$j]['filename'] == "") {
1256
+ continue;
1257
+ }
1258
+
1259
+ // ----- Check the filename
1260
+ if ( ($p_filedescr_list[$j]['type'] != 'virtual_file')
1261
+ && (!file_exists($p_filedescr_list[$j]['filename']))) {
1262
+ echo 'FILE DOESNT EXIST';
1263
+ }
1264
+
1265
+ // ----- Look if it is a file or a dir with no all path remove option
1266
+ // or a dir with all its path removed
1267
+ // if ( (is_file($p_filedescr_list[$j]['filename']))
1268
+ // || ( is_dir($p_filedescr_list[$j]['filename'])
1269
+ if ( ($p_filedescr_list[$j]['type'] == 'file')
1270
+ || ($p_filedescr_list[$j]['type'] == 'virtual_file')
1271
+ || ( ($p_filedescr_list[$j]['type'] == 'folder')
1272
+ && ( !isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH])
1273
+ || !$p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))
1274
+ ) {
1275
+
1276
+ $time = microtime(true);
1277
+ $finish_part = $time;
1278
+ $total_time_part = $finish_part - $start;
1279
+ /* if(($total_time_part > 2)&&($p_filedescr_list[$j]['size'] > 5000000))
1280
+ {
1281
+ $p_filedescr_list_omitted[$j] = $p_filedescr_list[$j];
1282
+ $v_nb++;
1283
+ $nextCount = $v_nb;
1284
+ $omitted_flag = 'set';
1285
+ continue;
1286
+
1287
+ }
1288
+ */
1289
+ // ----- Add the file
1290
+ $v_result = $archive->privAddFile($p_filedescr_list[$j], $v_header, $p_options);
1291
+
1292
+ // ----- Store the file infos
1293
+ $p_result_list[$v_nb++] = $v_header;
1294
+ $nextCount = $j+1;
1295
+
1296
+ if ($v_result != 1) {
1297
+ echo 'Error zipping this file'.$p_filedescr_list[$j]['filename'];
1298
+ $files_with_error[] = $p_filedescr_list[$j]['filename'];
1299
+ if($v_result == -10)
1300
+ {
1301
+ return $this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => 'Zip-error: Error compressing the file "'.$p_filedescr_list[$j]['filename'].'".Try excluding this file and try again.', 'statusCode' => 'zip_error_while_compressing_file'));
1302
+ }
1303
+ continue;
1304
+ //return $v_result;
1305
+ }
1306
+ }
1307
+
1308
+ $time = microtime(true);
1309
+ $finish = $time;
1310
+ $total_time = $finish - $this->iwpScriptStartTime;
1311
+ //if(($total_time > $file_loop_break_time)||) //darkCode static Values
1312
+ $buffer_size = $zip_split_size*1024*1024 - 3*1024*1024*$file_block_size;
1313
+ $is_new_zip = false;
1314
+ if(($total_time > $file_loop_break_time)||(iwp_mmb_get_file_size($backup_file) >= $buffer_size))
1315
+ {
1316
+ if(iwp_mmb_get_file_size($backup_file) >= $buffer_size)
1317
+ {
1318
+ $zip_split_part += 1;
1319
+ $is_new_zip = true;
1320
+ }
1321
+ break;
1322
+ }
1323
+ //iwp_mmb_print_flush("|");
1324
+ iwp_mmb_auto_print("multiCallZip");
1325
+ echo("|");
1326
+ }
1327
+ echo "loopEnded";
1328
+ $v_offset = @ftell($archive->zip_fd);
1329
+ $v_header_list = $p_result_list;
1330
+ //$nextCount = sizeof($p_result_list);
1331
+ for ($i=0,$v_count=0; $i<sizeof($v_header_list); $i++)
1332
+ {
1333
+ // ----- Create the file header
1334
+ if ($v_header_list[$i]['status'] == 'ok') {
1335
+ if (($v_result = $archive->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
1336
+ // ----- Return
1337
+ echo 'error writing header';
1338
+ //return $v_result;
1339
+ }
1340
+ $v_count++;
1341
+ }
1342
+
1343
+ // ----- Transform the header to a 'usable' info
1344
+ $archive->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
1345
+ }
1346
+ $v_size = @ftell($archive->zip_fd)-$v_offset;
1347
+ $archive->privWriteCentralHeader($v_count, $v_size, $v_offset, $v_comment);
1348
+ $archive->privCloseFd();
1349
+ echo 'next Count -'.$nextCount;
1350
+ if(($nextCount == sizeof($p_filedescr_list)+1)||($nextCount == sizeof($p_filedescr_list)))
1351
+ {
1352
+ $nextCount = "completed";
1353
+ $status = "completed";
1354
+ }
1355
+ else
1356
+ {
1357
+ $status = "partiallyCompleted";
1358
+ }
1359
+ $result_arr = array();
1360
+
1361
+ //return $p_result_list;
1362
+ $result_arr['response_data']['nextCount'] = $nextCount;
1363
+ $result_arr['status'] = $status;
1364
+ $result_arr['category'] = $category;
1365
+ $result_arr['nextFunc'] = 'backupFilesZIP';
1366
+ $result_arr['response_data']['include_data'] = $include_data;
1367
+ $result_arr['response_data']['exclude_data'] = $exclude_data;
1368
+ $result_arr['response_data']['backup_file'] = $backup_file;
1369
+ $result_arr['response_data']['backup_url'] = $backup_url;
1370
+ $result_arr['response_data']['account_info'] = $account_info;
1371
+ $result_arr['response_data']['files_with_error'] = $files_with_error;
1372
+ $result_arr['response_data']['files_excluded_by_size'] = $files_excluded_by_size;
1373
+ $result_arr['response_data']['is_new_zip'] = $is_new_zip;
1374
+ //$result_arr['response_data']['p_filedescr_list'] = $p_filedescr_list;
1375
+ $result_arr['response_data']['zip_split_part'] = $zip_split_part;
1376
+ $resArray = array (
1377
+ 'responseData' =>
1378
+ array (
1379
+ 'stage' => 'backupFiles',
1380
+ 'status' => 'completed',
1381
+
1382
+ ),
1383
+ 'parentHID' => $this -> hisID,
1384
+ 'nextFunc' => 'backupFilesZIP',
1385
+ 'status' => $status,
1386
+ 'backupParentHID' => $this -> hisID,
1387
+ 'category' => $category,
1388
+ );
1389
+ if(($nextCount == 0)&&($nextCount != 'completed'))
1390
+ {
1391
+ $this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'error', 'statusMsg' => 'backupFileSingleCall'.$status, 'statusCode' => 'backup_file_single_call_error', 'responseParams' => $result_arr));
1392
+ $nextFunc = 'error';
1393
+ $status = 'error';
1394
+ return array('error' => 'Must be error');
1395
+ }
1396
+ if($status == 'partiallyCompleted')
1397
+ {
1398
+ echo 'filesNextCount: '.$nextCount;
1399
+ echo 'totalFilesCount: '.count($p_filedescr_list);
1400
+ $result_arr['response_data']['p_filedescr_list'] = $p_filedescr_list;
1401
+ unset($p_filedescr_list);
1402
+ $this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'completed', 'statusMsg' => 'backupFileSingleCall'.$status,'nextFunc' => 'backupFilesZIP', 'responseParams' => $result_arr));
1403
+ unset($result_arr);
1404
+ }
1405
+ else
1406
+ {
1407
+ $main_category = $this -> getRequiredData($historyID,"category");
1408
+ if(($main_category == 'full')&&($category != 'fileZipAfterDBZip'))
1409
+ {
1410
+ //storing hash values of db-file if any
1411
+ $backup_settings_values['dbFileHashValue'][$historyID] = $this -> getHashValuesArray($p_filedescr_list);
1412
+ update_option('iwp_client_multi_backup_temp_values', $backup_settings_values);
1413
+
1414
+ $result_arr['category'] = 'fileZipAfterDBZip';
1415
+ $result_arr['nextFunc'] = 'backupFiles';
1416
+ $resArray['response_data']['backup_file'] = $backup_file;
1417
+ $resArray['status'] = 'partiallyCompleted'; //Here am setting partiallyCompleted to continue the loop for the full(both db and files) method
1418
+ $result_arr['status'] = 'partiallyCompleted';
1419
+ $this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'partiallyCompleted', 'statusMsg' => 'backupFileSingleCall'.$status,'nextFunc' => 'backupFiles', 'responseParams' => $result_arr));
1420
+ }
1421
+ else
1422
+ {
1423
+ $paths = array();
1424
+ $tempPaths = array();
1425
+
1426
+ $backup_files_array = $this->get_files_array_from_iwp_part($backup_file);
1427
+ $backup_file = array();
1428
+ $backup_file = $backup_files_array;
1429
+
1430
+ $backup_url_array = $this->get_files_array_from_iwp_part($backup_url);
1431
+ $backup_url = array();
1432
+ $backup_url = $backup_url_array;
1433
+
1434
+ $size = round($this->get_total_files_size($backup_file) / 1024, 2);
1435
+ if ($size > 1000) {
1436
+ $paths['size'] = round($size / 1024, 2) . " MB"; //Modified by IWP //Mb => MB
1437
+ } else {
1438
+ $paths['size'] = $size . 'KB'; //Modified by IWP //Kb => KB
1439
+ }
1440
+ $paths['backup_name'] = $task_name;
1441
+ $paths['mechanism'] = 'multicall';
1442
+ $paths['server'] = array(
1443
+ 'file_path' => $backup_file,
1444
+ 'file_url' => $backup_url);
1445
+
1446
+ $paths['time'] = time();
1447
+ $paths['adminHistoryID'] = $historyID;
1448
+ $paths['files_with_error'] = $files_with_error;
1449
+ $paths['files_excluded_by_size'] = $files_excluded_by_size;
1450
+ //$paths['hashValues'] = $this -> getHashValuesArray($p_filedescr_list);
1451
+ //$paths['hashValues'] = array_merge($dbFileHashValue, $paths['hashValues']);
1452
+ unset($p_filedescr_list);
1453
+ $tempPath = $paths;
1454
+ $paths['task_results'][$historyID] = $tempPath;
1455
+ if(empty($account_info))
1456
+ {
1457
+ $result_arr['nextFunc'] = 'backupFilesZIPOver';
1458
+ }
1459
+ else
1460
+ {
1461
+ $resArray['status'] = 'partiallyCompleted'; //continuing the flow to backup_uploads
1462
+
1463
+ $result_arr['nextFunc'] = 'backup_uploads';
1464
+ $result_arr['status'] = 'partiallyCompleted';
1465
+ $result_arr['response_data']['backup_file'] = $backup_file;
1466
+ }
1467
+
1468
+ $this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'completed', 'statusMsg' => 'backupFileSingleCall'.$status, 'responseParams' => $result_arr,'task_result' => $paths));
1469
+
1470
+ if((($main_category != 'files')&&($category == 'dbZip')) || ($main_category == 'db'))
1471
+ {
1472
+ @unlink(IWP_BACKUP_DIR.'/iwp_db/index.php');
1473
+ @unlink(DB_NAME);
1474
+ @rmdir(IWP_DB_DIR);
1475
+ }
1476
+
1477
+ //verification
1478
+ if(is_array($backup_file))
1479
+ {
1480
+ foreach($backup_file as $key => $single_backup_file)
1481
+ {
1482
+ $verification_result = $this -> postBackupVerification($archive, $single_backup_file);
1483
+ if(!$verification_result)
1484
+ {
1485
+ return $this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => 'The zip file was corrupted while zipping', 'responseParams' => $result_arr));
1486
+ }
1487
+ }
1488
+ }
1489
+ //Remove the old backups (limit)
1490
+ $removed = $this->remove_old_backups($requestParams['task_name']);
1491
+ if (is_array($removed) && isset($removed['error'])) {
1492
+ //$error_message = $removed['error'];
1493
+ return $this->statusLog($this -> hisID, array('stage' => 'removingBackupFiles', 'status' => 'error', 'statusMsg' => 'Error while removing old backups. ('.$removed['error'].')', 'statusCode' => 'remove_old_backups_error_while_removing_old_backups', 'responseParams' => $result_arr));
1494
+ }
1495
+
1496
+ }
1497
+
1498
+ }
1499
+
1500
+ return $resArray;
1501
+
1502
+ }
1503
+ }
1504
+
1505
+ function get_total_files_size($backup_files)
1506
+ {
1507
+ if(is_array($backup_files))
1508
+ {
1509
+ $total_size = 0;
1510
+ foreach($backup_files as $key => $value)
1511
+ {
1512
+ $total_size += iwp_mmb_get_file_size($value);
1513
+ }
1514
+ return $total_size;
1515
+ }
1516
+ else
1517
+ {
1518
+ return iwp_mmb_get_file_size($backup_files);
1519
+ }
1520
+ }
1521
+
1522
+ function backupFilesNext($include_data, $exclude_data, $backup_file, $backup_url, $nextCount, $p_filedescr_list = array(), $account_info = array(), $files_with_error = array(), $files_excluded_by_size = array(), $zip_split_part = 0)
1523
+ {
1524
+ $historyID = $this -> hisID;
1525
+ $start34 = microtime(true);
1526
+ $is_new_zip = false;
1527
+ $backup_settings_values = $this -> backup_settings_vals;
1528
+ //$file_block_size = $backup_settings_values['file_block_size'];
1529
+ //$is_compressed = $backup_settings_values['is_compressed'];
1530
+ //$file_loop_break_time = $backup_settings_values['file_loop_break_time'];
1531
+ //$task_name = $backup_settings_values['task_name'];
1532
+
1533
+ //get the settings by other method
1534
+ $requestParams = $this->getRequiredData($historyID, "requestParams");
1535
+ $file_block_size = $requestParams['args']['file_block_size']; //darkcode changed
1536
+ $is_compressed = $requestParams['args']['is_compressed'];
1537
+ $file_loop_break_time = $requestParams['args']['file_loop_break_time'];
1538
+ $task_name = $requestParams['args']['backup_name'];
1539
+ $exclude_file_size = $requestParams['args']['exclude_file_size'];
1540
+ $zip_split_size = $requestParams['args']['zip_split_size'];
1541
+
1542
+ if($backup_settings_values['dbFileHashValue'][$historyID])
1543
+ $dbFileHashValue = $backup_settings_values['dbFileHashValue'][$historyID];
1544
+ else
1545
+ $dbFileHashValue = array();
1546
+
1547
+ $responseParams = $this -> getRequiredData($historyID,"responseParams");
1548
+ $category = $responseParams['category']; //Am getting the category to perform the dbZip actions
1549
+
1550
+ $this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'processing', 'statusMsg' => 'backupMultiCallInitiated', 'responseParams' => $responseParams));
1551
+
1552
+ $time = microtime(true);
1553
+ $start = $time;
1554
+ //include_once 'pclzip.class.php';
1555
+ //include_once 'pclzip.class.split.php';
1556
+ $archive = new IWPPclZip($backup_file);
1557
+ if($category == 'dbZip')
1558
+ {
1559
+ if(empty($p_filedescr_list)||($nextCount == 0))
1560
+ {
1561
+ $p_filedescr_list_array = $archive->getFileList(IWP_DB_DIR, PCLZIP_OPT_REMOVE_PATH, IWP_BACKUP_DIR, PCLZIP_OPT_CHUNK_BLOCK_SIZE, $file_block_size, PCLZIP_OPT_HISTORY_ID, $historyID);//darkCode set the file block size here .. static values
1562
+ $p_filedescr_list = $p_filedescr_list_array['p_filedescr_list'];
1563
+
1564
+ if($p_filedescr_list_array['status'] == 'partiallyCompleted')
1565
+ {
1566
+ $result_arr = array();
1567
+ $result_arr = $responseParams;
1568
+ $result_arr['nextFunc'] = 'backupFilesZIP';
1569
+ $result_arr['response_data']['p_filedescr_list'] = $p_filedescr_list;
1570
+ $result_arr['response_data']['next_file_index'] = $p_filedescr_list_array['next_file_index'];
1571
+ $result_arr['response_data']['complete_folder_list'] = $p_filedescr_list_array['complete_folder_list'];
1572
+ $this->statusLog($this -> hisID, array('stage' => 'gettingFileList', 'status' => 'processing', 'statusMsg' => 'gettingFileListInMultiCall','responseParams' => $result_arr));
1573
+
1574
+ $resArray = array();
1575
+ $resArray['status'] = 'partiallyCompleted';
1576
+ $resArray['backupParentHID'] = $historyID;
1577
+ return $resArray;
1578
+ }
1579
+ elseif(($p_filedescr_list_array['status'] == 'error')||(!$p_filedescr_list_array))
1580
+ {
1581
+ return $this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'error', 'statusMsg' => 'Backup of files failed - Error while preparing file list', 'statusCode' => 'backup_files_next_dbZip_backup_of_files_failed_error_while_preparing_file_list'));
1582
+ }
1583
+ elseif($p_filedescr_list_array['status'] == 'completed')
1584
+ {
1585
+
1586
+ }
1587
+ }
1588
+ }
1589
+ else
1590
+ {
1591
+ if(empty($p_filedescr_list)||($nextCount == 0))
1592
+ {
1593
+ $p_filedescr_list_array = $archive->getFileList($include_data, PCLZIP_OPT_REMOVE_PATH, ABSPATH, PCLZIP_OPT_IWP_EXCLUDE, $exclude_data, PCLZIP_OPT_CHUNK_BLOCK_SIZE, $file_block_size, PCLZIP_OPT_HISTORY_ID, $historyID); //testing darkCode set the file block size here .. static values
1594
+
1595
+ $p_filedescr_list = $p_filedescr_list_array['p_filedescr_list'];
1596
+
1597
+ if($p_filedescr_list_array['status'] == 'partiallyCompleted')
1598
+ {
1599
+ $result_arr = array();
1600
+ $result_arr = $responseParams;
1601
+ $result_arr['nextFunc'] = 'backupFilesZIP';
1602
+ $result_arr['response_data']['p_filedescr_list'] = $p_filedescr_list;
1603
+ unset($p_filedescr_list);
1604
+ unset($p_filedescr_list_array['p_filedescr_list']);
1605
+ $result_arr['response_data']['next_file_index'] = $p_filedescr_list_array['next_file_index'];
1606
+ $result_arr['response_data']['complete_folder_list'] = $p_filedescr_list_array['complete_folder_list'];
1607
+
1608
+ $this->statusLog($this -> hisID, array('stage' => 'gettingFileList', 'status' => 'processing', 'statusMsg' => 'gettingFileListInMultiCall','responseParams' => $result_arr));
1609
+ $timeTaken34 = microtime(true) - $start34;
1610
+ unset($p_filedescr_list_array);
1611
+ $resArray = array();
1612
+ $resArray['status'] = 'partiallyCompleted';
1613
+ $resArray['backupParentHID'] = $historyID;
1614
+ $resArray['isGetFileList'] = true;
1615
+ return $resArray;
1616
+ }
1617
+ elseif(($p_filedescr_list_array['status'] == 'error')||(!$p_filedescr_list_array))
1618
+ {
1619
+ return $this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'error', 'statusMsg' => 'Backup of files failed - Error while preparing file list', 'statusCode' => 'backup_files_next_p_filedescr_list_array_dbZip_backup_of_files_failed_Error_while_preparing_file_list'));
1620
+ }
1621
+ elseif($p_filedescr_list_array['status'] == 'completed')
1622
+ {
1623
+
1624
+ }
1625
+ }
1626
+ }
1627
+ $archive->privDisableMagicQuotes();
1628
+ if (($v_result=$archive->privOpenFd('rb+')) != 1)
1629
+ {
1630
+ $archive->privSwapBackMagicQuotes();
1631
+ $this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => 'openingFileError', 'statusCode' => 'opening_file_error'));
1632
+ return array( 'error' => 'Zip-error: Error opening file', 'error_code' => 'zip_error_opening_file');
1633
+ //return $v_result;
1634
+ }
1635
+ clearstatcache();
1636
+ // ----- Read the central directory informations
1637
+ $v_central_dir = array();
1638
+ if (($v_result = $archive->privReadEndCentralDir($v_central_dir)) != 1)
1639
+ {
1640
+ echo 'error2';
1641
+ $archive->privCloseFd();
1642
+ $archive->privSwapBackMagicQuotes();
1643
+ if(is_array($v_result) && !empty($v_result['error']))
1644
+ {
1645
+ return $this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => $v_result['error'], 'statusCode' => 'priv_read_end_central_dir_error'));
1646
+ }
1647
+ else
1648
+ {
1649
+ return $this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => 'Zip-error: Error reading end directory', 'statusCode' => 'zip_error_error_reading_end_directory'));
1650
+ }
1651
+ }
1652
+
1653
+ // ----- Go to beginning of File
1654
+ @rewind($archive->zip_fd);
1655
+
1656
+ // ----- Creates a temporay file
1657
+ $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
1658
+
1659
+ // ----- Open the temporary file in write mode
1660
+ if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb+')) == 0)
1661
+ {
1662
+ $archive->privCloseFd();
1663
+ $archive->privSwapBackMagicQuotes();
1664
+ echo 'error3';
1665
+ return $this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => 'Unable to open temporary file', 'statusCode' => 'unable_to_open_temporary_file')); // ----- Return
1666
+
1667
+ }
1668
+
1669
+ // ----- Copy the files from the archive to the temporary file
1670
+ // TBC : Here I should better append the file and go back to erase the central dir
1671
+ $v_size = $v_central_dir['offset'];
1672
+
1673
+ fseek($archive->zip_fd, $v_size, SEEK_SET);
1674
+ $actualFileSize = iwp_mmb_get_file_size($backup_file);
1675
+
1676
+ while ($actualFileSize != 0)
1677
+ {
1678
+ $v_read_size = ($actualFileSize < PCLZIP_READ_BLOCK_SIZE ? $actualFileSize : PCLZIP_READ_BLOCK_SIZE);
1679
+ $v_buffer = fread($archive->zip_fd, $v_read_size);
1680
+ @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
1681
+ $actualFileSize -= $v_read_size;
1682
+ }
1683
+
1684
+ // ----- Swap the file descriptor
1685
+ // Here is a trick : I swap the temporary fd with the zip fd, in order to use
1686
+ // the following methods on the temporary fil and not the real archive
1687
+ /* $v_swap = $archive->zip_fd;
1688
+ $archive->zip_fd = $v_zip_temp_fd;
1689
+ $v_zip_temp_fd = $v_swap; */
1690
+ //usort($p_filedescr_list, "cmp");
1691
+
1692
+
1693
+ //truncate the file after just at the begining of central header
1694
+ fseek($archive->zip_fd, $v_size, SEEK_SET);
1695
+ $truncateResult = ftruncate($archive->zip_fd, $v_size);
1696
+ clearstatcache();
1697
+
1698
+
1699
+ $p_options = array ( //darkCode static values
1700
+ 77021 => true, //using temp method
1701
+ 77007 => !($is_compressed), //if no compression is needed set as true
1702
+ 77020 => 63082332,
1703
+ );
1704
+ $v_result = 1;
1705
+ $v_header = array();
1706
+ $p_result_list = array();
1707
+ $v_header_list = array();
1708
+ $v_nb = sizeof($v_header_list);
1709
+ $v_comment = '';
1710
+ //$nextCount = $_REQUEST['nextCount'];
1711
+ $omitted_flag = '';
1712
+ $nextCountHere = 0;
1713
+ $p_filedescr_list_size = sizeof($p_filedescr_list);
1714
+ $timeBeforeAdd = microtime(true) - $start34;
1715
+ iwp_mmb_print_flush("loopStarted");
1716
+ for ($j=($nextCount); ($j<$p_filedescr_list_size) && ($v_result==1); $j++) {
1717
+ // ----- Format the filename
1718
+ $p_filedescr_list[$j]['filename']
1719
+ = IWPPclZipUtilTranslateWinPath($p_filedescr_list[$j]['filename'], false);
1720
+
1721
+
1722
+ // ----- Skip empty file names
1723
+ // TBC : Can this be possible ? not checked in DescrParseAtt ?
1724
+ if ($p_filedescr_list[$j]['filename'] == "") {
1725
+ continue;
1726
+ }
1727
+
1728
+ // ----- Check the filename
1729
+ if ( ($p_filedescr_list[$j]['type'] != 'virtual_file')
1730
+ && (!file_exists($p_filedescr_list[$j]['filename']))) {
1731
+ echo 'FILE DOESNT EXIST';
1732
+ }
1733
+
1734
+ // ----- Look if it is a file or a dir with no all path remove option
1735
+ // or a dir with all its path removed
1736
+ // if ( (is_file($p_filedescr_list[$j]['filename']))
1737
+ // || ( is_dir($p_filedescr_list[$j]['filename'])
1738
+ if ( ($p_filedescr_list[$j]['type'] == 'file')
1739
+ || ($p_filedescr_list[$j]['type'] == 'virtual_file')
1740
+ || ( ($p_filedescr_list[$j]['type'] == 'folder')
1741
+ && ( !isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH])
1742
+ || !$p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))
1743
+ ) {
1744
+ $time = microtime(true);
1745
+ $finish_part = $time;
1746
+ $total_time_part = $finish_part - $start;
1747
+ $nextCountHere = $j+1;
1748
+ /* if(($total_time_part > 2)&&($p_filedescr_list[$j]['size'] > 5000000))
1749
+ {
1750
+ $p_filedescr_list_omitted[$j] = $p_filedescr_list[$j];
1751
+ $v_nb++;
1752
+ $nextCount = $v_nb;
1753
+ $omitted_flag = 'set';
1754
+ continue;
1755
+
1756
+ } */
1757
+
1758
+ // ----- Add the file
1759
+ $v_result = $archive->privAddFile($p_filedescr_list[$j], $v_header, $p_options);
1760
+ // ----- Store the file infos
1761
+ $v_header_list[$v_nb++] = $v_header;
1762
+
1763
+ if ($v_result != 1) {
1764
+ //$this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => 'SomeError1'));
1765
+ echo "error zipping this file:".$p_filedescr_list[$j]['filename'];
1766
+ echo 'errorCode - '.$v_result;
1767
+ $files_with_error[] = $p_filedescr_list[$j]['filename'];
1768
+ if($v_result == -10)
1769
+ {
1770
+ return $this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => 'Zip-error: Error compressing the file "'.$p_filedescr_list[$j]['filename'].'".Try excluding this file and try again.', 'statusCode' => 'zip_error_while_compressing_file'));
1771
+ }
1772
+ continue;
1773
+ //return $v_result;
1774
+ }
1775
+ }
1776
+
1777
+ $time = microtime(true);
1778
+ $finish = $time;
1779
+ $total_time = $finish - $this->iwpScriptStartTime;
1780
+ $buffer_size = $zip_split_size*1024*1024 - 3*1024*1024*$file_block_size;
1781
+ if(($total_time > $file_loop_break_time)||(iwp_mmb_get_file_size($backup_file) >= $buffer_size)) //darkCode static values
1782
+ {
1783
+ if(iwp_mmb_get_file_size($backup_file) >= $buffer_size)
1784
+ {
1785
+ $zip_split_part += 1;
1786
+ $is_new_zip = true;
1787
+ }
1788
+ break;
1789
+ }
1790
+ //iwp_mmb_print_flush("|");
1791
+ iwp_mmb_auto_print("multiCallZip");
1792
+ //echo "|";
1793
+ }
1794
+ echo "loopEnded";
1795
+ $v_offset = @ftell($archive->zip_fd);
1796
+ $v_size = $v_central_dir['size'];
1797
+ /* while ($v_size != 0)
1798
+ {
1799
+ $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
1800
+ $v_buffer = @fread($v_zip_temp_fd, $v_read_size);
1801
+ @fwrite($archive->zip_fd, $v_buffer, $v_read_size);
1802
+ $v_size -= $v_read_size;
1803
+ }
1804
+ */
1805
+ clearstatcache();
1806
+ $endOfFile = iwp_mmb_get_file_size($backup_file);
1807
+
1808
+
1809
+
1810
+ //writing the header which is stored in temp file
1811
+
1812
+ fseek($archive->zip_fd, $endOfFile, SEEK_SET);
1813
+ fseek($v_zip_temp_fd, 0, SEEK_SET);
1814
+
1815
+ $v_buffer = fread($v_zip_temp_fd, $v_central_dir['size']);
1816
+ $writeResult = fwrite($archive->zip_fd, $v_buffer);
1817
+
1818
+
1819
+
1820
+ //array_pop($v_header_list);
1821
+ //$v_header_list = $p_result_list;
1822
+ // ----- Create the Central Dir files header
1823
+ for ($i=0, $v_count=0; $i<sizeof($v_header_list); $i++)
1824
+ {
1825
+ // ----- Create the file header
1826
+ if ($v_header_list[$i]['status'] == 'ok') {
1827
+ if (($v_result = $archive->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
1828
+ echo 'error4';
1829
+ fclose($v_zip_temp_fd);
1830
+ $archive->privCloseFd();
1831
+ @unlink($v_zip_temp_name);
1832
+ $archive->privSwapBackMagicQuotes();// ----- Return
1833
+ return $this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => 'Zip-error: Error while writing header', 'statusCode' => 'zip_error_while_writing_header'));
1834
+ //return $v_result;
1835
+ }
1836
+ $v_count++;
1837
+ }
1838
+
1839
+ // ----- Transform the header to a 'usable' info
1840
+ $archive->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
1841
+ }
1842
+ // ----- Calculate the size of the central header
1843
+ $v_size = @ftell($archive->zip_fd)-$v_offset;
1844
+
1845
+ // ----- Create the central dir footer
1846
+ if (($v_result = $archive->privWriteCentralHeader($v_count+$v_central_dir['entries'], $v_size, $v_offset, $v_comment)) != 1)
1847
+ {
1848
+ // ----- Reset the file list
1849
+ echo 'error5';
1850
+ unset($v_header_list);
1851
+ $archive->privSwapBackMagicQuotes();
1852
+ return $this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => 'Zip-Error: Error while writing footer', 'statusCode' => 'zip_error_while_writing_footer'));
1853
+ }
1854
+
1855
+ // ----- Swap back the file descriptor
1856
+ /* $v_swap = $archive->zip_fd;
1857
+ $archive->zip_fd = $v_zip_temp_fd;
1858
+ $v_zip_temp_fd = $v_swap; */
1859
+
1860
+ // ----- Close
1861
+ $archive->privCloseFd();
1862
+
1863
+ // ----- Close the temporary file
1864
+ @fclose($v_zip_temp_fd);
1865
+
1866
+ // ----- Magic quotes trick
1867
+ $archive->privSwapBackMagicQuotes();
1868
+
1869
+ // ----- Delete the zip file
1870
+ // TBC : I should test the result ...
1871
+ //@unlink($archive->zipname);
1872
+ @unlink($v_zip_temp_name);
1873
+
1874
+ // ----- Rename the temporary file
1875
+ // TBC : I should test the result ...
1876
+ //@rename($v_zip_temp_name, $archive->zipname);
1877
+ //IWPPclZipUtilRename($v_zip_temp_name, $archive->zipname);
1878
+
1879
+ $nextCount = $nextCountHere;
1880
+
1881
+ $size_file_des = sizeof($p_filedescr_list);
1882
+ if($nextCount == $size_file_des)
1883
+ //if(true)
1884
+ {
1885
+ $nextCount = "completed";
1886
+ $status = "completed";
1887
+
1888
+ }
1889
+ else{
1890
+ $status = "partiallyCompleted";
1891
+ }
1892
+
1893
+ $result_arr = array();
1894
+ $result_arr['response_data']['nextCount'] = $nextCount;
1895
+ $result_arr['status'] = $status;
1896
+ $result_arr['category'] = $category;
1897
+ $result_arr['nextFunc'] = 'backupFilesZIP';
1898
+ $result_arr['response_data']['include_data'] = $include_data;
1899
+ $result_arr['response_data']['exclude_data'] = $exclude_data;
1900
+ $result_arr['response_data']['backup_file'] = $backup_file;
1901
+ $result_arr['response_data']['backup_url'] = $backup_url;
1902
+ $result_arr['response_data']['account_info'] = $account_info;
1903
+ $result_arr['response_data']['zip_split_part'] = $zip_split_part;
1904
+ $result_arr['response_data']['is_new_zip'] = $is_new_zip;
1905
+ $result_arr['response_data']['files_with_error'] = $files_with_error;
1906
+ $result_arr['response_data']['files_excluded_by_size'] = $files_excluded_by_size;
1907
+
1908
+ //$result_arr['response_data']['p_filedescr_list'] = $p_filedescr_list;
1909
+ $resArray = array (
1910
+ 'responseData' =>
1911
+ array (
1912
+ 'stage' => 'backupFilesNext',
1913
+ 'status' => 'completed',
1914
+ ),
1915
+ 'parentHID' => $this -> hisID,
1916
+ 'nextFunc' => 'backupFilesZIP',
1917
+ 'status' => $status,
1918
+ 'backupParentHID' => $this -> hisID,
1919
+ );
1920
+ if(($nextCount == 0)&&($nextCount != 'completed'))
1921
+ {
1922
+ $this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'error', 'statusMsg' => 'backupFileNextCallError'.$status, 'responseParams' => $result_arr, 'statusCode' => 'backup_file_next_call_error'));
1923
+ $nextFunc = 'error';
1924
+ $status = 'error';
1925
+ return array('error' => 'Must be error', 'error_code' => 'backup_file_next_call_error');
1926
+ }
1927
+ if($status == "partiallyCompleted")
1928
+ {
1929
+ echo 'filesNextCount: '.$nextCount;
1930
+ echo 'totalFilesCount: '.count($p_filedescr_list);
1931
+ $result_arr['response_data']['p_filedescr_list'] = $p_filedescr_list;
1932
+ unset($p_filedescr_list);
1933
+ $this->statusLog($this -> hisID, array('stage' => 'backupFilesMultiCall', 'status' => 'completed', 'statusMsg' => 'nextCall'.$status,'nextFunc' => 'backupFilesZIP', 'responseParams' => $result_arr));
1934
+ unset($result_arr);
1935
+ }
1936
+ else
1937
+ {
1938
+ $main_category = $this -> getRequiredData($historyID,"category");
1939
+
1940
+ //this is where the call goes to backupFiles after DB complete
1941
+ if(($main_category == 'full')&&($category != 'fileZipAfterDBZip'))
1942
+ {
1943
+ //storing hash values of db-file if any
1944
+ $backup_settings_values['dbFileHashValue'][$historyID] = $this -> getHashValuesArray($p_filedescr_list);
1945
+ update_option('iwp_client_multi_backup_temp_values', $backup_settings_values);
1946
+
1947
+ $result_arr['category'] = 'fileZipAfterDBZip';
1948
+ $resArray['status'] = 'partiallyCompleted';
1949
+ $result_arr['nextFunc'] = 'backupFiles';
1950
+ $result_arr['status'] = 'partiallyCompleted';
1951
+ $this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'completed', 'statusMsg' => 'nextCall'.$status,'nextFunc' => 'backupFiles', 'responseParams' => $result_arr));
1952
+ }
1953
+ else
1954
+ {
1955
+
1956
+ //$this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'completed', 'statusMsg' => 'nextCall'.$status, 'responseParams' => $result_arr));
1957
+
1958
+ $paths = array();
1959
+ $tempPaths = array();
1960
+
1961
+ $backup_files_array = $this->get_files_array_from_iwp_part($backup_file);
1962
+ $backup_file = array();
1963
+ $backup_file = $backup_files_array;
1964
+
1965
+ $backup_url_array = $this->get_files_array_from_iwp_part($backup_url);
1966
+ $backup_url = array();
1967
+ $backup_url = $backup_url_array;
1968
+
1969
+ $size = round($this->get_total_files_size($backup_file) / 1024, 2);
1970
+ if ($size > 1000) {
1971
+ $paths['size'] = round($size / 1024, 2) . " MB"; //Modified by IWP //Mb => MB
1972
+ } else {
1973
+ $paths['size'] = $size . 'KB'; //Modified by IWP //Kb => KB
1974
+ }
1975
+ $paths['backup_name'] = $task_name;
1976
+ $paths['mechanism'] = 'multicall';
1977
+ $paths['server'] = array(
1978
+ 'file_path' => $backup_file,
1979
+ 'file_url' => $backup_url,
1980
+ );
1981
+
1982
+ $paths['time'] = time();
1983
+ $paths['adminHistoryID'] = $historyID;
1984
+ $paths['files_with_error'] = $files_with_error;
1985
+ $paths['files_excluded_by_size'] = $files_excluded_by_size;
1986
+ //$paths['hashValues'] = $this -> getHashValuesArray($p_filedescr_list);
1987
+ //$paths['hashValues'] = array_merge($dbFileHashValue, $paths['hashValues']);
1988
+ unset($p_filedescr_list);
1989
+ $tempPath = $paths;
1990
+ $paths['task_results'][$historyID] = $tempPath;
1991
+
1992
+ if(empty($account_info))
1993
+ {
1994
+ //this is where the call goes to upload after backup zip completion ..
1995
+ $resArray['status'] = 'completed';
1996
+ $result_arr['nextFunc'] = 'backupFilesZIPOver';
1997
+ $result_arr['status'] = 'completed';
1998
+ }
1999
+ else
2000
+ {
2001
+ $resArray['actual_file_size'] = $size; //necessary for dropbox function
2002
+ $resArray['status'] = 'partiallyCompleted';
2003
+ $result_arr['nextFunc'] = 'backup_uploads';
2004
+ $result_arr['status'] = 'partiallyCompleted';
2005
+ $result_arr['actual_file_size'] = $size;
2006
+ $result_arr['backup_file'] = $backup_file;
2007
+ }
2008
+
2009
+ $this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'completed', 'statusMsg' => 'nextCall'.$status, 'responseParams' => $result_arr,'task_result' => $paths));
2010
+
2011
+ if((($main_category != 'files')&&($category == 'dbZip')) || ($main_category == 'db'))
2012
+ {
2013
+ @unlink(IWP_BACKUP_DIR.'/iwp_db/index.php');
2014
+ @unlink(DB_NAME);
2015
+ @rmdir(IWP_DB_DIR);
2016
+ }
2017
+
2018
+ //checking zip corruption
2019
+ if(is_array($backup_file))
2020
+ {
2021
+ foreach($backup_file as $key => $single_backup_file)
2022
+ {
2023
+ $verification_result = $this -> postBackupVerification($archive, $single_backup_file);
2024
+ if(!$verification_result)
2025
+ {
2026
+ return $this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => 'The zip file was corrupted while zipping', 'responseParams' => $result_arr));
2027
+ }
2028
+ }
2029
+ }
2030
+
2031
+ //Remove the old backups (limit)
2032
+ $removed = $this->remove_old_backups($requestParams['task_name']);
2033
+
2034
+ if (is_array($removed) && isset($removed['error'])) {
2035
+ return $this->statusLog($this -> hisID, array('stage' => 'removingBackupFiles', 'status' => 'error', 'statusMsg' => 'Error while removing old backups. ('.$removed['error'].')', 'responseParams' => $result_arr, 'statusCode' => 'error_while_removing_old_backups'));
2036
+ }
2037
+
2038
+ }
2039
+ }
2040
+ $fileNextTimeTaken = microtime(true) - $start34;
2041
+
2042
+ return $resArray;
2043
+
2044
+ }
2045
+
2046
+ function get_files_array_from_iwp_part($backup_file)
2047
+ {
2048
+ $backup_files_array = array();
2049
+ if(strpos($backup_file, '_iwp_part') !== false)
2050
+ {
2051
+ $orgName = substr($backup_file, 0, strpos($backup_file, '_iwp_part_'));
2052
+ $totalParts = substr($backup_file, strpos($backup_file, '_iwp_part_')+10);
2053
+ $totalParts = substr($totalParts, 0, strlen($totalParts)-4);
2054
+ for($i=0; $i<=$totalParts; $i++)
2055
+ {
2056
+ if($i == 0)
2057
+ {
2058
+ $backup_files_array[] = $orgName.'.zip';
2059
+ }
2060
+ else
2061
+ {
2062
+ $backup_files_array[] = $orgName.'_iwp_part_'.$i.'.zip';
2063
+ }
2064
+ }
2065
+ return $backup_files_array;
2066
+ }
2067
+ else
2068
+ {
2069
+ $backup_files_array[] = $backup_file;
2070
+ return $backup_file;
2071
+ }
2072
+ }
2073
+
2074
+ function postBackupVerification(&$obj, $backup_file)
2075
+ {
2076
+ $file_size = iwp_mmb_get_file_size($backup_file);
2077
+ if($file_size > 0)
2078
+ {
2079
+ $list = $obj->listContent();
2080
+ if ($list == 0)
2081
+ {
2082
+ return false;
2083
+ }
2084
+ else
2085
+ {
2086
+ return true;
2087
+ }
2088
+ }
2089
+ else
2090
+ {
2091
+ return false;
2092
+ }
2093
+ }
2094
+
2095
+
2096
+
2097
+ function getHashValuesArray($p_filedescr_list)
2098
+ {
2099
+ $hashValues = array();
2100
+ if(is_array($p_filedescr_list))
2101
+ {
2102
+ foreach($p_filedescr_list as $key => $value)
2103
+ {
2104
+ if($value['fileHash'])
2105
+ {
2106
+ if($value['fileHash'] !== '')
2107
+ {
2108
+ $hashValues[$value['stored_filename']] = $value['fileHash'];
2109
+ }
2110
+ }
2111
+ }
2112
+ }
2113
+ return $hashValues;
2114
+ }
2115
+
2116
+ function maybe_serialize_compress($value){
2117
+ $value = serialize($value);
2118
+ if(!function_exists('gzdeflate') || !function_exists('gzinflate')){
2119
+ return $value;
2120
+ }
2121
+ $value = gzdeflate($value);
2122
+ $value = '**ZIP**'.base64_encode($value);
2123
+ return $value;
2124
+ }
2125
+
2126
+ function maybe_unserialize_uncompress($value){
2127
+ if(strpos($value, '**ZIP**') !== false){
2128
+ $value = gzinflate (base64_decode(str_replace('**ZIP**', '', $value)));
2129
+ }
2130
+ return unserialize($value);
2131
+ }
2132
+
2133
+ function getRequiredData($historyID, $field){
2134
+ global $wpdb;
2135
+ $backupData = $wpdb->get_row("SELECT ".$field." FROM ".$wpdb->base_prefix."iwp_backup_status WHERE historyID = ".$historyID);
2136
+ if(($field == 'responseParams')||($field == 'requestParams')||($field == 'taskResults')){
2137
+
2138
+ $fieldParams = $this->maybe_unserialize_uncompress($backupData->$field);
2139
+
2140
+ }
2141
+ else
2142
+ {
2143
+ $fieldParams = $backupData->$field;
2144
+ }
2145
+ return $fieldParams;
2146
+ }
2147
+
2148
+ function get_all_tasks(){
2149
+ /*global $wpdb;
2150
+
2151
+ $stats = array();
2152
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
2153
+
2154
+ $rows = $wpdb->get_col("SELECT taskResults FROM ".$table_name);
2155
+ $task_res = array();
2156
+ foreach($rows as $key => $value){
2157
+ $task_results = unserialize($value);
2158
+ if(is_array($task_results['task_results'])){
2159
+
2160
+ foreach($task_results['task_results'] as $key => $data){
2161
+ $task_res['task_results'][$key] = $data;
2162
+ }
2163
+ }
2164
+ }*/
2165
+
2166
+ global $wpdb;
2167
+
2168
+ $stats = array();
2169
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
2170
+
2171
+ $rows = $wpdb->get_results("SELECT taskName,taskResults FROM ".$table_name, ARRAY_A);
2172
+
2173
+ $task_res = array();
2174
+ foreach($rows as $key => $value){
2175
+ $task_results = unserialize($value['taskResults']);
2176
+
2177
+ if(!empty($task_results['task_results']))
2178
+ foreach($task_results['task_results'] as $key => $data){
2179
+
2180
+ $task_res[$value['taskName']]['task_results'][$key] = $data;
2181
+ }
2182
+ }
2183
+
2184
+ return $task_res;
2185
+ }
2186
+
2187
+
2188
+ function get_all_tasks_mine(){
2189
+
2190
+ global $wpdb;
2191
+
2192
+ $stats = array();
2193
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
2194
+
2195
+ $rows = $wpdb->get_results("select * from ".$table_name);
2196
+
2197
+ $taskRes = array();
2198
+
2199
+ foreach($rows as $key => $value){
2200
+ $task_results = unserialize($value->taskResults);
2201
+
2202
+ //$taskRes['task_results'][] = $task_results['task_results'];
2203
+ $taskRes['task_results'][] = $task_results;
2204
+
2205
+ }
2206
+
2207
+ $rows = $wpdb->get_col("SELECT taskResults FROM ".$table_name);
2208
+ $taskResOld = array();
2209
+ foreach($rows as $key => $value){
2210
+ $task_results = unserialize($value);
2211
+ foreach($task_results['task_results'] as $key => $data){
2212
+ $taskResOld['task_results'][$key] = $data;
2213
+ }
2214
+ }
2215
+
2216
+ $taskRes = array_merge($taskResOld,$taskRes);
2217
+
2218
+
2219
+
2220
+ return $taskRes;
2221
+ }
2222
+
2223
+ function get_this_tasks(){
2224
+ $this->wpdb_reconnect();
2225
+
2226
+ global $wpdb;
2227
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
2228
+ if($GLOBALS['IWP_CLIENT_HISTORY_ID'] != $this -> hisID)
2229
+ {
2230
+ $rows = $wpdb->get_row($wpdb->prepare("SELECT * FROM ".$table_name." WHERE historyID = %d", $this -> hisID), ARRAY_A);
2231
+ }
2232
+ else
2233
+ {
2234
+ $rows = $wpdb->get_row($wpdb->prepare("SELECT * FROM ".$table_name." WHERE historyID = %d", $GLOBALS['IWP_CLIENT_HISTORY_ID']), ARRAY_A);
2235
+ }
2236
+
2237
+ return $rows;
2238
+
2239
+ }
2240
+
2241
+ function get_requested_task($ID){
2242
+ global $wpdb;
2243
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
2244
+
2245
+ $rows = $wpdb->get_row($wpdb->prepare("SELECT * FROM ".$table_name." WHERE historyID = %d", $ID), ARRAY_A);
2246
+
2247
+ return $rows;
2248
+
2249
+ }
2250
+
2251
+ function get_backup_stats()
2252
+ {
2253
+ global $wpdb;
2254
+
2255
+ $stats = array();
2256
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
2257
+
2258
+ $rows = $wpdb->get_results("select * from ".$table_name);
2259
+
2260
+ $task_res = array();
2261
+ foreach($rows as $key => $value){
2262
+ $task_results = unserialize($value->taskResults);
2263
+ $task_res[$value->taskName][$value->historyID] = $task_results['task_results'][$value->historyID];
2264
+ $task_res[$value->taskName][$value->historyID]['backhack_status'] = $task_results['backhack_status'];
2265
+ }
2266
+
2267
+
2268
+ $stats = $task_res;
2269
+
2270
+ return $stats;
2271
+
2272
+ }
2273
+
2274
+
2275
+ function storeRequestParams($historyID, $requestParams)
2276
+ {
2277
+ global $wpdb;
2278
+ $update = $wpdb->update($wpdb->base_prefix.'iwp_backup_status',array( 'requestParams' => serialize($requestParams), ),array( 'historyID' => $historyID),array('%s'),array('%d'));
2279
+
2280
+ }
2281
+
2282
+ function statusLog($historyID = '', $statusArray = array(), $params=array())
2283
+ {
2284
+ global $wpdb,$insertID;
2285
+ $this->wpdb_reconnect();
2286
+ if(empty($historyID))
2287
+ {
2288
+ $insert = $wpdb->insert($wpdb->base_prefix.'iwp_backup_status',array( 'stage' => $statusArray['stage'], 'status' => $statusArray['status'], 'action' => $params['args']['action'], 'type' => $params['args']['type'],'category' => $params['args']['what'],'historyID' => $params['args']['parentHID'],'finalStatus' => 'pending','startTime' => microtime(true),'endTime' => '','statusMsg' => $statusArray['statusMsg'],'requestParams' => serialize($params),'taskName' => $params['task_name']), array( '%s', '%s','%s', '%s', '%s', '%s', '%d', '%s', '%d', '%d', '%s', '%s', '%s' ) );
2289
+ if($insert)
2290
+ {
2291
+ $insertID = $wpdb->insert_id;
2292
+ }
2293
+ }
2294
+ else if((isset($statusArray['responseParams']))||(isset($statusArray['task_result'])))
2295
+ {
2296
+ $update = $wpdb->update($wpdb->base_prefix.'iwp_backup_status',array( 'responseParams' => $this->maybe_serialize_compress($statusArray['responseParams']),'stage' => $statusArray['stage'], 'status' => $statusArray['status'],'statusMsg' => $statusArray['statusMsg'],'taskResults' => serialize($statusArray['task_result']) ),array( 'historyID' => $historyID),array('%s','%s', '%s', '%s','%s'),array('%d'));
2297
+ }
2298
+ else
2299
+ {
2300
+ //$responseParams = $this -> getRequiredData($historyID,"responseParams");
2301
+ $update = $wpdb->update($wpdb->base_prefix.'iwp_backup_status',array('stage' => $statusArray['stage'], 'status' => $statusArray['status'],'statusMsg' => $statusArray['statusMsg'] ),array( 'historyID' => $historyID),array( '%s', '%s', '%s'),array('%d'));
2302
+ }
2303
+ if( (isset($update)&&($update === false)) || (isset($insert)&&($insert === false)) )
2304
+ {
2305
+ //return array('error'=> $statusArray['statusMsg']);
2306
+ iwp_mmb_response(array('error' => 'MySQL Error: '.$wpdb -> last_error, 'error_code' => 'mysql_error_status_log'), false);
2307
+ }
2308
+ if((isset($statusArray['sendResponse']) && $statusArray['sendResponse'] == true) || $statusArray['status'] == 'completed')
2309
+ {
2310
+ $returnParams = array();
2311
+ $returnParams['parentHID'] = $historyID;
2312
+ $returnParams['backupRowID'] = $insertID;
2313
+ $returnParams['stage'] = $statusArray['stage'] ;
2314
+ $returnParams['status'] = $statusArray['status'];
2315
+ $returnParams['nextFunc'] = $statusArray['nextFunc'];
2316
+ return array('success' => $returnParams);
2317
+ }
2318
+ else
2319
+ {
2320
+ if($statusArray['status'] == 'error')
2321
+ {
2322
+ $returnParams = array();
2323
+ $returnParams['parentHID'] = $historyID;
2324
+ $returnParams['backupRowID'] = $insertID;
2325
+ $returnParams['stage'] = $statusArray['stage'] ;
2326
+ $returnParams['status'] = $statusArray['status'];
2327
+ $returnParams['statusMsg'] = $statusArray['statusMsg'];
2328
+
2329
+ return array('error'=> $statusArray['statusMsg'], 'error_code' => $statusArray['statusCode']);
2330
+ }
2331
+ }
2332
+ }
2333
+
2334
+
2335
+ function get_backup_settings()
2336
+ {
2337
+ $backup_settings = get_option('iwp_client_multi_backup_temp_values');
2338
+ if (!empty($backup_settings))
2339
+ return $backup_settings;
2340
+ else
2341
+ return false;
2342
+ }
2343
+
2344
+
2345
+
2346
+ function cmp($a, $b) {
2347
+ /* if ($a['size'] == $b['size']) {
2348
+ return 0;
2349
+ }
2350
+ return ($a['size'] < $b['size']) ? -1 : 1; */
2351
+ return $a['size'] - $b['size'];
2352
+ }
2353
+
2354
+
2355
+ function task_now($task_name){
2356
+
2357
+ $settings = $this->tasks;
2358
+ if(!array_key_exists($task_name,$settings)){
2359
+ return array('error' => $task_name." does not exist.", 'error_code' => 'task_name_doesnt_exists');
2360
+ } else {
2361
+ $setting = $settings[$task_name];
2362
+ }
2363
+
2364
+ $this->set_backup_task(array(
2365
+ 'task_name' => $task_name,
2366
+ 'args' => $settings[$task_name]['task_args'],
2367
+ 'time' => time()
2368
+ ));
2369
+
2370
+ //Run backup
2371
+ $result = $this->backup($setting['task_args'], $task_name);
2372
+
2373
+ //Check for error
2374
+ if (is_array($result) && array_key_exists('error', $result)) {
2375
+ $this->set_backup_task(array(
2376
+ 'task_name' => $task_name,
2377
+ 'args' => $settings[$task_name]['task_args'],
2378
+ 'error' => $result['error']
2379
+ ));
2380
+ return $result;
2381
+ } else {
2382
+ return $this->get_backup_stats();
2383
+ }
2384
+
2385
+ }
2386
+
2387
+
2388
+
2389
+ function fail_safe_pcl_files($task_name, $backup_file, $exclude, $include, $fail_safe_files, $disable_comp, $add, $remove){ //Try pclZip
2390
+ //$this->back_hack($task_name, 'Files ZIP PCL: Start');
2391
+ iwp_mmb_print_flush('Files ZIP PCL: Start');
2392
+ if (!isset($archive)) {
2393
+ //define('PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
2394
+ //require_once ABSPATH . '/wp-admin/includes/class-pclzip.php';
2395
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
2396
+ $archive = new IWPPclZip($backup_file);
2397
+ }
2398
+
2399
+ //Include paths
2400
+ $include_data = array();
2401
+ if (!empty($include) && is_array($include)) {
2402
+ foreach ($include as $data) {
2403
+ if ($data && file_exists(ABSPATH . $data))
2404
+ $include_data[] = ABSPATH . $data . '/';
2405
+ }
2406
+ }
2407
+
2408
+ foreach ($add as $data) {
2409
+ if (file_exists(ABSPATH . $data))
2410
+ $include_data[] = ABSPATH . $data . '/';
2411
+ }
2412
+
2413
+ //Include root files
2414
+ if ($handle = opendir(ABSPATH)) {
2415
+ while (false !== ($file = readdir($handle))) {
2416
+ if ($file != "." && $file != ".." && !is_dir($file) && file_exists(ABSPATH . $file)) {
2417
+ $include_data[] = ABSPATH . $file;
2418
+ }
2419
+ }
2420
+ closedir($handle);
2421
+ }
2422
+
2423
+ //exclude paths
2424
+ $exclude_data = array();
2425
+ if (!empty($exclude) && is_array($exclude)) {
2426
+ foreach ($exclude as $data) {
2427
+ if (is_dir(ABSPATH . $data))
2428
+ $exclude_data[] = $data . '/';
2429
+ else
2430
+ $exclude_data[] = $data;
2431
+ }
2432
+ }
2433
+
2434
+ foreach ($remove as $rem) {
2435
+ $exclude_data[] = $rem . '/';
2436
+ }
2437
+
2438
+ if($fail_safe_files && $disable_comp){
2439
+ $result = $archive->add($include_data, PCLZIP_OPT_REMOVE_PATH, ABSPATH, PCLZIP_OPT_IWP_EXCLUDE, $exclude_data, PCLZIP_OPT_NO_COMPRESSION, PCLZIP_OPT_TEMP_FILE_THRESHOLD, 1);
2440
+ }
2441
+ elseif(!$fail_safe_files && $disable_comp){
2442
+ $result = $archive->add($include_data, PCLZIP_OPT_REMOVE_PATH, ABSPATH, PCLZIP_OPT_IWP_EXCLUDE, $exclude_data, PCLZIP_OPT_NO_COMPRESSION);
2443
+ }
2444
+ elseif($fail_safe_files && !$disable_comp){
2445
+ $result = $archive->add($include_data, PCLZIP_OPT_REMOVE_PATH, ABSPATH, PCLZIP_OPT_IWP_EXCLUDE, $exclude_data, PCLZIP_OPT_TEMP_FILE_THRESHOLD, 1);
2446
+ }
2447
+ else{
2448
+ $result = $archive->add($include_data, PCLZIP_OPT_REMOVE_PATH, ABSPATH, PCLZIP_OPT_IWP_EXCLUDE, $exclude_data);
2449
+ }
2450
+
2451
+ iwp_mmb_print_flush('Files ZIP PCL: End');
2452
+
2453
+ if (!$result) {
2454
+ @unlink($backup_file);
2455
+ return array(
2456
+ 'error' => 'Failed to zip files. pclZip error (' . $archive->error_code . '): .' . $archive->error_string, 'error_code' => 'failed_to_zip_files_pclZip_error'
2457
+ );
2458
+ }
2459
+ //}
2460
+ }
2461
+ //Reconnect
2462
+ function fail_safe_pcl_db($backup_file,$fail_safe_files,$disable_comp){
2463
+ //$this->back_hack($task_name, 'DB ZIP PCL: Start');
2464
+ iwp_mmb_print_flush('DB ZIP PCL: Start');
2465
+ //define('PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
2466
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
2467
+ $archive = new IWPPclZip($backup_file);
2468
+
2469
+ if($fail_safe_files && $disable_comp){
2470
+ $result_db = $archive->add(IWP_DB_DIR, PCLZIP_OPT_REMOVE_PATH, IWP_BACKUP_DIR, PCLZIP_OPT_NO_COMPRESSION, PCLZIP_OPT_TEMP_FILE_THRESHOLD, 1);
2471
+ }
2472
+ elseif(!$fail_safe_files && $disable_comp){
2473
+ $result_db = $archive->add(IWP_DB_DIR, PCLZIP_OPT_REMOVE_PATH, IWP_BACKUP_DIR, PCLZIP_OPT_NO_COMPRESSION);
2474
+ }
2475
+ elseif($fail_safe_files && !$disable_comp){
2476
+ $result_db = $archive->add(IWP_DB_DIR, PCLZIP_OPT_REMOVE_PATH, IWP_BACKUP_DIR, PCLZIP_OPT_TEMP_FILE_THRESHOLD, 1);
2477
+ }
2478
+ else{
2479
+ $result_db = $archive->add(IWP_DB_DIR, PCLZIP_OPT_REMOVE_PATH, IWP_BACKUP_DIR);
2480
+ }
2481
+ //$this->back_hack($task_name, 'DB ZIP PCL: End');
2482
+ iwp_mmb_print_flush('DB ZIP PCL: End');
2483
+
2484
+ @unlink($db_result);
2485
+ @unlink(IWP_BACKUP_DIR.'/iwp_db/index.php');
2486
+ @rmdir(IWP_DB_DIR);
2487
+
2488
+ if (!$result_db) {
2489
+ return array(
2490
+ 'error' => 'Failed to zip database. pclZip error (' . $archive->error_code . '): .' . $archive->error_string, 'error_code' => 'failed_to_zip database_pclZip_error'
2491
+ );
2492
+ }
2493
+ }
2494
+
2495
+ /**
2496
+ * Zipping whole site root folder and append to backup file with database dump
2497
+ * by ZipArchive class, requires php zip extension.
2498
+ *
2499
+ * @param string $task_name the name of backup task
2500
+ * @param string $backup_file absolute path to zip file
2501
+ * @param array $exclude array of files of folders to exclude, relative to site's root
2502
+ * @param array $include array of folders from site root which are included to backup (wp-admin, wp-content, wp-includes are default)
2503
+ * @return array|bool true if successful or an array with error message if not
2504
+ */
2505
+ function zip_archive_backup($task_name, $backup_file, $exclude, $include, $overwrite = false) {
2506
+
2507
+ $filelist = $this->get_backup_files($exclude, $include);
2508
+ $disable_comp = $this->tasks[$task_name]['task_args']['disable_comp'];
2509
+ if (!$disable_comp) {
2510
+ $this->_log("Compression is not supported by ZipArchive");
2511
+ }
2512
+ $zip = new ZipArchive();
2513
+ if ($overwrite) {
2514
+ $result = $zip->open($backup_file, ZipArchive::OVERWRITE); // Tries to open $backup_file for acrhiving
2515
+ } else {
2516
+ $result = $zip->open($backup_file); // Tries to open $backup_file for acrhiving
2517
+ }
2518
+ if ($result === true) {
2519
+ foreach ($filelist as $file) {
2520
+ iwp_mmb_auto_print('zip_archive_backup');
2521
+ $result = $result && $zip->addFile($file, sprintf("%s", str_replace(ABSPATH, '', $file))); // Tries to add a new file to $backup_file
2522
+ }
2523
+ $result = $result && $zip->close(); // Tries to close $backup_file
2524
+ } else {
2525
+ $result = false;
2526
+ }
2527
+ return $result; // true if $backup_file iz zipped successfully, false if error is occured in zip process
2528
+ }
2529
+
2530
+
2531
+ /**
2532
+ * Gets an array of relative paths of all files in site root recursively.
2533
+ * By default, there are all files from root folder, all files from folders wp-admin, wp-content, wp-includes recursively.
2534
+ * Parameter $include adds other folders from site root, and excludes any file or folder by relative path to site's root.
2535
+ *
2536
+ * @param array $exclude array of files of folders to exclude, relative to site's root
2537
+ * @param array $include array of folders from site root which are included to backup (wp-admin, wp-content, wp-includes are default)
2538
+ * @return array array with all files in site root dir
2539
+ */
2540
+ function get_backup_files($exclude, $include) {
2541
+
2542
+ $add = array(
2543
+ trim(WPINC),
2544
+ trim(basename(WP_CONTENT_DIR)),
2545
+ "wp-admin"
2546
+ );
2547
+
2548
+ $include = array_merge($add, $include);
2549
+
2550
+ $filelist = array();
2551
+ if ($handle = opendir(ABSPATH)) {
2552
+ while (false !== ($file = readdir($handle))) {
2553
+ if (is_dir($file) && file_exists(ABSPATH . $file) && !(in_array($file, $include))) {
2554
+ $exclude[] = $file;
2555
+ }
2556
+ }
2557
+ closedir($handle);
2558
+ }
2559
+
2560
+ $filelist = get_all_files_from_dir(ABSPATH, $exclude);
2561
+
2562
+ return $filelist;
2563
+ }
2564
+
2565
+
2566
+
2567
+
2568
+
2569
+
2570
+
2571
+
2572
+ /**
2573
+ * Copies a directory from one location to another via the WordPress Filesystem Abstraction.
2574
+ * Assumes that WP_Filesystem() has already been called and setup.
2575
+ *
2576
+ * @since 2.5.0
2577
+ *
2578
+ * @param string $from source directory
2579
+ * @param string $to destination directory
2580
+ * @param array $skip_list a list of files/folders to skip copying
2581
+ * @return mixed WP_Error on failure, True on success.
2582
+ */
2583
+ function iwp_mmb_direct_to_any_copy_dir($from, $to, $skip_list = array() ) {//$from => direct file system, $to => automatic filesystem
2584
+ global $wp_filesystem;
2585
+
2586
+ $wp_temp_direct = new WP_Filesystem_Direct('');
2587
+
2588
+
2589
+ $dirlist = $wp_temp_direct->dirlist($from);
2590
+
2591
+ $from = trailingslashit($from);
2592
+ $to = trailingslashit($to);
2593
+
2594
+ $skip_regex = '';
2595
+ foreach ( (array)$skip_list as $key => $skip_file )
2596
+ $skip_regex .= preg_quote($skip_file, '!') . '|';
2597
+
2598
+ if ( !empty($skip_regex) )
2599
+ $skip_regex = '!(' . rtrim($skip_regex, '|') . ')$!i';
2600
+
2601
+ foreach ( (array) $dirlist as $filename => $fileinfo ) {
2602
+ if ( !empty($skip_regex) )
2603
+ if ( preg_match($skip_regex, $from . $filename) )
2604
+ continue;
2605
+
2606
+ if ( 'f' == $fileinfo['type'] ) {
2607
+ if ( ! $this->iwp_mmb_direct_to_any_copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) ) {
2608
+ // If copy failed, chmod file to 0644 and try again.
2609
+ $wp_filesystem->chmod($to . $filename, 0644);
2610
+ if ( ! $this->iwp_mmb_direct_to_any_copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) )
2611
+ {
2612
+ continue;
2613
+ return new WP_Error('copy_failed', __('Could not copy file.'), $to . $filename);
2614
+ }
2615
+ }
2616
+ } elseif ( 'd' == $fileinfo['type'] ) {
2617
+ if ( !$wp_filesystem->is_dir($to . $filename) ) {
2618
+ if ( !$wp_filesystem->mkdir($to . $filename, FS_CHMOD_DIR) )
2619
+ return new WP_Error('mkdir_failed', __('Could not create directory.'), $to . $filename);
2620
+ }
2621
+ $result = $this->iwp_mmb_direct_to_any_copy_dir($from . $filename, $to . $filename, $skip_list);
2622
+ if ( is_wp_error($result) )
2623
+ return $result;
2624
+ }
2625
+ }
2626
+ return true;
2627
+ }
2628
+
2629
+ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $mode = false){
2630
+ global $wp_filesystem;
2631
+ if($wp_filesystem->method == 'direct'){
2632
+ return $wp_filesystem->copy($source, $destination, $overwrite, $mode);
2633
+ }
2634
+ elseif($wp_filesystem->method == 'ftpext' || $wp_filesystem->method == 'ftpsockets'){
2635
+ if ( ! $overwrite && $wp_filesystem->exists($destination) )
2636
+ return false;
2637
+ //$content = $this->get_contents($source);
2638
+ // if ( false === $content)
2639
+ // return false;
2640
+
2641
+ //put content
2642
+ //$tempfile = wp_tempnam($file);
2643
+ $source_handle = fopen($source, 'r');
2644
+ if ( ! $source_handle )
2645
+ return false;
2646
+
2647
+ //fwrite($temp, $contents);
2648
+ //fseek($temp, 0); //Skip back to the start of the file being written to
2649
+
2650
+ $sample_content = fread($source_handle, (1024 * 1024 * 2));//1024 * 1024 * 2 => 2MB
2651
+ fseek($source_handle, 0); //Skip back to the start of the file being written to
2652
+
2653
+ $type = $wp_filesystem->is_binary($sample_content) ? FTP_BINARY : FTP_ASCII;
2654
+ unset($sample_content);
2655
+ if($wp_filesystem->method == 'ftpext'){
2656
+ $ret = @ftp_fput($wp_filesystem->link, $destination, $source_handle, $type);
2657
+ }
2658
+ elseif($wp_filesystem->method == 'ftpsockets'){
2659
+ $wp_filesystem->ftp->SetType($type);
2660
+ $ret = $wp_filesystem->ftp->fput($destination, $source_handle);
2661
+ }
2662
+
2663
+ fclose($source_handle);
2664
+ unlink($source);//to immediately save system space
2665
+ //unlink($tempfile);
2666
+
2667
+ $wp_filesystem->chmod($destination, $mode);
2668
+
2669
+ return $ret;
2670
+
2671
+ //return $this->put_contents($destination, $content, $mode);
2672
+ }
2673
+ }
2674
+
2675
+
2676
+
2677
+ function restore($args)
2678
+ {
2679
+ global $wpdb, $wp_filesystem;
2680
+ if (empty($args)) {
2681
+ return false;
2682
+ }
2683
+
2684
+ extract($args);
2685
+ $this->set_resource_limit();
2686
+
2687
+ $unlink_file = true; //Delete file after restore
2688
+
2689
+ include_once ABSPATH . 'wp-admin/includes/file.php';
2690
+
2691
+ //Detect source
2692
+ if ($backup_url) {
2693
+ //This is for clone (overwrite)
2694
+ $backup_file = array();
2695
+ $backup_url_array = $this->get_files_array_from_iwp_part($backup_url);
2696
+ if(!is_array($backup_url_array))
2697
+ {
2698
+ echo "this backup backup_url - ".$backup_url_array;
2699
+ $temp_backup_url = $backup_url_array;
2700
+ $backup_url_array = array();
2701
+ $backup_url_array[] = $temp_backup_url;
2702
+ }
2703
+ foreach($backup_url_array as $key => $single_backup_url)
2704
+ {
2705
+ $backup_file[] = download_url($single_backup_url);
2706
+ if (is_wp_error($backup_file[$key])) {
2707
+ return array(
2708
+ 'error' => 'Unable to download backup file ('.$backup_file[$key]->get_error_message().')', 'error_code' => 'unable_to_download_backup_file'
2709
+ );
2710
+ }
2711
+ }
2712
+ $what = 'full';
2713
+ }
2714
+ else {
2715
+ //manual restore darkPrince
2716
+
2717
+ $tasks = array();
2718
+ $task = array();
2719
+
2720
+ $tasks = $this->get_requested_task($result_id);
2721
+ $tasks['taskResults'] = unserialize($tasks['taskResults']);
2722
+
2723
+ $backup = $tasks['taskResults']['task_results'][$result_id]; //darkCode testing purpose
2724
+ $hashValues = $backup['hashValues'];
2725
+ //$backup = $tasks['taskResults'];
2726
+ $requestParams = unserialize($tasks['requestParams']);
2727
+ $args = $requestParams['account_info'];
2728
+ //$task = $tasks['Backup Now'];
2729
+ if (isset($backup['server'])) {
2730
+ $backup_file = $backup['server']['file_path'];
2731
+ $unlink_file = false; //Don't delete file if stored on server
2732
+ }
2733
+ elseif (isset($backup['ftp'])) {
2734
+ $ftp_file = $backup['ftp'];
2735
+ $args = $args['iwp_ftp'];
2736
+ if(!is_array($ftp_file))
2737
+ {
2738
+ $ftp_file = array();
2739
+ $ftp_file[0] = $backup['ftp'];
2740
+ $backup_file = array();
2741
+ }
2742
+ foreach($ftp_file as $key => $value)
2743
+ {
2744
+ $args['backup_file'] = $value;
2745
+ iwp_mmb_print_flush('FTP download: Start '.$key);
2746
+ $backup_file[] = $this->get_ftp_backup($args);
2747
+ iwp_mmb_print_flush('FTP download: End '.$key);
2748
+ if ($backup_file[$key] == false) {
2749
+ return array(
2750
+ 'error' => 'Failed to download file from FTP.', 'error_code' => 'failed_to_download_file_from_ftp'
2751
+ );
2752
+ }
2753
+ }
2754
+ }
2755
+ elseif (isset($backup['amazons3'])) {
2756
+ $amazons3_file = $backup['amazons3'];
2757
+ $args = $args['iwp_amazon_s3'];
2758
+ if(!is_array($amazons3_file))
2759
+ {
2760
+ $amazons3_file = array();
2761
+ $amazons3_file[0] = $backup['amazons3'];
2762
+ $backup_file = array();
2763
+ }
2764
+ foreach($amazons3_file as $key => $value)
2765
+ {
2766
+ $args['backup_file'] = $value;
2767
+ iwp_mmb_print_flush('Amazon S3 download: Start '.$key);
2768
+ $backup_file[] = $this->get_amazons3_backup($args);
2769
+ iwp_mmb_print_flush('Amazon S3 download: End '.$key);
2770
+ if ($backup_file[$key] == false) {
2771
+ return array(
2772
+ 'error' => 'Failed to download file from Amazon S3.', 'error_code' => 'failed_to_download_file_from_s3'
2773
+ );
2774
+ }
2775
+ }
2776
+ }
2777
+ elseif(isset($backup['dropbox'])){
2778
+ $dropbox_file = $backup['dropbox'];
2779
+ $args = $args['iwp_dropbox'];
2780
+ if(!is_array($dropbox_file))
2781
+ {
2782
+ $dropbox_file = array();
2783
+ $dropbox_file[0] = $backup['dropbox'];
2784
+ $backup_file = array();
2785
+ }
2786
+ foreach($dropbox_file as $key => $value)
2787
+ {
2788
+ $args['backup_file'] = $value;
2789
+ iwp_mmb_print_flush('Dropbox download: Start '.$key);
2790
+ $backup_file[] = $this->get_dropbox_backup($args);
2791
+ iwp_mmb_print_flush('Dropbox download: End '.$key);
2792
+ if ($backup_file[$key] == false) {
2793
+ return array(
2794
+ 'error' => 'Failed to download file from Dropbox.', 'error_code' => 'failed_to_download_file_from_dropbox'
2795
+ );
2796
+ }
2797
+ }
2798
+
2799
+ }
2800
+ elseif(isset($backup['gDrive'])){
2801
+ $gdrive_file = $backup['gDrive'];
2802
+ $args = $args['iwp_gdrive'];
2803
+
2804
+ if(!is_array($gdrive_file))
2805
+ {
2806
+ $gdrive_file = array();
2807
+ $gdrive_file[0] = $backup['gDrive'];
2808
+ $backup_file = array();
2809
+ }
2810
+ foreach($gdrive_file as $key => $value)
2811
+ {
2812
+ $args['backup_file'] = $value;
2813
+ iwp_mmb_print_flush('gDrive download: Start');
2814
+ $backup_file[] = $this->get_google_drive_backup($args);
2815
+ iwp_mmb_print_flush('gDrive download: End');
2816
+
2817
+ if(is_array($backup_file[$key]) && array_key_exists('error', $backup_file[$key]))
2818
+ {
2819
+ return $backup_file[$key];
2820
+ }
2821
+
2822
+ if ($backup_file[$key] == false) {
2823
+ return array(
2824
+ 'error' => 'Failed to download file from gDrive.'
2825
+ );
2826
+ }
2827
+ }
2828
+ }
2829
+
2830
+ //$what = $tasks[$task_name]['task_args']['what'];
2831
+ $what = $requestParams['args']['what'];
2832
+ }
2833
+
2834
+
2835
+
2836
+ $this->wpdb_reconnect();
2837
+
2838
+ /////////////////// dev ////////////////////////
2839
+
2840
+
2841
+ if (!$this->is_server_writable()) {
2842
+ return array(
2843
+ 'error' => 'Failed, please add FTP details', 'error_code' => 'failed_please_add_ftp_details'
2844
+ );
2845
+ }
2846
+
2847
+ $url = wp_nonce_url('index.php?page=iwp_no_page','iwp_fs_cred');
2848
+ ob_start();
2849
+ if (false === ($creds = request_filesystem_credentials($url, '', false, ABSPATH, null) ) ) {
2850
+ return array(
2851
+ 'error' => 'Unable to get file system credentials', 'error_code' => 'unable_to_get_file_system_credentials'
2852
+ ); // stop processing here
2853
+ }
2854
+ ob_end_clean();
2855
+
2856
+ if ( ! WP_Filesystem($creds, ABSPATH) ) {
2857
+ //request_filesystem_credentials($url, '', true, false, null);
2858
+ return array(
2859
+ 'error' => 'Unable to initiate file system. Please check you have entered valid FTP credentials.', 'error_code' => 'unable_to_initiate_file_system'
2860
+ ); // stop processing here
2861
+ //return;
2862
+ }
2863
+
2864
+ require_once(ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php');//will be used to copy from temp directory
2865
+
2866
+ // do process
2867
+ //$temp_dir = get_temp_dir();
2868
+ $temp_dir = PCLZIP_TEMPORARY_DIR;
2869
+
2870
+
2871
+
2872
+ if(file_exists(PCLZIP_TEMPORARY_DIR) && is_dir(PCLZIP_TEMPORARY_DIR))
2873
+ {
2874
+ //
2875
+ }
2876
+ else
2877
+ {
2878
+ if(file_exists(dirname(PCLZIP_TEMPORARY_DIR)) && is_dir(dirname(PCLZIP_TEMPORARY_DIR))){
2879
+ @mkdir(PCLZIP_TEMPORARY_DIR, 0755, true);
2880
+ }
2881
+ else{
2882
+ @mkdir(dirname(PCLZIP_TEMPORARY_DIR), 0755, true);
2883
+ @mkdir(PCLZIP_TEMPORARY_DIR, 0755, true);
2884
+ }
2885
+
2886
+ }
2887
+ if(is_writable(PCLZIP_TEMPORARY_DIR))
2888
+ {
2889
+ @file_put_contents(PCLZIP_TEMPORARY_DIR . '/index.php', ''); //safe
2890
+ }
2891
+ else
2892
+ {
2893
+ $chmod = chmod(PCLZIP_TEMPORARY_DIR, 777);
2894
+ if(is_writable(PCLZIP_TEMPORARY_DIR)){
2895
+ @file_put_contents(PCLZIP_TEMPORARY_DIR . '/index.php', ''); //safe
2896
+ }
2897
+
2898
+ }
2899
+
2900
+ if(is_writable(PCLZIP_TEMPORARY_DIR))
2901
+ {
2902
+ $temp_dir = PCLZIP_TEMPORARY_DIR;
2903
+ }
2904
+ else{
2905
+ $temp_dir = get_temp_dir();
2906
+ if(!is_writable($temp_dir)){
2907
+ return array(
2908
+ 'error' => 'Temporary directory is not writable. Please set 777 permission for '.PCLZIP_TEMPORARY_DIR.' and try again.', 'error_code' => 'pclzip_temp_dir_not_writable_please_set_777'
2909
+ );
2910
+ }
2911
+ }
2912
+
2913
+
2914
+
2915
+ $new_temp_folder = untrailingslashit($temp_dir);
2916
+ $temp_uniq = md5(microtime(1));//should be random
2917
+ while (is_dir($new_temp_folder .'/'. $temp_uniq )) {
2918
+ $temp_uniq = md5(microtime(1));
2919
+ }
2920
+ $new_temp_folder = trailingslashit($new_temp_folder .'/'. $temp_uniq);
2921
+ $is_dir_created = mkdir($new_temp_folder);// new folder should be empty
2922
+ if(!$is_dir_created){
2923
+ return array(
2924
+ 'error' => 'Unable to create a temporary directory.', 'error_code' => 'unable_to_create_temporary_directory'
2925
+ );
2926
+ }
2927
+
2928
+
2929
+ $remote_abspath = $wp_filesystem->abspath();
2930
+ if(!empty($remote_abspath)){
2931
+ $remote_abspath = trailingslashit($remote_abspath);
2932
+ }else{
2933
+ return array(
2934
+ 'error' => 'Unable to locate WP root directory using file system.', 'error_code' => 'unable_to_locate_wp_root_directory_using_file_system'
2935
+ );
2936
+ }
2937
+
2938
+ //global $wp_filesystem;
2939
+ // $wp_filesystem->put_contents(
2940
+ // '/tmp/example.txt',
2941
+ // 'Example contents of a file',
2942
+ // FS_CHMOD_FILE // predefined mode settings for WP files
2943
+ // );
2944
+
2945
+ /////////////////// dev ////////////////////////
2946
+
2947
+ //if ($backup_file && file_exists($backup_file)) {
2948
+ if ($backup_file) {
2949
+ if ($overwrite)
2950
+ { //clone only fresh or existing to existing
2951
+ //Keep old db credentials before overwrite
2952
+ if (!$wp_filesystem->copy($remote_abspath . 'wp-config.php', $remote_abspath . 'iwp-temp-wp-config.php', true)) {
2953
+ if($unlink_file)
2954
+ {
2955
+ if(!is_array($backup_file))
2956
+ {
2957
+ $temp_backup_file = $backup_file;
2958
+ $backup_file = array();
2959
+ $backup_file = $temp_backup_file;
2960
+ }
2961
+ foreach($backup_file as $k => $value)
2962
+ {
2963
+ @unlink($value);
2964
+ }
2965
+ }
2966
+ return array(
2967
+ 'error' => 'Error creating wp-config. Please check your write permissions.', 'error_code' => 'error_creating_wp_config'
2968
+ );
2969
+ }
2970
+
2971
+ $db_host = DB_HOST;
2972
+ $db_user = DB_USER;
2973
+ $db_password = DB_PASSWORD;
2974
+ $home = rtrim(get_option('home'), "/");
2975
+ $site_url = get_option('site_url');
2976
+
2977
+ $clone_options = array();
2978
+ if (trim($clone_from_url) || trim($iwp_clone) || trim($maintain_old_key)) {
2979
+
2980
+ $clone_options['iwp_client_nossl_key'] = get_option('iwp_client_nossl_key');
2981
+ $clone_options['iwp_client_public_key'] = get_option('iwp_client_public_key');
2982
+ $clone_options['iwp_client_action_message_id'] = get_option('iwp_client_action_message_id');
2983
+
2984
+ }
2985
+
2986
+ //$clone_options['iwp_client_backup_tasks'] = serialize(get_option('iwp_client_multi_backup_temp_values'));
2987
+ $clone_options['iwp_client_notifications'] = serialize(get_option('iwp_client_notifications'));
2988
+ $clone_options['iwp_client_pageview_alerts'] = serialize(get_option('iwp_client_pageview_alerts'));
2989
+
2990
+ $qry = "SELECT * FROM ".$wpdb->base_prefix."iwp_backup_status";
2991
+ $clone_options['iwp_client_backup_tasks'] = $wpdb->get_results($qry, ARRAY_A);
2992
+
2993
+ /*if(!$clone_options['iwp_client_backup_tasks'])
2994
+ {
2995
+ return array(
2996
+ 'error' => 'Unable to restore clone options.'
2997
+ );
2998
+ }*/
2999
+
3000
+ }
3001
+ else {
3002
+ $restore_options = array();
3003
+ $restore_options['iwp_client_notifications'] = serialize(get_option('iwp_client_notifications'));
3004
+ $restore_options['iwp_client_pageview_alerts'] = serialize(get_option('iwp_client_pageview_alerts'));
3005
+ $restore_options['iwp_client_user_hit_count'] = serialize(get_option('iwp_client_user_hit_count'));
3006
+ //$restore_options['iwp_client_backup_tasks'] = serialize(get_option('iwp_client_multi_backup_temp_values'));
3007
+
3008
+ $qry = "SELECT * FROM ".$wpdb->base_prefix."iwp_backup_status";
3009
+ $restore_options['iwp_client_backup_tasks'] = $wpdb->get_results($qry, ARRAY_A);
3010
+
3011
+ /*if(!$restore_options['iwp_client_backup_tasks'])
3012
+ {
3013
+ return array(
3014
+ 'error' => 'Unable to restore options.'
3015
+ );
3016
+ }*/
3017
+
3018
+ }
3019
+
3020
+
3021
+ /*if(!empty($clone_options['iwp_client_backup_tasks'])){
3022
+
3023
+ if(mysql_num_rows(mysql_query("SHOW TABLES LIKE '".$table."'")) == 1){
3024
+ echo "Table exists";
3025
+
3026
+ $delete = $wpdb->query("DELETE TABLE wp_iwp_backup_status");
3027
+ }
3028
+ iwp_mmb_create_backup_table();
3029
+
3030
+ insertBackupStatusContens($clone_options['iwp_client_backup_tasks']);
3031
+
3032
+ }*/
3033
+
3034
+ //Backup file will be extracted to a temporary path
3035
+ if(!is_array($backup_file))
3036
+ {
3037
+ $temp_backup_file = $backup_file;
3038
+ $backup_file = array();
3039
+ $backup_file[0] = $temp_backup_file;
3040
+ }
3041
+ foreach($backup_file as $single_backup_file)
3042
+ {
3043
+ echo "this backup file - ".$single_backup_file;
3044
+ //chdir(ABSPATH);
3045
+ $unzip = $this->get_unzip();
3046
+ $command = "$unzip -o $single_backup_file -d $new_temp_folder";
3047
+ iwp_mmb_print_flush('ZIP Extract CMD: Start');
3048
+ ob_start();
3049
+ $result = $this->iwp_mmb_exec($command);
3050
+ //$result = false;
3051
+ ob_get_clean();
3052
+ iwp_mmb_print_flush('ZIP Extract CMD: End');
3053
+
3054
+ if (!$result) { //fallback to pclzip
3055
+ ////define('PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
3056
+ //require_once ABSPATH . '/wp-admin/includes/class-pclzip.php';
3057
+ //require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
3058
+ iwp_mmb_print_flush('ZIP Extract PCL: Start');
3059
+ $archive = new IWPPclZip($single_backup_file);
3060
+ $result = $archive->extract(PCLZIP_OPT_PATH, $new_temp_folder, PCLZIP_OPT_REPLACE_NEWER);
3061
+ iwp_mmb_print_flush('ZIP Extract PCL: End');
3062
+ }
3063
+
3064
+ $this->wpdb_reconnect();
3065
+ if ($unlink_file) {
3066
+ @unlink($single_backup_file);
3067
+ }
3068
+
3069
+ if (!$result) {
3070
+ if ($unlink_file) {
3071
+ foreach($backup_file as $single_file)
3072
+ {
3073
+ @unlink($single_file);
3074
+ }
3075
+ }
3076
+ return array(
3077
+ 'error' => 'Failed to unzip files. pclZip error (' . $archive->error_code . '): .' . $archive->error_string, 'error_code' => 'failed_to_unzip_files'
3078
+ );
3079
+ }
3080
+
3081
+ }
3082
+
3083
+ //appending files if split is done
3084
+ $joinedFilesArray = $this -> appendSplitFiles($new_temp_folder);
3085
+ //$compareHashValuesArray = $this -> compareHashValues($joinedFilesArray['orgHash'], $joinedFilesArray['afterSplitHash']);
3086
+
3087
+ //do the restore db part only if the category is full or db .. else skip it for files alone concept
3088
+ if(($what == 'full')||($what == 'db'))
3089
+ {
3090
+ $db_result = $this->restore_db($new_temp_folder);
3091
+
3092
+ if (!$db_result) {
3093
+ return array(
3094
+ 'error' => 'Error restoring database.', 'error_code' => 'error_restoring_database'
3095
+ );
3096
+ } else if(is_array($db_result) && isset($db_result['error'])){
3097
+ return array(
3098
+ 'error' => $db_result['error']
3099
+ );
3100
+ }
3101
+ }
3102
+
3103
+ }
3104
+ else {
3105
+ return array(
3106
+ 'error' => 'Backup file not found.', 'error_code' => 'backup_file_not_found'
3107
+ );
3108
+ }
3109
+ $bError = error_get_last();
3110
+
3111
+
3112
+ //copy files from temp to ABSPATH
3113
+ $copy_result = $this->iwp_mmb_direct_to_any_copy_dir($new_temp_folder, $remote_abspath);
3114
+
3115
+ if ( is_wp_error($copy_result) ){
3116
+ $wp_temp_direct2 = new WP_Filesystem_Direct('');
3117
+ $wp_temp_direct2->delete($new_temp_folder, true);
3118
+ return $copy_result;
3119
+ }
3120
+
3121
+
3122
+ $this->wpdb_reconnect();
3123
+
3124
+
3125
+
3126
+ //Replace options and content urls
3127
+ if ($overwrite) {//fresh WP package or existing to existing site
3128
+ //Get New Table prefix
3129
+ $new_table_prefix = trim($this->get_table_prefix());
3130
+ //Retrieve old wp_config
3131
+ //@unlink(ABSPATH . 'wp-config.php');
3132
+ $wp_filesystem->delete($remote_abspath . 'wp-config.php', false, 'f');
3133
+ //Replace table prefix
3134
+ //$lines = file(ABSPATH . 'iwp-temp-wp-config.php');
3135
+ $lines = $wp_filesystem->get_contents_array($remote_abspath . 'iwp-temp-wp-config.php');
3136
+
3137
+ $new_lines = '';
3138
+ foreach ($lines as $line) {
3139
+ if (strstr($line, '$table_prefix')) {
3140
+ $line = '$table_prefix = "' . $new_table_prefix . '";' . PHP_EOL;
3141
+ }
3142
+ $new_lines .= $line;
3143
+ //file_put_contents(ABSPATH . 'wp-config.php', $line, FILE_APPEND);
3144
+ }
3145
+
3146
+ $wp_filesystem->put_contents($remote_abspath . 'wp-config.php', $new_lines);
3147
+
3148
+ //@unlink(ABSPATH . 'iwp-temp-wp-config.php');
3149
+ $wp_filesystem->delete($remote_abspath . 'iwp-temp-wp-config.php', false, 'f');
3150
+
3151
+ //Replace options
3152
+ $query = "SELECT option_value FROM " . $new_table_prefix . "options WHERE option_name = 'home'";
3153
+ $old = $wpdb->get_var($query);
3154
+ $old = rtrim($old, "/");
3155
+ $query = "UPDATE " . $new_table_prefix . "options SET option_value = %s WHERE option_name = 'home'";
3156
+ $wpdb->query($wpdb->prepare($query, $home));
3157
+ $query = "UPDATE " . $new_table_prefix . "options SET option_value = %s WHERE option_name = 'siteurl'";
3158
+ $wpdb->query($wpdb->prepare($query, $home));
3159
+ //Replace content urls
3160
+
3161
+ $regexp1 = 'src="(.*)'.$old.'(.*)"';
3162
+ $regexp2 = 'href="(.*)'.$old.'(.*)"';
3163
+ $query = "UPDATE " . $new_table_prefix . "posts SET post_content = REPLACE (post_content, %s,%s) WHERE post_content REGEXP %s OR post_content REGEXP %s";
3164
+ $wpdb->query($wpdb->prepare($query, $old, $home, $regexp1, $regexp2));
3165
+
3166
+ if (trim($new_password)) {
3167
+ $new_password = wp_hash_password($new_password);
3168
+ }
3169
+ if (!trim($clone_from_url) && !trim($iwp_clone)) {
3170
+ if ($new_user && $new_password) {
3171
+ $query = "UPDATE " . $new_table_prefix . "users SET user_login = %s, user_pass = %s WHERE user_login = %s";
3172
+ $wpdb->query($wpdb->prepare($query, $new_user, $new_password, $old_user));
3173
+ }
3174
+ } else {
3175
+
3176
+ // if ($iwp_clone) {
3177
+ if ($admin_email) {
3178
+ //Clean Install
3179
+ $query = "UPDATE " . $new_table_prefix . "options SET option_value = %s WHERE option_name = 'admin_email'";
3180
+ $wpdb->query($wpdb->prepare($query, $admin_email));
3181
+ $query = "SELECT * FROM " . $new_table_prefix . "users LIMIT 1";
3182
+ $temp_user = $wpdb->get_row($query);
3183
+ if (!empty($temp_user)) {
3184
+ $query = "UPDATE " . $new_table_prefix . "users SET user_email=%s, user_login = %s, user_pass = %s WHERE user_login = %s";
3185
+ $wpdb->query($wpdb->prepare($query, $admin_email, $new_user, $new_password, $temp_user->user_login));
3186
+ }
3187
+
3188
+ }
3189
+ // }
3190
+
3191
+ //if ($clone_from_url) {
3192
+ if ($new_user && $new_password) {
3193
+ $query = "UPDATE " . $new_table_prefix . "users SET user_pass = %s WHERE user_login = %s";
3194
+ $wpdb->query($wpdb->prepare($query, $new_password, $new_user));
3195
+ }
3196
+ // }
3197
+
3198
+ }
3199
+
3200
+ if (is_array($clone_options) && !empty($clone_options)) {
3201
+
3202
+ $GLOBALS['table_prefix'] = $new_table_prefix;
3203
+
3204
+ $this->clone_restore_options($clone_options);
3205
+ }
3206
+
3207
+ //Remove hit count
3208
+ $query = "DELETE FROM " . $new_table_prefix . "options WHERE option_name = 'iwp_client_user_hit_count'";
3209
+ $wpdb->query($query);
3210
+
3211
+ //Check for .htaccess permalinks update
3212
+ $this->replace_htaccess($home, $remote_abspath);
3213
+ }
3214
+ else {
3215
+ //restore client options
3216
+ if (is_array($restore_options) && !empty($restore_options)) {
3217
+
3218
+ $GLOBALS['table_prefix'] = $wpdb->base_prefix;
3219
+ $this->clone_restore_options($restore_options);
3220
+ }
3221
+ }
3222
+
3223
+ //clear the temp directory
3224
+ $wp_temp_direct2 = new WP_Filesystem_Direct('');
3225
+ $wp_temp_direct2->delete($new_temp_folder, true);
3226
+
3227
+ return !empty($new_user) ? $new_user : true ;
3228
+ }
3229
+
3230
+
3231
+ function clone_restore_options($clone_restore_options){
3232
+ global $wpdb;
3233
+
3234
+ $table = $GLOBALS['table_prefix'].'iwp_backup_status';
3235
+
3236
+ if(mysql_num_rows(mysql_query("SHOW TABLES LIKE '".$table."'")) == 1){
3237
+
3238
+ $delete = $wpdb->query("DROP TABLE '".$table."' ");
3239
+ }
3240
+
3241
+ iwp_mmb_create_backup_table();
3242
+
3243
+ if(!empty($clone_restore_options['iwp_client_backup_tasks'])){
3244
+ $this->insertBackupStatusContens($clone_restore_options['iwp_client_backup_tasks']);
3245
+ }
3246
+
3247
+ return true;
3248
+ }
3249
+
3250
+
3251
+ function insertBackupStatusContens($dataContent){
3252
+ global $wpdb;
3253
+
3254
+ $table = $GLOBALS['table_prefix'].'iwp_backup_status';
3255
+ if(!empty($dataContent)){
3256
+ foreach($dataContent as $key => $value){
3257
+ $insert = $wpdb->insert($table,array( 'ID' => $value['stage'], 'historyID' => $value['historyID'], 'taskName' => $value['taskName'], 'action' => $value['action'],'type' => $value['type'], 'category' => $value['category'], 'stage' => $value['stage'],'status' => $value['status'],'finalStatus' => $value['finalStatus'],'statusMsg' => $value['statusMsg'],'requestParams' => $value['requestParams'],'responseParams' => $value['responseParams'], 'taskResults' => $value['taskResults'], 'startTime' => $value['startTime'], 'endTime' => $value['endTime']), array( '%d', '%d','%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%d', '%d' ) );
3258
+
3259
+ }
3260
+ }
3261
+ }
3262
+
3263
+ function compareHashValues($joinedFilesArray, $hashValues)
3264
+ {
3265
+ $filesWithChangedHash = array();
3266
+ foreach($hashValues as $key => $value)
3267
+ {
3268
+ foreach($joinedFilesArray as $k => $v)
3269
+ {
3270
+
3271
+ $pos = strpos($k, $key);
3272
+ if($pos !== false)
3273
+ {
3274
+ if($value != $v)
3275
+ {
3276
+ $filesWithChangedHash[$k] = $key;
3277
+ }
3278
+ break;
3279
+ }
3280
+ }
3281
+ }
3282
+ return $filesWithChangedHash;
3283
+ }
3284
+
3285
+ function appendSplitFiles($fileToAppend)
3286
+ {
3287
+ // function to join the split files during multicall backup
3288
+ $directory_tree = get_all_files_from_dir($fileToAppend);
3289
+ usort($directory_tree, array($this, "sortString"));
3290
+
3291
+ $joinedFilesArray = array();
3292
+ $orgHashValues = array();
3293
+ $hashValue = '';
3294
+
3295
+ foreach($directory_tree as $k => $v)
3296
+ {
3297
+ $contents = '';
3298
+ $orgFileCount = 0;
3299
+ /* $subject = $v;
3300
+ $pattern = '/iwp_part/i';
3301
+ preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE);
3302
+ print_r($matches); */
3303
+ $pos = strpos($v, 'iwp_part');
3304
+ if($pos !== false)
3305
+ {
3306
+ $currentFile = explode(".",$v);
3307
+ $currentFileSize = count($currentFile);
3308
+ foreach($currentFile as $key => $val)
3309
+ {
3310
+ if(($key == ($currentFileSize-2))||($currentFileSize == 1))
3311
+ {
3312
+ $insPos = strpos($val, '_iwp_part');
3313
+ $rest = substr_replace($val, '', $insPos);
3314
+ $currentFile[$key] = $rest;
3315
+
3316
+ $insPos2 = strpos($rest, '_iwp_hash');
3317
+ if($insPos2 !== false)
3318
+ {
3319
+ $hashInitialPoint = strrpos($rest, "_iwp_hash");
3320
+ $hashValue = substr($rest, $hashInitialPoint+10);
3321
+ //$hashValue = substr($rest, -32);
3322
+ $rest = substr_replace($rest, '', $insPos2);
3323
+ $currentFile[$key] = $rest;
3324
+ }
3325
+ }
3326
+ }
3327
+ $orgFileCount++;
3328
+ $orgFileName = implode(".", $currentFile);
3329
+ $handle = fopen($v,"r");
3330
+ $contents = fread($handle, iwp_mmb_get_file_size($v));
3331
+ fclose($handle);
3332
+ if($orgFileCount == 1)
3333
+ {
3334
+ //clearing contents of file intially to prevent appending to already existing file
3335
+ //file_put_contents($orgFileName,'',FILE_APPEND);
3336
+ }
3337
+ file_put_contents($orgFileName,$contents,FILE_APPEND);
3338
+ $joinedFilesArray[$orgFileName] = 'hash';
3339
+ $orgHashValues[$orgFileName] = $hashValue;
3340
+ echo " orgFileName - ".$orgFileName;
3341
+ $file_to_ulink = realpath($v);
3342
+ $resultUnlink = unlink($file_to_ulink);
3343
+ $resultUnlink = error_get_last();
3344
+ if(!$resultUnlink)
3345
+ {
3346
+ if(is_file($v))
3347
+ {
3348
+ unlink($file_to_ulink);
3349
+ }
3350
+ }
3351
+
3352
+
3353
+ }
3354
+ }
3355
+ $hashValues = array();
3356
+ foreach($joinedFilesArray as $key => $value)
3357
+ {
3358
+ //$hashValues[$key] = md5_file($key);
3359
+ $hashValues[$key] = 'hash';
3360
+ }
3361
+ $totalHashValues = array();
3362
+ $totalHashValues['orgHash'] = $orgHashValues;
3363
+ $totalHashValues['afterSplitHash'] = $hashValues;
3364
+ return $totalHashValues;
3365
+ }
3366
+
3367
+ function sortString($a, $b)
3368
+ {
3369
+ // the uSort CallBack Function used in the appendSplitFiles function
3370
+ $stringArr = array();
3371
+ $stringArr[0] = $a;
3372
+ $stringArr[1] = $b;
3373
+ $strA = '';
3374
+ $strB = '';
3375
+ foreach($stringArr as $strKey => $strVal)
3376
+ {
3377
+ $mystring = $strVal;
3378
+ $findme = '_iwp_part'; //fileNameSplit logic
3379
+ $pos = strpos($mystring, $findme);
3380
+ $rest = substr($mystring, $pos);
3381
+ $pos2 = strrpos($rest, $findme);
3382
+ $len = strlen($rest);
3383
+ $actLen = $pos2+strlen($findme);
3384
+ $actPos = $len - $actLen -1;
3385
+ $actPartNum = substr($rest, -($actPos));
3386
+ $actPartNumArray = explode(".",$actPartNum);
3387
+ foreach($actPartNumArray as $key => $val)
3388
+ {
3389
+ if($key == 0)
3390
+ $actPartNum = $val;
3391
+ }
3392
+ if($strKey == 0)
3393
+ $strA = intval($actPartNum);
3394
+ else
3395
+ $strB = intval($actPartNum);
3396
+ }
3397
+ if ($strA == $strB){return 0;}
3398
+ return ($strA < $strB) ? -1 : 1;
3399
+ }
3400
+
3401
+ function restore_db($new_temp_folder)
3402
+ {
3403
+ global $wpdb;
3404
+ $paths = $this->check_mysql_paths();
3405
+ $file_path = $new_temp_folder . '/iwp_db';
3406
+ @chmod($file_path,0755);
3407
+ $file_name = glob($file_path . '/*.sql');
3408
+ $file_name = $file_name[0];
3409
+
3410
+ if(!$file_name){
3411
+ return array('error' => 'Cannot access database file.');
3412
+ }
3413
+
3414
+ $brace = (substr(PHP_OS, 0, 3) == 'WIN') ? '"' : '';
3415
+ $command = $brace . $paths['mysql'] . $brace . ' --host="' . DB_HOST . '" --user="' . DB_USER . '" --password="' . DB_PASSWORD . '" --default-character-set="utf8" ' . DB_NAME . ' < ' . $brace . $file_name . $brace;
3416
+ iwp_mmb_print_flush('DB Restore CMD: Start');
3417
+ ob_start();
3418
+ $result = $this->iwp_mmb_exec($command);
3419
+ ob_get_clean();
3420
+ iwp_mmb_print_flush('DB Restore CMD: End');
3421
+ if (!$result) {
3422
+ //try php
3423
+ $this->restore_db_php($file_name);
3424
+ }
3425
+
3426
+
3427
+ @unlink($file_name);
3428
+ @unlink(dirname($file_name).'/index.php');
3429
+ @rmdir(dirname($file_name));//remove its folder
3430
+ return true;
3431
+ }
3432
+
3433
+
3434
+
3435
+
3436
+ function restore_db_php($file_name)
3437
+ {
3438
+
3439
+ $this->wpdb_reconnect();
3440
+ global $wpdb;
3441
+
3442
+ $wpdb->query("SET NAMES 'utf8'");
3443
+
3444
+ $current_query = '';
3445
+ // Read in entire file
3446
+ $lines = file($file_name);
3447
+ // Loop through each line
3448
+ if(!empty($lines)){
3449
+ foreach ($lines as $line) {
3450
+ iwp_mmb_auto_print('restore_db_php');
3451
+ // Skip it if it's a comment
3452
+ if (substr($line, 0, 2) == '--' || $line == '')
3453
+ continue;
3454
+
3455
+ // Add this line to the current query
3456
+ $current_query .= $line;
3457
+ // If it has a semicolon at the end, it's the end of the query
3458
+ if (substr(trim($line), -1, 1) == ';') {
3459
+ // Perform the query
3460
+ $result = $wpdb->query($current_query);
3461
+ if ($result === false)
3462
+ return false;
3463
+ // Reset temp variable to empty
3464
+ $current_query = '';
3465
+ }
3466
+ }
3467
+ }
3468
+
3469
+ return true;
3470
+ }
3471
+
3472
+ function get_table_prefix()
3473
+ {
3474
+ $lines = file(ABSPATH . 'wp-config.php');
3475
+ foreach ($lines as $line) {
3476
+ if (strstr($line, '$table_prefix')) {
3477
+ $pattern = "/(\'|\")[^(\'|\")]*/";
3478
+ preg_match($pattern, $line, $matches);
3479
+ $prefix = substr($matches[0], 1);
3480
+ return $prefix;
3481
+ break;
3482
+ }
3483
+ }
3484
+ return 'wp_'; //default
3485
+ }
3486
+
3487
+ function optimize_tables()
3488
+ {
3489
+ global $wpdb;
3490
+ $query = 'SHOW TABLE STATUS';
3491
+ $tables = $wpdb->get_results($query, ARRAY_A);
3492
+ foreach ($tables as $table) {
3493
+ if (in_array($table['Engine'], array(
3494
+ 'MyISAM',
3495
+ 'ISAM',
3496
+ 'HEAP',
3497
+ 'MEMORY',
3498
+ 'ARCHIVE'
3499
+ )))
3500
+ $table_string .= $table['Name'] . ",";
3501
+ elseif ($table['Engine'] == 'InnoDB') {
3502
+ $optimize = $wpdb->query("ALTER TABLE {$table['Name']} ENGINE=InnoDB");
3503
+ }
3504
+ }
3505
+
3506
+ if(!empty($table_string)){
3507
+ $table_string = rtrim($table_string, ',');
3508
+ $optimize = $wpdb->query("OPTIMIZE TABLE $table_string");
3509
+ }
3510
+
3511
+ return $optimize ? true : false;
3512
+ }
3513
+
3514
+ ### Function: Auto Detect MYSQL and MYSQL Dump Paths
3515
+ function check_mysql_paths()
3516
+ {
3517
+ global $wpdb;
3518
+ $paths = array(
3519
+ 'mysql' => '',
3520
+ 'mysqldump' => ''
3521
+ );
3522
+ if (substr(PHP_OS, 0, 3) == 'WIN') {
3523
+ $mysql_install = $wpdb->get_row("SHOW VARIABLES LIKE 'basedir'");
3524
+ if ($mysql_install) {
3525
+ $install_path = str_replace('\\', '/', $mysql_install->Value);
3526
+ $paths['mysql'] = $install_path . 'bin/mysql.exe';
3527
+ $paths['mysqldump'] = $install_path . 'bin/mysqldump.exe';
3528
+ } else {
3529
+ $paths['mysql'] = 'mysql.exe';
3530
+ $paths['mysqldump'] = 'mysqldump.exe';
3531
+ }
3532
+ } else {
3533
+ $paths['mysql'] = $this->iwp_mmb_exec('which mysql', true);
3534
+ if (empty($paths['mysql']))
3535
+ $paths['mysql'] = 'mysql'; // try anyway
3536
+
3537
+ $paths['mysqldump'] = $this->iwp_mmb_exec('which mysqldump', true);
3538
+ if (empty($paths['mysqldump']))
3539
+ $paths['mysqldump'] = 'mysqldump'; // try anyway
3540
+
3541
+ }
3542
+
3543
+
3544
+ return $paths;
3545
+ }
3546
+
3547
+ //Check if exec, system, passthru functions exist
3548
+ function check_sys()
3549
+ {
3550
+ if ($this->iwp_mmb_function_exists('exec'))
3551
+ return 'exec';
3552
+
3553
+ if ($this->iwp_mmb_function_exists('system'))
3554
+ return 'system';
3555
+
3556
+ if ($this->iwp_mmb_function_exists('passhtru'))
3557
+ return 'passthru';
3558
+
3559
+ return false;
3560
+
3561
+ }
3562
+
3563
+ function iwp_mmb_exec($command, $string = false, $rawreturn = false)
3564
+ {
3565
+ if ($command == '')
3566
+ return false;
3567
+
3568
+ if ($this->iwp_mmb_function_exists('exec')) {
3569
+ $log = @exec($command, $output, $return);
3570
+
3571
+ if ($string)
3572
+ return $log;
3573
+ if ($rawreturn)
3574
+ return $return;
3575
+
3576
+ return $return ? false : true;
3577
+ } elseif ($this->iwp_mmb_function_exists('system')) {
3578
+ $log = @system($command, $return);
3579
+
3580
+ if ($string)
3581
+ return $log;
3582
+
3583
+ if ($rawreturn)
3584
+ return $return;
3585
+
3586
+ return $return ? false : true;
3587
+ } elseif ($this->iwp_mmb_function_exists('passthru') && !$string) {
3588
+ $log = passthru($command, $return);
3589
+
3590
+ if ($rawreturn)
3591
+ return $return;
3592
+
3593
+ return $return ? false : true;
3594
+ }
3595
+
3596
+ if ($rawreturn)
3597
+ return -1;
3598
+
3599
+ return false;
3600
+ }
3601
+
3602
+ function get_zip()
3603
+ {
3604
+ $zip = $this->iwp_mmb_exec('which zip', true);
3605
+ if (!$zip)
3606
+ $zip = "zip";
3607
+ return $zip;
3608
+ }
3609
+
3610
+ function get_unzip()
3611
+ {
3612
+ $unzip = $this->iwp_mmb_exec('which unzip', true);
3613
+ if (!$unzip)
3614
+ $unzip = "unzip";
3615
+ return $unzip;
3616
+ }
3617
+
3618
+ function check_backup_compat()
3619
+ {
3620
+ $reqs = array();
3621
+ if (strpos($_SERVER['DOCUMENT_ROOT'], '/') === 0) {
3622
+ $reqs['Server OS']['status'] = 'Linux (or compatible)';
3623
+ $reqs['Server OS']['pass'] = true;
3624
+ } else {
3625
+ $reqs['Server OS']['status'] = 'Windows';
3626
+ $reqs['Server OS']['pass'] = true;
3627
+ $pass = false;
3628
+ }
3629
+ $reqs['PHP Version']['status'] = phpversion();
3630
+ if ((float) phpversion() >= 5.1) {
3631
+ $reqs['PHP Version']['pass'] = true;
3632
+ } else {
3633
+ $reqs['PHP Version']['pass'] = false;
3634
+ $pass = false;
3635
+ }
3636
+
3637
+
3638
+ if (is_writable(WP_CONTENT_DIR)) {
3639
+ $reqs['Backup Folder']['status'] = "writable";
3640
+ $reqs['Backup Folder']['pass'] = true;
3641
+ } else {
3642
+ $reqs['Backup Folder']['status'] = "not writable";
3643
+ $reqs['Backup Folder']['pass'] = false;
3644
+ }
3645
+
3646
+
3647
+ $file_path = IWP_BACKUP_DIR;
3648
+ $reqs['Backup Folder']['status'] .= ' (' . $file_path . ')';
3649
+
3650
+ if ($func = $this->check_sys()) {
3651
+ $reqs['Execute Function']['status'] = $func;
3652
+ $reqs['Execute Function']['pass'] = true;
3653
+ } else {
3654
+ $reqs['Execute Function']['status'] = "not found";
3655
+ $reqs['Execute Function']['info'] = "(will try PHP replacement)";
3656
+ $reqs['Execute Function']['pass'] = false;
3657
+ }
3658
+ $reqs['Zip']['status'] = $this->get_zip();
3659
+
3660
+ $reqs['Zip']['pass'] = true;
3661
+
3662
+
3663
+
3664
+ $reqs['Unzip']['status'] = $this->get_unzip();
3665
+
3666
+ $reqs['Unzip']['pass'] = true;
3667
+
3668
+ $paths = $this->check_mysql_paths();
3669
+
3670
+ if (!empty($paths['mysqldump'])) {
3671
+ $reqs['MySQL Dump']['status'] = $paths['mysqldump'];
3672
+ $reqs['MySQL Dump']['pass'] = true;
3673
+ } else {
3674
+ $reqs['MySQL Dump']['status'] = "not found";
3675
+ $reqs['MySQL Dump']['info'] = "(will try PHP replacement)";
3676
+ $reqs['MySQL Dump']['pass'] = false;
3677
+ }
3678
+
3679
+ $exec_time = ini_get('max_execution_time');
3680
+ $reqs['Execution time']['status'] = $exec_time ? $exec_time . "s" : 'unknown';
3681
+ $reqs['Execution time']['pass'] = true;
3682
+
3683
+ $mem_limit = ini_get('memory_limit');
3684
+ $reqs['Memory limit']['status'] = $mem_limit ? $mem_limit : 'unknown';
3685
+ $reqs['Memory limit']['pass'] = true;
3686
+
3687
+
3688
+ return $reqs;
3689
+ }
3690
+
3691
+ function ftp_backup($historyID,$args = '')
3692
+ {
3693
+ //getting the settings
3694
+ $this -> backup_settings_vals = get_option('iwp_client_multi_backup_temp_values', $backup_settings_values);
3695
+ $current_file_num = 0;
3696
+ if($args == '')
3697
+ {
3698
+
3699
+ $responseParams = $this -> getRequiredData($historyID,"responseParams");
3700
+
3701
+ if(!$responseParams)
3702
+ return $this->statusLog($this -> hisID, array('stage' => 'UploadbackupFiles', 'status' => 'error', 'statusMsg' => 'FTP Backup failed: Error while fetching table data', 'statusCode' => 'ftp_backup_failed_error_while_fetching_table_data'));
3703
+
3704
+ $args = $responseParams['ftpArgs'];
3705
+ $current_file_num = $responseParams['current_file_num'];
3706
+ }
3707
+ $tempArgs = $args;
3708
+ extract($args);
3709
+ //Args: $ftp_username, $ftp_password, $ftp_hostname, $backup_file, $ftp_remote_folder, $ftp_site_folder
3710
+ $port = $ftp_port ? $ftp_port : 21; //default port is 21
3711
+ if ($ftp_ssl) {
3712
+ if (function_exists('ftp_ssl_connect')) {
3713
+ $conn_id = ftp_ssl_connect($ftp_hostname,$port);
3714
+ if ($conn_id === false) {
3715
+ return array(
3716
+ 'error' => 'Failed to connect to ' . $ftp_hostname,
3717
+ 'partial' => 1, 'error_code' => 'failed_to_connect_to_hostname_ftp_ssl_connect'
3718
+ );
3719
+ }
3720
+ } else {
3721
+ return array(
3722
+ 'error' => 'Your server doesn\'t support FTP SSL',
3723
+ 'partial' => 1, 'error_code' => 'your_server_doesnt_support_ftp_ssl'
3724
+ );
3725
+ }
3726
+ }
3727
+ else {
3728
+ if (function_exists('ftp_connect')) {
3729
+ $conn_id = ftp_connect($ftp_hostname,$port);
3730
+ if ($conn_id === false) {
3731
+ return array(
3732
+ 'error' => 'Failed to connect to ' . $ftp_hostname,
3733
+ 'partial' => 1, 'error_code' => 'failed_to_connect_hostname_ftp_connect'
3734
+ );
3735
+ }
3736
+ } else {
3737
+ return array(
3738
+ 'error' => 'Your server doesn\'t support FTP',
3739
+ 'partial' => 1, 'error_code' => 'your_server_doesnt_support_ftp'
3740
+ );
3741
+ }
3742
+ }
3743
+
3744
+ $login = @ftp_login($conn_id, $ftp_username, $ftp_password);
3745
+ if ($login === false) {
3746
+ return array(
3747
+ 'error' => 'FTP login failed for ' . $ftp_username . ', ' . $ftp_password,
3748
+ 'partial' => 1, 'error_code' => 'ftp_login_failed'
3749
+ );
3750
+ }
3751
+
3752
+ if($ftp_passive){
3753
+ @ftp_pasv($conn_id,true);
3754
+ }
3755
+
3756
+
3757
+
3758
+ @ftp_mkdir($conn_id, $ftp_remote_folder);
3759
+ if ($ftp_site_folder) {
3760
+ $ftp_remote_folder .= '/' . $this->site_name;
3761
+ }
3762
+ @ftp_mkdir($conn_id, $ftp_remote_folder);
3763
+
3764
+ //$upload = @ftp_put($conn_id, $ftp_remote_folder . '/' . basename($backup_file), $backup_file, FTP_BINARY);
3765
+ if(!is_array($backup_file))
3766
+ {
3767
+ $temp_backup_file = $backup_file;
3768
+ $backup_file = array();
3769
+ $backup_file[] = $temp_backup_file;
3770
+ }
3771
+
3772
+ if(is_array($backup_file))
3773
+ {
3774
+ $backup_file_base_name = basename($backup_file[$current_file_num]);
3775
+ }
3776
+ else
3777
+ {
3778
+ $backup_file_base_name = basename($backup_file);
3779
+ }
3780
+
3781
+ $upload = $this -> ftp_multi_upload($conn_id, $ftp_remote_folder . '/' . basename($backup_file_base_name), $backup_file, FTP_BINARY, $historyID, $tempArgs, $current_file_num);
3782
+
3783
+
3784
+ if ($upload === false) { //Try ascii
3785
+ //$upload = @ftp_put($conn_id, $ftp_remote_folder . '/' . basename($backup_file), $backup_file, FTP_ASCII); //darkCode testing purpose
3786
+ }
3787
+
3788
+ @ftp_close($conn_id);
3789
+
3790
+ if ($upload === false) {
3791
+ return array(
3792
+ 'error' => 'Failed to upload file to FTP. Please check your specified path.',
3793
+ 'partial' => 1, 'error_code' => 'failed_to_upload_file_to_ftp'
3794
+ );
3795
+ }
3796
+
3797
+ return $upload;
3798
+ }
3799
+
3800
+ function ftp_multi_upload($conn_id, $remoteFileName, $backup_file, $mode, $historyID, $tempArgs, $current_file_num = 0)
3801
+ {
3802
+ $requestParams = $this->getRequiredData($historyID, "requestParams");
3803
+ $task_result = $this->getRequiredData($historyID, "taskResults");
3804
+
3805
+ if(!$remoteFileName)
3806
+ {
3807
+ return array(
3808
+ 'error' => 'Failed to upload file to FTP. Please check your specified path.',
3809
+ 'partial' => 1, 'error_code' => 'failed_to_upload_file_to_ftp'
3810
+ );
3811
+ }
3812
+
3813
+ $backup_files_base_name = array();
3814
+ if(is_array($backup_file))
3815
+ {
3816
+ foreach($backup_file as $value)
3817
+ {
3818
+ $backup_files_base_name[] = basename($value);
3819
+ }
3820
+ }
3821
+ else
3822
+ {
3823
+ $backup_files_base_name = basename($backup_file);
3824
+ }
3825
+
3826
+ $backup_files_count = count($backup_file);
3827
+
3828
+ if(is_array($backup_file))
3829
+ {
3830
+ $backup_file = $backup_file[$current_file_num];
3831
+ }
3832
+
3833
+
3834
+ $task_result['task_results'][$historyID]['ftp'] = $backup_files_base_name;
3835
+ $task_result['ftp'] = $backup_files_base_name;
3836
+
3837
+ $backup_settings_values = $this -> backup_settings_vals;
3838
+ /* $upload_loop_break_time = $backup_settings_values['upload_loop_break_time'];
3839
+ $del_host_file = $backup_settings_values['del_host_file']; */
3840
+
3841
+ $upload_loop_break_time = $requestParams['account_info']['upload_loop_break_time']; //darkcode changed
3842
+ $del_host_file = $requestParams['args']['del_host_file'];
3843
+
3844
+ if(!$upload_loop_break_time)
3845
+ {
3846
+ $upload_loop_break_time = 25; //safe
3847
+ }
3848
+
3849
+ $startTime = microtime(true);
3850
+ //get the filesize of the remote file first
3851
+ $file_size = ftp_size($conn_id, $remoteFileName);
3852
+ if ($file_size != -1)
3853
+ {
3854
+ echo "size of $remoteFileName is $file_size bytes";
3855
+ }
3856
+ else
3857
+ {
3858
+
3859
+ $file_size = 0;
3860
+ }
3861
+ if(!$file_size)
3862
+ $file_size = 0;
3863
+
3864
+ //read the parts local file , if it is a second call start reading the file from the left out part which is at the offset of the remote file's filesize.
3865
+ $fp = fopen($backup_file, 'r');
3866
+ fseek($fp,$file_size);
3867
+
3868
+ $ret = ftp_nb_fput($conn_id, $remoteFileName, $fp, FTP_BINARY, $file_size);
3869
+ if(!$ret || $ret == FTP_FAILED)
3870
+ {
3871
+ return array(
3872
+ 'error' => 'FTP upload Error. ftp_nb_fput(): Append/Restart not permitted.',
3873
+ 'partial' => 1, 'error_code' => 'ftp_nb_fput_not_permitted_error'
3874
+ );
3875
+ }
3876
+ $resArray = array (
3877
+ 'status' => 'partiallyCompleted',
3878
+ 'backupParentHID' => $historyID,
3879
+ );
3880
+ $result_arr = array();
3881
+ $result_arr['status'] = 'partiallyCompleted';
3882
+ $result_arr['nextFunc'] = 'ftp_backup';
3883
+ $result_arr['ftpArgs'] = $tempArgs;
3884
+ $result_arr['current_file_num'] = $current_file_num;
3885
+
3886
+ /*
3887
+ 1.run the while loop as long as FTP_MOREDATA is set
3888
+ 2.within the loop if time is greater than specified seconds break the loop and close ftp_con return as "partiallyCompleted" setting nextFunc as ftp_backup.
3889
+ 3.if ret == FTP_FINISHED , it means the ftpUpload is complete .. return as "completed".
3890
+ */
3891
+ while ($ret == FTP_MOREDATA) {
3892
+ // Do whatever you want
3893
+ $endTime = microtime(true);
3894
+ $timeTaken = $endTime - $this->iwpScriptStartTime;
3895
+ // Continue upload...
3896
+ if($timeTaken > $upload_loop_break_time)
3897
+ {
3898
+ echo "being stopped --- ".$file_size;
3899
+ $result_arr['timeTaken'] = $timeTaken;
3900
+ $result_arr['file_size_written'] = $file_size;
3901
+ fclose($fp);
3902
+ $this->statusLog($historyID, array('stage' => 'ftpMultiCall', 'status' => 'completed', 'statusMsg' => 'nextCall being stopped --- ','nextFunc' => 'ftp_backup','task_result' => $task_result, 'responseParams' => $result_arr));
3903
+ break;
3904
+ }
3905
+ else
3906
+ {
3907
+ $ret = ftp_nb_continue($conn_id);
3908
+ }
3909
+ iwp_mmb_auto_print("ftploop");
3910
+ }
3911
+ if ($ret != FTP_FINISHED) {
3912
+ fclose($fp);
3913
+ /* if($del_host_file)
3914
+ {
3915
+ @unlink($backup_file);
3916
+ } */
3917
+ return $resArray;
3918
+ }
3919
+ else
3920
+ {
3921
+ //this is where the backup call ends completing all the uploads
3922
+ $current_file_num += 1;
3923
+ $result_arr['timeTaken'] = $timeTaken;
3924
+ $result_arr['file_size_written'] = $file_size;
3925
+ $result_arr['current_file_num'] = $current_file_num;
3926
+
3927
+ if($current_file_num == $backup_files_count)
3928
+ {
3929
+ $result_arr['status'] = 'completed';
3930
+ $result_arr['nextFunc'] = 'ftp_backup_over';
3931
+ unset($task_result['task_results'][$historyID]['server']);
3932
+ $resArray['status'] = 'completed';
3933
+ }
3934
+ else
3935
+ {
3936
+ $result_arr['status'] = 'partiallyCompleted';
3937
+ $resArray['status'] = 'partiallyCompleted';
3938
+ }
3939
+
3940
+
3941
+ $this->statusLog($historyID, array('stage' => 'ftpMultiCall', 'status' => 'completed', 'statusMsg' => 'nextCall','nextFunc' => 'ftp_backup','task_result' => $task_result, 'responseParams' => $result_arr));
3942
+
3943
+
3944
+ fclose($fp);
3945
+ //checking file size and comparing
3946
+ $verificationResult = $this -> postUploadVerification($conn_id, $backup_file, $remoteFileName, $type = "ftp");
3947
+ if(!$verificationResult)
3948
+ {
3949
+ return $this->statusLog($historyID, array('stage' => 'uploadFTP', 'status' => 'error', 'statusMsg' => 'FTP verification failed: File may be corrupted.', 'statusCode' => 'ftp_verification_failed_file_maybe_corrupted'));
3950
+ }
3951
+
3952
+
3953
+ if($del_host_file)
3954
+ {
3955
+ @unlink($backup_file); // darkcode testing purpose
3956
+ }
3957
+ iwp_mmb_print_flush('FTP upload: End');
3958
+
3959
+ return $resArray;
3960
+ }
3961
+ }
3962
+
3963
+ function get_files_base_name($backup_file)
3964
+ {
3965
+ $backup_files_base_name = array();
3966
+ if(is_array($backup_file))
3967
+ {
3968
+ foreach($backup_file as $value)
3969
+ {
3970
+ $backup_files_base_name[] = basename($value);
3971
+ }
3972
+ }
3973
+ else
3974
+ {
3975
+ $backup_files_base_name = basename($backup_file);
3976
+ }
3977
+ return $backup_files_base_name;
3978
+ }
3979
+
3980
+ function postUploadVerification(&$obj, $backup_file, $destFile, $type = "", $as3_bucket = "")
3981
+ {
3982
+ $actual_file_size = iwp_mmb_get_file_size($backup_file);
3983
+ $size1 = $actual_file_size-((0.5) * $actual_file_size);
3984
+ $size2 = $actual_file_size+((0.5) * $actual_file_size);
3985
+ if($type == "dropbox")
3986
+ {
3987
+ $dBoxMetaData = $obj -> metadata($destFile);
3988
+ $dBoxFileSize = $dBoxMetaData['bytes'];
3989
+ if((($dBoxFileSize >= $size1 && $dBoxFileSize <= $actual_file_size) || ($dBoxFileSize <= $size2 && $dBoxFileSize >= $actual_file_size) || ($dBoxFileSize == $actual_file_size)) && ($dBoxFileSize != 0))
3990
+ {
3991
+ return true;
3992
+ }
3993
+ else
3994
+ {
3995
+ return false;
3996
+ }
3997
+ }
3998
+ else if($type == "amazons3")
3999
+ {
4000
+ $response = $obj -> if_object_exists($as3_bucket, $destFile);
4001
+ if($response == true)
4002
+ {
4003
+ $meta = $obj -> get_object_headers($as3_bucket, $destFile);
4004
+ $meta_response_array = CFUtilities::convert_response_to_array($meta);
4005
+ $s3_filesize = $meta_response_array['header']['content-length'];
4006
+ echo "S3 fileszie during verification - ".$s3_filesize;
4007
+ if((($s3_filesize >= $size1 && $s3_filesize <= $actual_file_size) || ($s3_filesize <= $size2 && $s3_filesize >= $actual_file_size) || ($s3_filesize == $actual_file_size)) && ($s3_filesize != 0))
4008
+ {
4009
+ return true;
4010
+ }
4011
+ else
4012
+ {
4013
+ return false;
4014
+ }
4015
+ }
4016
+ else
4017
+ {
4018
+ return false;
4019
+ }
4020
+ }
4021
+ else if($type == "ftp")
4022
+ {
4023
+ $ftp_file_size = ftp_size($obj, $destFile);
4024
+ if($ftp_file_size > 0)
4025
+ {
4026
+ if((($ftp_file_size >= $size1 && $ftp_file_size <= $actual_file_size) || ($ftp_file_size <= $size2 && $ftp_file_size >= $actual_file_size) || ($ftp_file_size == $actual_file_size)) && ($ftp_file_size != 0))
4027
+ {
4028
+ return true;
4029
+ }
4030
+ else
4031
+ {
4032
+ return false;
4033
+ }
4034
+ }
4035
+ else
4036
+ {
4037
+ return false;
4038
+ }
4039
+ }
4040
+ }
4041
+
4042
+
4043
+ function remove_ftp_backup($args)
4044
+ {
4045
+ extract($args);
4046
+ //Args: $ftp_username, $ftp_password, $ftp_hostname, $backup_file, $ftp_remote_folder
4047
+ //Args: $ftp_username, $ftp_password, $ftp_hostname, $backup_file, $ftp_remote_folder
4048
+ if(isset($use_sftp) && $use_sftp==1) {
4049
+ $port = $ftp_port ? $ftp_port : 22; //default port is 22
4050
+ /*
4051
+ * SFTP section start here phpseclib library is used for this functionality
4052
+ */
4053
+ $iwp_mmb_plugin_dir = WP_PLUGIN_DIR . '/' . basename(dirname(__FILE__));
4054
+ $path = $iwp_mmb_plugin_dir.'/lib/phpseclib';
4055
+ set_include_path(get_include_path() . PATH_SEPARATOR . $path);
4056
+ include_once('Net/SFTP.php');
4057
+
4058
+
4059
+ $sftp = new Net_SFTP($ftp_hostname,$port);
4060
+ if(!$sftp) {
4061
+ return array(
4062
+ 'error' => 'Failed to connect to ' . $ftp_hostname,
4063
+ 'partial' => 1
4064
+ );
4065
+ }
4066
+ if (!$sftp->login($ftp_username, $ftp_password)) {
4067
+ return array(
4068
+ 'error' => 'FTP login failed for ' . $ftp_username . ', ' . $ftp_password,
4069
+ 'partial' => 1
4070
+ );
4071
+ } else {
4072
+ if ($ftp_site_folder) {
4073
+ $ftp_remote_folder .= '/' . $this->site_name;
4074
+ }
4075
+ $remote_loation = basename($backup_file);
4076
+ $local_location = $backup_file;
4077
+
4078
+ $sftp->chdir($ftp_remote_folder);
4079
+ $sftp->delete(basename($backup_file));
4080
+
4081
+ }
4082
+ //SFTP library has automatic connection closed. So no need to call seperate connection close function
4083
+
4084
+ } else {
4085
+ $port = $ftp_port ? $ftp_port : 21; //default port is 21
4086
+ if ($ftp_ssl && function_exists('ftp_ssl_connect')) {
4087
+ $conn_id = ftp_ssl_connect($ftp_hostname,$port);
4088
+ } else if (function_exists('ftp_connect')) {
4089
+ $conn_id = ftp_connect($ftp_hostname,$port);
4090
+ }
4091
+
4092
+ if ($conn_id) {
4093
+ $login = @ftp_login($conn_id, $ftp_username, $ftp_password);
4094
+ if ($ftp_site_folder)
4095
+ $ftp_remote_folder .= '/' . $this->site_name;
4096
+
4097
+ if($ftp_passive){
4098
+ @ftp_pasv($conn_id,true);
4099
+ }
4100
+
4101
+ if(!is_array($backup_file))
4102
+ {
4103
+ $temp_backup_file = $backup_file;
4104
+ $backup_file = array();
4105
+ $backup_file[] = $temp_backup_file;
4106
+ }
4107
+
4108
+ foreach($backup_file as $key => $value)
4109
+ {
4110
+ $delete = ftp_delete($conn_id, $ftp_remote_folder . '/' . $value);
4111
+ }
4112
+ ftp_close($conn_id);
4113
+ }
4114
+ }
4115
+
4116
+ }
4117
+
4118
+ function get_ftp_backup($args, $current_file_num = 0)
4119
+ {
4120
+ extract($args);
4121
+ if(isset($use_sftp) && $use_sftp==1) {
4122
+ $port = $ftp_port ? $ftp_port : 22; //default port is 22
4123
+ /*
4124
+ * SFTP section start here phpseclib library is used for this functionality
4125
+ */
4126
+ $iwp_mmb_plugin_dir = WP_PLUGIN_DIR . '/' . basename(dirname(__FILE__));
4127
+ $path = $iwp_mmb_plugin_dir.'/lib/phpseclib';
4128
+ set_include_path(get_include_path() . PATH_SEPARATOR . $path);
4129
+ include_once('Net/SFTP.php');
4130
+
4131
+
4132
+ $sftp = new Net_SFTP($ftp_hostname,$port);
4133
+ if(!$sftp) {
4134
+ return array(
4135
+ 'error' => 'Failed to connect to ' . $ftp_hostname,
4136
+ 'partial' => 1
4137
+ );
4138
+ }
4139
+ if (!$sftp->login($ftp_username, $ftp_password)) {
4140
+ return array(
4141
+ 'error' => 'FTP login failed for ' . $ftp_username . ', ' . $ftp_password,
4142
+ 'partial' => 1
4143
+ );
4144
+ } else {
4145
+ if ($ftp_site_folder) {
4146
+ $ftp_remote_folder .= '/' . $this->site_name;
4147
+ }
4148
+ $remote_loation = basename($backup_file);
4149
+ $local_location = $backup_file;
4150
+
4151
+ $sftp->chdir($ftp_remote_folder);
4152
+ //$sftp->delete(basename($backup_file));
4153
+ $temp = wp_tempnam('iwp_temp_backup.zip');
4154
+
4155
+ $get = $sftp->get(basename($backup_file), $temp);
4156
+ if ($get === false) {
4157
+ return false;
4158
+ } else {
4159
+ return $temp;
4160
+ }
4161
+ //SFTP library has automatic connection closed. So no need to call seperate connection close function
4162
+
4163
+ }
4164
+
4165
+ } else {
4166
+ //Args: $ftp_username, $ftp_password, $ftp_hostname, $backup_file, $ftp_remote_folder
4167
+ $port = $ftp_port ? $ftp_port : 21; //default port is 21
4168
+ if ($ftp_ssl && function_exists('ftp_ssl_connect')) {
4169
+ $conn_id = ftp_ssl_connect($ftp_hostname,$port);
4170
+
4171
+ } else if (function_exists('ftp_connect')) {
4172
+ $conn_id = ftp_connect($ftp_hostname,$port);
4173
+ if ($conn_id === false) {
4174
+ return false;
4175
+ }
4176
+ }
4177
+ $login = @ftp_login($conn_id, $ftp_username, $ftp_password);
4178
+ if ($login === false) {
4179
+ return false;
4180
+ }
4181
+
4182
+ if ($ftp_site_folder)
4183
+ $ftp_remote_folder .= '/' . $this->site_name;
4184
+
4185
+ if($ftp_passive){
4186
+ @ftp_pasv($conn_id,true);
4187
+ }
4188
+
4189
+ //$temp = ABSPATH . 'iwp_temp_backup.zip';
4190
+ $temp = wp_tempnam('iwp_temp_backup.zip');
4191
+
4192
+ $get = ftp_get($conn_id, $temp, $ftp_remote_folder . '/' . $backup_file, FTP_BINARY);
4193
+ if ($get === false) {
4194
+ return false;
4195
+ } else {
4196
+ }
4197
+ ftp_close($conn_id);
4198
+
4199
+ return $temp;
4200
+ }
4201
+ }
4202
+
4203
+
4204
+ /*
4205
+ --The new Dropbox function which supports multiple calls--
4206
+
4207
+ 1.first call the chunked_upload function with no upload_id and get a response array of upload_id and offset .
4208
+ 2.pass the upload_id and offset in the multiple calls until the file is completely uploaded .
4209
+
4210
+ --note--
4211
+ 1.the args should have the backup_file_size in bytes.
4212
+ 2.on final call the chunked upload will be commited.
4213
+ 3.there are some changes in the dropbox.php lib file .
4214
+
4215
+ */
4216
+
4217
+ function dropbox_backup($historyID = 0, $args = '', $uploadid = null, $offset = 0)
4218
+ {
4219
+ //included two arguments $uploadid and $offset
4220
+ $dBoxStartTime = $this->iwpScriptStartTime;
4221
+
4222
+ //get the settings
4223
+ //$this -> backup_settings_vals = get_option('iwp_client_multi_backup_temp_values', $backup_settings_values);
4224
+ //$backup_settings_values = $this -> backup_settings_vals;
4225
+ //$upload_file_block_size = $backup_settings_values['upload_file_block_size'];
4226
+ //$actual_file_size = $backup_settings_values['actual_file_size'];
4227
+ //$del_host_file = $backup_settings_values['del_host_file'];
4228
+
4229
+ //get the settings other method
4230
+ $requestParams = $this->getRequiredData($historyID, "requestParams");
4231
+ $upload_loop_break_time = $requestParams['account_info']['upload_loop_break_time']; //darkcode changed
4232
+ $upload_file_block_size = $requestParams['account_info']['upload_file_block_size'];
4233
+ $del_host_file = $requestParams['args']['del_host_file'];
4234
+ $current_file_num = 0;
4235
+
4236
+ if($args == '')
4237
+ {
4238
+ //on the next call $args would be ''
4239
+ //set $args, $uploadid, $offset from the DB
4240
+ $responseParams = $this -> getRequiredData($historyID,"responseParams");
4241
+
4242
+ if(!$responseParams)
4243
+ $this->statusLog($historyID, array('stage' => 'backupFiles', 'status' => 'error', 'statusMsg' => 'errorGettingDBValues', 'statusCode' => 'error_getting_db_values'));
4244
+
4245
+ $args = $responseParams['dropboxArgs'];
4246
+ $prevChunkResults = $responseParams['response_data'];
4247
+ $uploadid = $prevChunkResults['upload_id'];
4248
+ $offset = $prevChunkResults['offset'];
4249
+ $current_file_num = $responseParams['current_file_num'];
4250
+ }
4251
+
4252
+ $tempArgs = $args;
4253
+ extract($args);
4254
+
4255
+ $task_result = $this->getRequiredData($historyID, "taskResults");
4256
+ $task_result['task_results'][$historyID]['dropbox'] = $this->get_files_base_name($backup_file);
4257
+ $task_result['dropbox'] = $this->get_files_base_name($backup_file);
4258
+
4259
+ if(!is_array($backup_file))
4260
+ {
4261
+ $temp_backup_file = $backup_file;
4262
+ $backup_file = array();
4263
+ $backup_file[] = $temp_backup_file;
4264
+ }
4265
+
4266
+ if(is_array($backup_file))
4267
+ {
4268
+ $backup_files_count = count($backup_file);
4269
+ $backup_file = $backup_file[$current_file_num];
4270
+ }
4271
+ $actual_file_size = iwp_mmb_get_file_size($backup_file);
4272
+ $backup_file_size = $actual_file_size;
4273
+ //$backup_file_size = 10394909; //darkCode testing purpose
4274
+
4275
+
4276
+ if(isset($consumer_secret) && !empty($consumer_secret)){
4277
+
4278
+ require_once $GLOBALS['iwp_mmb_plugin_dir'] . '/lib/dropbox.php';
4279
+
4280
+ $dropbox = new IWP_Dropbox($consumer_key, $consumer_secret);
4281
+ $dropbox->setOAuthTokens($oauth_token, $oauth_token_secret);
4282
+
4283
+ if ($dropbox_site_folder == true)
4284
+ $dropbox_destination .= '/' . $this->site_name . '/' . basename($backup_file);
4285
+ else
4286
+ $dropbox_destination .= '/' . basename($backup_file);
4287
+
4288
+ try {
4289
+ //$dropbox->upload($backup_file, $dropbox_destination, true); //we are using new multiCAll function
4290
+
4291
+ // this is the dropbox loop ..
4292
+ $reloop = false;
4293
+ $chunkCount = 0;
4294
+ $chunkTimeTaken = 0;
4295
+ do
4296
+ {
4297
+ if($chunkCount == 0)
4298
+ {
4299
+ $chunkStartTime = $dBoxStartTime;
4300
+ }
4301
+ else
4302
+ {
4303
+ $chunkStartTime = microtime(true);
4304
+ }
4305
+ if(($backup_file_size - $offset) >= $upload_file_block_size) //the chunk size is set here
4306
+ {
4307
+ $readsize = $upload_file_block_size;
4308
+ $isCommit = false;
4309
+ $status = 'partiallyCompleted';
4310
+ }
4311
+ else
4312
+ {
4313
+ $readsize = ($backup_file_size - $offset);
4314
+
4315
+ $isCommit = true;
4316
+ $status = 'completed';
4317
+ }
4318
+ $chunkResult = $dropbox->chunked_upload($backup_file, $dropbox_destination, true, $uploadid, $offset, $readsize, $isCommit);
4319
+
4320
+ $result_arr = array();
4321
+ $result_arr['response_data'] = $chunkResult;
4322
+ $result_arr['status'] = $status;
4323
+ $result_arr['nextFunc'] = 'dropbox_backup';
4324
+ $result_arr['dropboxArgs'] = $tempArgs;
4325
+ $result_arr['current_file_num'] = $current_file_num;
4326
+
4327
+ //updating offset and uploadid values for relooping.
4328
+ $offset = $chunkResult['offset'];
4329
+ $uploadid = $chunkResult['upload_id'];
4330
+ echo 'completed-size'.($offset/1024/1024);
4331
+ //check time
4332
+ $chunkCompleteTime = microtime(true);
4333
+ $dBoxCompleteTime = microtime(true);
4334
+ $chunkTimeTaken = (($chunkTimeTaken + ($chunkCompleteTime - $chunkStartTime))/($chunkCount + 1)); // this is the average chunk time
4335
+ echo " thisChunkTimeTaken".$chunkTimeTaken;
4336
+ $dBoxTimeTaken = $dBoxCompleteTime - $dBoxStartTime;
4337
+ $dBoxTimeLeft = $upload_loop_break_time - $dBoxTimeTaken; //calculating time left for the dBOX upload ..
4338
+ $dBoxTimeLeft = $dBoxTimeLeft - 5; //for safe time limit
4339
+ echo " dBoxTimeLeft".$dBoxTimeLeft;
4340
+ //$halfOfLoopTime = (($upload_loop_break_time / 2) - 1);
4341
+ if(($dBoxTimeLeft <= $chunkTimeTaken)||($status == 'completed')) //if the time Left for the dropbox upload is less than the time to upload a single chunk break the loop
4342
+ {
4343
+ $reloop = false;
4344
+ }
4345
+ else
4346
+ {
4347
+ $reloop = true;
4348
+ $chunkCount++;
4349
+ }
4350
+ }while($reloop);
4351
+
4352
+ $resArray = array (
4353
+ 'status' => $status,
4354
+ 'backupParentHID' => $historyID,
4355
+ );
4356
+
4357
+ if($status == 'completed')
4358
+ {
4359
+ $current_file_num += 1;
4360
+ if($current_file_num == $backup_files_count)
4361
+ {
4362
+ $result_arr['nextFunc'] = 'dropbox_backup_over';
4363
+ iwp_mmb_print_flush('Dropbox upload: End');
4364
+ unset($task_result['task_results'][$historyID]['server']);
4365
+ }
4366
+ else
4367
+ {
4368
+ $result_arr['nextFunc'] = 'dropbox_backup';
4369
+ $result_arr['current_file_num'] = $current_file_num;
4370
+ $result_arr['status'] = 'partiallyCompleted';
4371
+ $resArray['status'] = 'partiallyCompleted';
4372
+ }
4373
+ }
4374
+ $this->statusLog($historyID, array('stage' => 'dropboxMultiCall', 'status' => 'completed', 'statusMsg' => 'nextCall','nextFunc' => 'dropbox_backup', 'task_result' => $task_result, 'responseParams' => $result_arr));
4375
+
4376
+
4377
+ if($status == 'completed')
4378
+ {
4379
+ //checking file size and comparing
4380
+ $verificationResult = $this -> postUploadVerification($dropbox, $backup_file, $dropbox_destination, $type = "dropbox");
4381
+ if(!$verificationResult)
4382
+ {
4383
+ return $this->statusLog($historyID, array('stage' => 'uploadDropBox', 'status' => 'error', 'statusMsg' => 'Dropbox verification failed: File may be corrupted.', 'statusCode' => 'dropbox_verification_failed_file_may_be_corrupted'));
4384
+ }
4385
+ if($del_host_file)
4386
+ {
4387
+ @unlink($backup_file);
4388
+ }
4389
+ }
4390
+
4391
+ return $resArray;
4392
+
4393
+ }
4394
+ catch (Exception $e) {
4395
+ $this->_log($e->getMessage());
4396
+ return array(
4397
+ 'error' => $e->getMessage(),
4398
+ 'partial' => 1
4399
+ );
4400
+ }
4401
+
4402
+ //return true;
4403
+
4404
+ }
4405
+ else {
4406
+ return array(
4407
+ 'error' => 'Please connect your InfiniteWP panel with your Dropbox account.', 'error_code' => 'please_connect_your_iwp_panel_with_your_dropbox_account'
4408
+ );
4409
+ }
4410
+
4411
+ }
4412
+
4413
+
4414
+
4415
+ function remove_dropbox_backup($args) {
4416
+ extract($args);
4417
+
4418
+ require_once $GLOBALS['iwp_mmb_plugin_dir'] . '/lib/dropbox.php';
4419
+
4420
+ $dropbox = new IWP_Dropbox($consumer_key, $consumer_secret);
4421
+ $dropbox->setOAuthTokens($oauth_token, $oauth_token_secret);
4422
+
4423
+ if ($dropbox_site_folder == true)
4424
+ $dropbox_destination .= '/' . $this->site_name;
4425
+
4426
+ $temp_backup_file = $backup_file;
4427
+ if(!is_array($backup_file))
4428
+ {
4429
+ $backup_file = array();
4430
+ $backup_file[] = $temp_backup_file;
4431
+ }
4432
+ foreach($backup_file as $key => $value)
4433
+ {
4434
+ try {
4435
+ $dropbox->fileopsDelete($dropbox_destination . '/' . $value);
4436
+ } catch (Exception $e) {
4437
+ $this->_log($e->getMessage());
4438
+ /*return array(
4439
+ 'error' => $e->getMessage(),
4440
+ 'partial' => 1
4441
+ );*/
4442
+ }
4443
+ }
4444
+ //return true;
4445
+ }
4446
+
4447
+
4448
+ function get_dropbox_backup($args) {
4449
+ extract($args);
4450
+
4451
+ require_once $GLOBALS['iwp_mmb_plugin_dir'] . '/lib/dropbox.php';
4452
+
4453
+ $dropbox = new IWP_Dropbox($consumer_key, $consumer_secret);
4454
+ $dropbox->setOAuthTokens($oauth_token, $oauth_token_secret);
4455
+
4456
+ if ($dropbox_site_folder == true)
4457
+ $dropbox_destination .= '/' . $this->site_name;
4458
+
4459
+ //$temp = ABSPATH . 'iwp_temp_backup.zip';
4460
+ $temp = wp_tempnam('iwp_temp_backup.zip');
4461
+
4462
+ try {
4463
+
4464
+ $file = $dropbox->download($dropbox_destination.'/'.$backup_file);
4465
+ $handle = @fopen($temp, 'w');
4466
+ $result = fwrite($handle, $file);
4467
+ fclose($handle);
4468
+
4469
+ if($result)
4470
+ return $temp;
4471
+ else
4472
+ return false;
4473
+ } catch (Exception $e) {
4474
+ $this->_log($e->getMessage());
4475
+ return array(
4476
+ 'error' => $e->getMessage(),
4477
+ 'partial' => 1
4478
+ );
4479
+ }
4480
+ }
4481
+
4482
+ /*
4483
+ This is the new amazon s3 function with multiCall support
4484
+
4485
+ 1.initiate the multipart process and get an upload_id in return [using the function initiate_multipart_upload() ].
4486
+ 2.divide the backup file into many parts [ using the function get_multipart_counts() ]
4487
+ 3.call the function upload_part() and upload the parts one by one by getting an partsArray of PartNumber and Etag as response.
4488
+ 4.On the finalCall complete the multipart upload by calling the function complete_multipart_upload() - by providing the $uploadID as well as partsArray .
4489
+
4490
+ ---notes---
4491
+ 1.complete the multiPart only on the final call
4492
+ 2.the mulitpart upload process should have to be completed or aborted because amazon will charge for the data used
4493
+
4494
+ */
4495
+
4496
+
4497
+ function amazons3_backup($historyID , $args='' )
4498
+ {
4499
+ $s3StartTime = $this->iwpScriptStartTime;
4500
+ $this -> backup_settings_vals = get_option('iwp_client_multi_backup_temp_values', $backup_settings_values);
4501
+ $backup_settings_values = $this -> backup_settings_vals;
4502
+ if($backup_settings_values['s3_retrace_count'])
4503
+ {
4504
+ $s3_retrace_count = $backup_settings_values['s3_retrace_count'][$historyID];
4505
+ }
4506
+ else
4507
+ {
4508
+ $s3_retrace_count = 0;
4509
+ }
4510
+ //$upload_file_block_size = $backup_settings_values['upload_file_block_size'];
4511
+ //$del_host_file = $backup_settings_values['del_host_file'];
4512
+
4513
+ //get the settings by other method
4514
+ $requestParams = $this -> getRequiredData($historyID,"requestParams");
4515
+ $upload_loop_break_time = $requestParams['account_info']['upload_loop_break_time']; //darkcode changed
4516
+ $upload_file_block_size = $requestParams['account_info']['upload_file_block_size'];
4517
+ if($upload_file_block_size < (5*1024*1024))
4518
+ {
4519
+ $upload_file_block_size = (5*1024*1024)+1;
4520
+ }
4521
+ $del_host_file = $requestParams['args']['del_host_file'];
4522
+
4523
+ $task_result = $this -> getRequiredData($historyID,"taskResults");
4524
+
4525
+ @set_time_limit(0);
4526
+ $this -> hisID = $historyID;
4527
+
4528
+
4529
+ //the multiCall arguments
4530
+ /* $uploadLoopCount = 0;
4531
+ $upload_id = false;
4532
+ $partsArray = array(); */
4533
+
4534
+ $uploadLoopCount = 0;
4535
+ $upload_id = 'start';
4536
+ $partsArray = array();
4537
+ $nextPart = 1;
4538
+ $retrace = 'notSet';
4539
+ $doComplete = false;
4540
+
4541
+
4542
+ if($args == '')
4543
+ {
4544
+ //on the next call $args would be ''
4545
+ //set $args, $uploadid, $offset from the DB
4546
+ $responseParams = $this -> getRequiredData($historyID,"responseParams");
4547
+
4548
+ if(!$responseParams)
4549
+ return $this->statusLog($this -> hisID, array('stage' => 's3Upload', 'status' => 'error', 'statusMsg' => 'S3 Upload failed: Error while fetching table data.', 'statusCode' => 's3_upload_failed_error_while_fetching_table_data'));
4550
+
4551
+ $args = $responseParams['s3Args'];
4552
+ $prevChunkResults = $responseParams['response_data'];
4553
+ $upload_id = $prevChunkResults['upload_id'];
4554
+ $nextPart = $prevChunkResults['nextPart'];
4555
+ $partsArray = $prevChunkResults['partsArray'];
4556
+ $current_file_num = $responseParams['current_file_num'];
4557
+ $dont_retrace = $responseParams['dont_retrace'];
4558
+ $start_new_backup = $responseParams['start_new_backup'];
4559
+
4560
+ }
4561
+ if(empty($current_file_num))
4562
+ {
4563
+ $current_file_num = 0;
4564
+ }
4565
+
4566
+ //traceback options and setting values
4567
+
4568
+ if((!$upload_id)&&(empty($dont_retrace)))
4569
+ {
4570
+ if($s3_retrace_count <= 3)
4571
+ {
4572
+ $args = $requestParams['secure']['account_info']['iwp_amazon_s3'];
4573
+ if($backup_settings_values['s3_upload_id'])
4574
+ {
4575
+ $upload_id = $backup_settings_values['s3_upload_id'][$historyID];
4576
+ }
4577
+ else
4578
+ {
4579
+ return $this->statusLog($this -> hisID, array('stage' => 's3Upload Retrace', 'status' => 'error', 'statusMsg' => 'S3 Upload failed: Error while fetching table data during retrace', 'statusCode' => 's3_upload_failed_error_while_fetching_table_data_during_retrace'));
4580
+ }
4581
+ $backup_file = $backup_settings_values['backup_file'];
4582
+ $retrace = 'set';
4583
+ $s3_retrace_count++;
4584
+ $backup_settings_values['s3_retrace_count'][$historyID] = $s3_retrace_count;
4585
+ update_option('iwp_client_multi_backup_temp_values', $backup_settings_values);
4586
+
4587
+ $partsArray = $s3->list_parts($as3_bucket, $as3_file, $upload_id);
4588
+ $nextPart = (count($partsArray) + 1);
4589
+ }
4590
+ else
4591
+ {
4592
+ return $this->statusLog($this -> hisID, array('stage' => 's3Upload', 'status' => 'error', 'statusMsg' => 'S3 upload failed: Retrace limit reached.', 'statusCode' => 's3_upload_failed_retrace_limit_reached'));
4593
+ }
4594
+ }
4595
+
4596
+ //tracback ends
4597
+
4598
+ /* $upload_id = 'myAQl0R72GE2s6qqlCWnQrIl9NQcPS8rm_GSICHAuon58n9z9M9qjpkUOFiT1G9tj966VLb6WqsxRI7rB9CCPg--';
4599
+ $partsArray = array (
4600
+ 1 =>
4601
+ array (
4602
+ 'PartNumber' => 1,
4603
+ 'ETag' => '"84658f71569196e8a3e249c48186e166"',
4604
+ ),
4605
+ ); */
4606
+
4607
+ //$this->statusLog($this -> hisID, array('stage' => 'uploadingFilesAmazon', 'status' => 'partiallyCompleted', 'statusMsg' => 's3SingleCall'));
4608
+
4609
+ if ($this->iwp_mmb_function_exists('curl_init')) {
4610
+ require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/amazon_s3/sdk.class.php');
4611
+
4612
+ $tempArgs = $args;
4613
+ extract($args);
4614
+
4615
+ if(!is_array($backup_file))
4616
+ {
4617
+ $temp_backup_file = $backup_file;
4618
+ $backup_file = array();
4619
+ $backup_file[] = $temp_backup_file;
4620
+ }
4621
+
4622
+ if(is_array($backup_file))
4623
+ {
4624
+ $backup_files_count = count($backup_file);
4625
+ $temp_single_file = $backup_file[$current_file_num];
4626
+ unset($backup_file);
4627
+ $backup_file = $temp_single_file;
4628
+ }
4629
+
4630
+ if ($as3_site_folder == true)
4631
+ {
4632
+ if(!empty($as3_directory))
4633
+ {
4634
+ $as3_directory .= '/' . $this->site_name;
4635
+ }
4636
+ else
4637
+ {
4638
+ $as3_directory = $this->site_name;
4639
+ }
4640
+ }
4641
+
4642
+ try{
4643
+
4644
+ CFCredentials::set(array('development' => array('key' => trim($as3_access_key), 'secret' => trim(str_replace(' ', '+', $as3_secure_key)), 'default_cache_config' => '', 'certificate_authority' => true, 'use_ssl'=>false, 'ssl_verification'=>false), '@default' => 'development'));
4645
+ $s3 = new AmazonS3();
4646
+
4647
+ //the mulitCall upload starts darkCode starts
4648
+
4649
+
4650
+ //$this->statusLog($this -> hisID, array('stage' => 'uploadingFiles', 'status' => 'partiallyCompleted', 'statusMsg' => 's3MultiCallStartsHere'));
4651
+ if(!empty($as3_directory)){
4652
+ $as3_file = $as3_directory . '/' . basename($backup_file);
4653
+ }
4654
+ else{
4655
+ $as3_file = basename($backup_file);
4656
+ }
4657
+
4658
+ if((iwp_mmb_get_file_size($backup_file) <= 5*1024*1024))
4659
+ {
4660
+ echo "<br>small backup so single upload<br>";
4661
+ $response = $s3->create_object($as3_bucket, $as3_file, array('fileUpload' => $backup_file));
4662
+ if($response->isOK())
4663
+ {
4664
+ $current_file_num += 1;
4665
+
4666
+ $resArray = array (
4667
+ 'status' => "completed",
4668
+ 'backupParentHID' => $historyID,
4669
+ );
4670
+
4671
+ $result_arr = array();
4672
+ $result_arr['status'] = 'completed';
4673
+ $result_arr['nextFunc'] = 'amazons3_backup_over';
4674
+ $result_arr['s3Args'] = $tempArgs;
4675
+ $result_arr['current_file_num'] = $current_file_num;
4676
+ $result_arr['dont_retrace'] = true;
4677
+
4678
+ $task_result['task_results'][$historyID]['amazons3'][$current_file_num-1] = basename($backup_file);
4679
+ $task_result['amazons3'][$current_file_num-1] = basename($backup_file);
4680
+
4681
+ if($current_file_num >= $backup_files_count)
4682
+ {
4683
+ unset($task_result['task_results'][$historyID]['server']);
4684
+ @unlink($backup_file);
4685
+ }
4686
+ else
4687
+ {
4688
+ //to continue zip split parts
4689
+
4690
+ $resArray['status'] = 'partiallyCompleted';
4691
+
4692
+ $chunkResult = array();
4693
+ $chunkResult['partsArray'] = array();
4694
+ $chunkResult['nextPart'] = 1;
4695
+ $chunkResult['upload_id'] = 'start';
4696
+
4697
+ $result_arr['response_data'] = $chunkResult;
4698
+ $result_arr['nextFunc'] = 'amazons3_backup';
4699
+ $result_arr['status'] = 'partiallyCompleted';
4700
+ $result_arr['start_new_backup'] = true;
4701
+
4702
+ @unlink($backup_file);
4703
+ }
4704
+ $this->statusLog($this -> hisID, array('stage' => 's3MultiCall', 'status' => 'completed', 'statusMsg' => 'nextCall','nextFunc' => 'amazons3_backup', 'task_result' => $task_result, 'responseParams' => $result_arr));
4705
+
4706
+ return $resArray;
4707
+ }
4708
+ else
4709
+ {
4710
+ return array(
4711
+ 'error' => 'Failed to upload to Amazon S3.'
4712
+ );
4713
+ }
4714
+ }
4715
+
4716
+ if($upload_id == 'start')
4717
+ {
4718
+ echo "initiating multiCall upload";
4719
+
4720
+ //initiate the multiPartUpload to get the uploadID from its response
4721
+ $response = $s3->initiate_multipart_upload($as3_bucket, $as3_file); //createMultipartUpload
4722
+
4723
+
4724
+
4725
+ //convert the response into an array
4726
+ $response_array = CFUtilities::convert_response_to_array($response);
4727
+
4728
+
4729
+
4730
+ //get the uploadID
4731
+ $upload_id = $response_array['body']['UploadId'];
4732
+
4733
+
4734
+ //storing the uploadID in DB
4735
+ $backup_settings_values['s3_upload_id'][$historyID] = $upload_id;
4736
+ $backup_settings_values['backup_file'] = $backup_file;
4737
+ update_option('iwp_client_multi_backup_temp_values', $backup_settings_values);
4738
+ }
4739
+
4740
+ //get the parts of the big file
4741
+ $parts = $s3->get_multipart_counts(iwp_mmb_get_file_size($backup_file), $upload_file_block_size); //1 MB chunks
4742
+
4743
+ if($retrace == 'set')
4744
+ {
4745
+ $list_parts_response = $s3->list_parts($as3_bucket, $as3_file, $upload_id);
4746
+ $partsArray = CFUtilities::convert_response_to_array($list_parts_response);
4747
+ $nextPart = (count($partsArray) + 1);
4748
+ $this->statusLog($this -> hisID, array('stage' => 's3MultiCall', 'status' => 'partiallyCompleted', 'statusMsg' => 'retracingValues','nextFunc' => 'amazons3_backup', 'task_result' => $task_result, 'responseParams' => $result_arr));
4749
+ $retrace = 'unset';
4750
+ }
4751
+
4752
+
4753
+ //this is the main upload loop break it on when the timeLimit is reached
4754
+ //chunk upload loop
4755
+ $partsArraySize = count($parts);
4756
+ $s3ChunkTimeTaken = 0;
4757
+ $s3ChunkCount = 0;
4758
+ $reloop = false;
4759
+ $reloopCount = 0;
4760
+ do
4761
+ {
4762
+ $uploadLoopCount = 0;
4763
+ if($reloopCount == 0)
4764
+ {
4765
+ $s3ChunkStartTime = $s3StartTime;
4766
+ }
4767
+ else
4768
+ {
4769
+ $s3ChunkStartTime = microtime(true);
4770
+ }
4771
+
4772
+ foreach ($parts as $i => $part)
4773
+ {
4774
+ $uploadLoopCount += 1;
4775
+ if($uploadLoopCount == $nextPart)
4776
+ {
4777
+ $singleUploadResponse = $s3->/* batch()-> */upload_part($as3_bucket, $as3_file, $upload_id, array(
4778
+ //'expect' => '100-continue',
4779
+ 'fileUpload' => $backup_file,
4780
+ 'partNumber' => ($i + 1),
4781
+ 'seekTo' => /* (integer) */$part['seekTo'],
4782
+ 'length' => /* (integer) */$part['length'],
4783
+ ));
4784
+
4785
+ $singleUploadResult = $singleUploadResponse->isOk();
4786
+
4787
+ echo "singleUploadResult - ".$singleUploadResult;
4788
+
4789
+ $singleUploadResponseArray = CFUtilities::convert_response_to_array($singleUploadResponse);
4790
+ /* $response = $s3->complete_multipart_upload($bucket, $filename, $upload_id, array(
4791
+ array('PartNumber' => 1, 'ETag' => '"25e317773f308e446cc84c503a6d1f85"'),
4792
+ array('PartNumber' => 2, 'ETag' => '"a6d1f85f58498973f308e446cc84c503"'),
4793
+ array('PartNumber' => 3, 'ETag' => '"bed3c0a4a1407f584989b4009e9ce33f"'),
4794
+ )); */
4795
+
4796
+ $nextPart = $uploadLoopCount;
4797
+ $partsArray[$i + 1]['PartNumber'] = $i + 1;
4798
+ $partsArray[$i + 1]['ETag'] = $singleUploadResponseArray['header']['etag'];
4799
+
4800
+
4801
+ $chunkResult = array();
4802
+ $chunkResult['partsArray'] = $partsArray;
4803
+ $chunkResult['nextPart'] = $nextPart+1;
4804
+ $chunkResult['upload_id'] = $upload_id;
4805
+ $nextPart = $nextPart + 1;
4806
+
4807
+ $backup_settings_values['s3_retrace_count'][$historyID] = 0;
4808
+ update_option('iwp_client_multi_backup_temp_values', $backup_settings_values);
4809
+
4810
+ $status = 'partiallyCompleted';
4811
+ if(($nextPart) == ($partsArraySize + 1))
4812
+ {
4813
+ $doComplete = true;
4814
+ $status = 'completed';
4815
+ }
4816
+
4817
+ $result_arr = array();
4818
+ $result_arr['response_data'] = $chunkResult;
4819
+ $result_arr['status'] = $status;
4820
+ $result_arr['nextFunc'] = 'amazons3_backup';
4821
+ $result_arr['s3Args'] = $tempArgs;
4822
+ $result_arr['current_file_num'] = $current_file_num;
4823
+
4824
+ $task_result['task_results'][$historyID]['amazons3'][$current_file_num] = basename($backup_file);
4825
+ $task_result['amazons3'][$current_file_num] = basename($backup_file);
4826
+
4827
+ $this->statusLog($this -> hisID, array('stage' => 's3MultiCall', 'status' => 'completed', 'statusMsg' => 'nextCall','nextFunc' => 'amazons3_backup', 'task_result' => $task_result, 'responseParams' => $result_arr));
4828
+
4829
+ $resArray = array (
4830
+ 'status' => $status,
4831
+ 'backupParentHID' => $historyID,
4832
+ );
4833
+
4834
+ /* $resArray = array (
4835
+ 'status' => 'completed',
4836
+ 'backupParentHID' => $historyID,
4837
+ ); */
4838
+ break;
4839
+ //return $resArray;
4840
+ //exit;
4841
+ }
4842
+ else
4843
+ {
4844
+ if($nextPart == ($partsArraySize+1))
4845
+ {
4846
+ $doComplete = true;
4847
+ break;
4848
+ }
4849
+ }
4850
+ }
4851
+
4852
+ if($doComplete)
4853
+ {
4854
+ // complete the multipart upload
4855
+ $response = $s3->complete_multipart_upload($as3_bucket, $as3_file, $upload_id, $partsArray);
4856
+
4857
+ if($response->isOK() != true)
4858
+ {
4859
+
4860
+ $response = $s3->abort_multipart_upload($as3_bucket, $as3_file, $upload_id );
4861
+ }
4862
+ $response_array = CFUtilities::convert_response_to_array($response);
4863
+
4864
+ $current_file_num += 1;
4865
+
4866
+ $result_arr = array();
4867
+ $result_arr['response_data'] = $chunkResult;
4868
+ $result_arr['status'] = 'completed';
4869
+ $result_arr['nextFunc'] = 'amazons3_backup_over';
4870
+ $result_arr['s3Args'] = $tempArgs;
4871
+ $result_arr['dont_retrace'] = true;
4872
+ $result_arr['current_file_num'] = $current_file_num;
4873
+
4874
+ $resArray = array (
4875
+ 'status' => 'completed',
4876
+ 'backupParentHID' => $historyID,
4877
+ );
4878
+
4879
+
4880
+
4881
+ if($current_file_num >= $backup_files_count)
4882
+ {
4883
+ $task_result['task_results'][$historyID]['amazons3'][$current_file_num-1] = basename($backup_file);
4884
+ $task_result['amazons3'][$current_file_num-1] = basename($backup_file);
4885
+ unset($task_result['task_results'][$historyID]['server']);
4886
+ }
4887
+ else
4888
+ {
4889
+ //to continue zip split parts
4890
+
4891
+ $chunkResult = array();
4892
+ $chunkResult['partsArray'] = array();
4893
+ $chunkResult['nextPart'] = 1;
4894
+ $chunkResult['upload_id'] = 'start';
4895
+
4896
+ $result_arr['response_data'] = $chunkResult;
4897
+ $result_arr['status'] = 'partiallyCompleted';
4898
+ $result_arr['nextFunc'] = 'amazons3_backup';
4899
+ $result_arr['start_new_backup'] = true;
4900
+
4901
+ $resArray['status'] = 'partiallyCompleted';
4902
+ }
4903
+ $this->statusLog($this -> hisID, array('stage' => 's3MultiCall', 'status' => 'completed', 'statusMsg' => 'finalCall','nextFunc' => 'amazons3_backup', 'task_result' => $task_result, 'responseParams' => $result_arr));
4904
+
4905
+ $upload = $response->isOk();
4906
+ }
4907
+
4908
+
4909
+
4910
+ //check time
4911
+ $s3ChunkEndTime = microtime(true);
4912
+ $s3ChunkTimeTaken = (($s3ChunkEndTime - $s3ChunkStartTime) + ($s3ChunkTimeTaken) / ($reloopCount + 1));
4913
+ $s3EndTime = microtime(true);
4914
+ $s3TimeTaken = $s3EndTime - $s3StartTime;
4915
+ $s3TimeLeft = $upload_loop_break_time - $s3TimeTaken;
4916
+ $s3TimeLeft = $s3TimeLeft - 5; //for safe timeLimit
4917
+
4918
+ if(!empty($chunkResult['nextPart']))
4919
+ {
4920
+ echo 'parts'.$chunkResult['nextPart'];
4921
+ }
4922
+ echo " s3TimeTaken ".$s3TimeTaken;
4923
+ $s3UploadedSize = $uploadLoopCount * 5;
4924
+ echo " s3 approx file size written ".$s3UploadedSize;
4925
+ iwp_mmb_print_flush("s3loop");
4926
+ echo " s3TimeLeft ".$s3TimeLeft;
4927
+ echo " s3ChunkTimeTaken ".$s3ChunkTimeTaken;
4928
+ if(($s3TimeLeft <= $s3ChunkTimeTaken)||(!$singleUploadResult)||($doComplete))
4929
+ {
4930
+ $reloop = false;
4931
+ echo "reloop stopped";
4932
+ }
4933
+ else
4934
+ {
4935
+ $reloop = true;
4936
+ $reloopCount++;
4937
+ }
4938
+
4939
+ }while($reloop);
4940
+
4941
+ if(!$doComplete)
4942
+ {
4943
+ return $resArray;
4944
+ }
4945
+
4946
+ if($doComplete && $upload)
4947
+ {
4948
+
4949
+ $status = 'completed';
4950
+ iwp_mmb_print_flush('Amazon S3 upload: End');
4951
+ if($status == 'completed')
4952
+ {
4953
+ //file verification
4954
+ //checking file size and comparing
4955
+ //getting the hash value
4956
+ $partArrayLength = count($partsArray);
4957
+ $verificationResult = $this -> postUploadVerification($s3, $backup_file, $as3_file, $type = "amazons3", $as3_bucket);
4958
+ if(!$verificationResult)
4959
+ {
4960
+ return $this->statusLog($historyID, array('stage' => 'uploadAmazons3', 'status' => 'error', 'statusMsg' => 'S3 verification failed: File may be corrupted.', 'statusCode' => 'docomplete_S3_verification_failed_file_may_be_corrupted'));
4961
+ }
4962
+ if($del_host_file)
4963
+ {
4964
+ @unlink($backup_file);
4965
+ }
4966
+ }
4967
+ return $resArray;
4968
+ }
4969
+ else {
4970
+
4971
+ return array(
4972
+ 'error' => 'Failed to upload to Amazon S3. Please check your details and set upload/delete permissions on your bucket.',
4973
+ 'partial' => 1, 'error_code' => 'failed_to_upload_to_s3_check_your_details_and_set_upload_delete_permissions_on_your_bucket'
4974
+ );
4975
+ }
4976
+
4977
+
4978
+ }
4979
+ catch (Exception $e)
4980
+ {
4981
+
4982
+ $err = $e->getMessage();
4983
+ if($err){
4984
+ return array(
4985
+ 'error' => 'Failed to upload to AmazonS3 ('.$err.').', 'error_code' => 'failed_to_upload_s3_err'
4986
+ );
4987
+ } else {
4988
+ return array(
4989
+ 'error' => 'Failed to upload to Amazon S3.', 'error_code' => 'failed_to_upload_s3'
4990
+ );
4991
+ }
4992
+ }
4993
+
4994
+ }
4995
+ else {
4996
+ return array(
4997
+ 'error' => 'You cannot use Amazon S3 on your server. Please enable curl first.',
4998
+ 'partial' => 1, 'error_code' => 'cannot_use_s3_enable_curl_first'
4999
+ );
5000
+ }
5001
+ }
5002
+
5003
+
5004
+
5005
+ function remove_amazons3_backup($args)
5006
+ {
5007
+ if ($this->iwp_mmb_function_exists('curl_init')) {
5008
+ require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/amazon_s3/sdk.class.php');
5009
+ extract($args);
5010
+
5011
+ if(!is_array($backup_file))
5012
+ {
5013
+ $temp_backup_file = $backup_file;
5014
+ $backup_file = array();
5015
+ $backup_file[] = $temp_backup_file;
5016
+ }
5017
+
5018
+ if ($as3_site_folder == true)
5019
+ {
5020
+ if(!empty($as3_directory))
5021
+ {
5022
+ $as3_directory .= '/' . $this->site_name;
5023
+ }
5024
+ else
5025
+ {
5026
+ $as3_directory = $this->site_name;
5027
+ }
5028
+ }
5029
+ try{
5030
+ CFCredentials::set(array('development' => array('key' => trim($as3_access_key), 'secret' => trim(str_replace(' ', '+', $as3_secure_key)), 'default_cache_config' => '', 'certificate_authority' => true), '@default' => 'development'));
5031
+ $s3 = new AmazonS3();
5032
+ foreach($backup_file as $single_backup_file)
5033
+ {
5034
+ if(empty($as3_directory))
5035
+ {
5036
+ $single_as3_file = $single_backup_file;
5037
+ }
5038
+ else
5039
+ {
5040
+ $single_as3_file = $as3_directory . '/' . $single_backup_file;
5041
+ }
5042
+ $s3->delete_object($as3_bucket, $single_as3_file);
5043
+ }
5044
+
5045
+ } catch (Exception $e){
5046
+
5047
+ }
5048
+ }
5049
+ }
5050
+
5051
+ function get_amazons3_backup($args)
5052
+ {
5053
+ require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/amazon_s3/sdk.class.php');
5054
+ extract($args);
5055
+ $temp = '';
5056
+ try{
5057
+ CFCredentials::set(array('development' => array('key' => trim($as3_access_key), 'secret' => trim(str_replace(' ', '+', $as3_secure_key)), 'default_cache_config' => '', 'certificate_authority' => true), '@default' => 'development'));
5058
+ $s3 = new AmazonS3();
5059
+ if ($as3_site_folder == true)
5060
+ {
5061
+ if(!empty($as3_directory))
5062
+ {
5063
+ $as3_directory .= '/' . $this->site_name;
5064
+ }
5065
+ else
5066
+ {
5067
+ $as3_directory = $this->site_name;
5068
+ }
5069
+ }
5070
+ if(empty($as3_directory))
5071
+ {
5072
+ $single_as3_file = $backup_file;
5073
+ }
5074
+ else
5075
+ {
5076
+ $single_as3_file = $as3_directory . '/' . $backup_file;
5077
+ }
5078
+
5079
+ //$temp = ABSPATH . 'iwp_temp_backup.zip';
5080
+ $temp = wp_tempnam('iwp_temp_backup.zip');
5081
+ $s3->get_object($as3_bucket, $single_as3_file, array("fileDownload" => $temp));
5082
+ } catch (Exception $e){
5083
+ return false;
5084
+ }
5085
+ return $temp;
5086
+ }
5087
+ //IWP Remove ends here
5088
+
5089
+ function get_google_drive_backup($args)
5090
+ {
5091
+ require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php');
5092
+ require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Service/Drive.php');
5093
+
5094
+ //refresh token
5095
+ $client = new IWP_google_Client();
5096
+ $client->setClientId($args['clientID']);
5097
+ $client->setClientSecret($args['clientSecretKey']);
5098
+ $client->setRedirectUri($args['redirectURL']);
5099
+ $client->setScopes(array(
5100
+ 'https://www.googleapis.com/auth/drive',
5101
+ 'https://www.googleapis.com/auth/userinfo.email',
5102
+ 'https://www.googleapis.com/auth/userinfo.profile'));
5103
+
5104
+ //$client->setUseObjects(true);
5105
+
5106
+ $accessToken = $args['token'];
5107
+ $refreshToken = $accessToken['refresh_token'];
5108
+
5109
+ try
5110
+ {
5111
+ $client->refreshToken($refreshToken);
5112
+ }
5113
+ catch(Exception $e)
5114
+ {
5115
+ echo 'google Error ', $e->getMessage(), "\n";
5116
+ return array("error" => $e->getMessage(), "error_code" => "google_error_refresh_token");
5117
+ }
5118
+
5119
+ //downloading the file
5120
+ $service = new IWP_google_Service_Drive($client);
5121
+
5122
+ $file = $service->files->get($args['backup_file']);
5123
+
5124
+ $downloadUrl = $file->getDownloadUrl();
5125
+
5126
+ $temp = wp_tempnam('iwp_temp_backup.zip');
5127
+ //$temp = WP_CONTENT_DIR .'/DE_clientPluginSIde.zip';
5128
+
5129
+ try
5130
+ {
5131
+ if ($downloadUrl)
5132
+ {
5133
+ $request = new IWP_google_Http_Request($downloadUrl, 'GET', null, null);
5134
+
5135
+ $signHttpRequest = $client->getAuth()->sign($request);
5136
+ $httpRequest = $client->getIo()->makeRequest($signHttpRequest);
5137
+
5138
+ if ($httpRequest->getResponseHttpCode() == 200) {
5139
+ file_put_contents($temp, $httpRequest->getResponseBody());
5140
+ return $temp;
5141
+ } else {
5142
+ // An error occurred.
5143
+ return array("error" => "There is some error.", "error_code" => "google_error_bad_response_code");
5144
+ }
5145
+ }
5146
+ else
5147
+ {
5148
+ // The file doesn't have any content stored on Drive.
5149
+ return array("error" => "Google Drive file doesnt have nay content.", "error_code" => "google_error_download_url");
5150
+ }
5151
+ }catch(Exception $e)
5152
+ {
5153
+ echo 'google Error ', $e->getMessage(), "\n";
5154
+ return array("error" =>$e->getMessage(), "error_code" => "google_error_download_url_catch_excep");
5155
+ }
5156
+
5157
+
5158
+ }
5159
+
5160
+
5161
+ /*
5162
+ Google Drive Upload Function:
5163
+
5164
+ */
5165
+
5166
+ function google_drive_backup($historyID = 0, $args = '', $uploadid = null, $offset = 0)
5167
+ {
5168
+ require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php');
5169
+ require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/MediaFileUpload.php');
5170
+ require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Service/Drive.php');
5171
+
5172
+ $this -> hisID = $historyID;
5173
+
5174
+ $requestParams = $this -> getRequiredData($historyID,"requestParams");
5175
+ $upload_loop_break_time = $requestParams['account_info']['upload_loop_break_time']; //darkcode changed
5176
+ $upload_file_block_size = $requestParams['account_info']['upload_file_block_size'];
5177
+ $upload_file_block_size = 1 *1024 *1024;
5178
+ $del_host_file = $requestParams['args']['del_host_file'];
5179
+ $iwp_folder_id = '';
5180
+ $sub_folder_id = '';
5181
+ $sub_folder_name = $this->site_name;
5182
+
5183
+ $task_result = $this->getRequiredData($historyID, "taskResults");
5184
+
5185
+ $fileSizeUploaded = 0;
5186
+ $resumeURI = false;
5187
+ $current_file_num = 0;
5188
+
5189
+ if($args == '')
5190
+ {
5191
+ //on the next call $args would be ''
5192
+ //set $args, $uploadid, $offset from the DB
5193
+ $responseParams = $this -> getRequiredData($historyID,"responseParams");
5194
+
5195
+ if(!$responseParams)
5196
+ return $this->statusLog($this -> hisID, array('stage' => 'google_drive_upload', 'status' => 'error', 'statusMsg' => 'google Upload failed: Error while fetching table data.','statusCode' => 'google_upload_failed_error_fetching_data'));
5197
+
5198
+ $args = $responseParams['gDriveArgs'];
5199
+ $prevChunkResults = $responseParams['response_data'];
5200
+ if(is_array($prevChunkResults))
5201
+ {
5202
+ $resumeURI = $prevChunkResults['resumeURI'];
5203
+ $fileSizeUploaded = $prevChunkResults['fileSizeUploaded'];
5204
+ }
5205
+ $current_file_num = $responseParams['current_file_num'];
5206
+ }
5207
+ $create_sub_folder = $args['gdrive_site_folder'];
5208
+ $tempArgs = $args;
5209
+ $client = new IWP_google_Client();
5210
+ $client->setClientId($args['clientID']);
5211
+ $client->setClientSecret($args['clientSecretKey']);
5212
+ $client->setRedirectUri($args['redirectURL']);
5213
+ $client->setScopes(array(
5214
+ 'https://www.googleapis.com/auth/drive',
5215
+ 'https://www.googleapis.com/auth/userinfo.email',
5216
+ 'https://www.googleapis.com/auth/userinfo.profile'));
5217
+ $accessToken = $args['token'];
5218
+ $refreshToken = $accessToken['refresh_token'];
5219
+ $backup_file = $args['backup_file'];
5220
+
5221
+ if(!is_array($backup_file))
5222
+ {
5223
+ $temp_backup_file = $backup_file;
5224
+ $backup_file = array();
5225
+ $backup_file[] = $temp_backup_file;
5226
+ }
5227
+
5228
+ if(is_array($backup_file))
5229
+ {
5230
+ $backup_files_count = count($backup_file);
5231
+ $backup_file = $backup_file[$current_file_num];
5232
+ }
5233
+
5234
+ try
5235
+ {
5236
+ $client->refreshToken($refreshToken);
5237
+ }
5238
+ catch(Exception $e)
5239
+ {
5240
+ echo 'google Error ', $e->getMessage(), "\n";
5241
+ return array("error" => $e->getMessage(), "error_code" => "google_error_backup_refresh_token");
5242
+ }
5243
+
5244
+ //$client = new IWP_google_Client();
5245
+ //$accessToken = $client->authenticate($accessToken_early['refresh_token']);
5246
+ //$client->setAccessToken($accessToken);
5247
+
5248
+ $service = new IWP_google_Service_Drive($client);
5249
+
5250
+ //create iwp folder folder if it is not present
5251
+ try
5252
+ {
5253
+ $parameters = array();
5254
+ $parameters['q'] = "title = 'infinitewp' and trashed = false and mimeType= 'application/vnd.google-apps.folder'";
5255
+ $files = $service->files->listFiles($parameters);
5256
+ $list_result = array();
5257
+ $list_result = array_merge($list_result, $files->getItems());
5258
+ $list_result = (array)$list_result;
5259
+
5260
+ if(empty($list_result))
5261
+ {
5262
+ $file = new IWP_google_Service_Drive_DriveFile();
5263
+ $file->setTitle('infinitewp');
5264
+ $file->setMimeType('application/vnd.google-apps.folder');
5265
+
5266
+ $createdFolder = $service->files->insert($file, array(
5267
+ 'mimeType' => 'application/vnd.google-apps.folder',
5268
+ ));
5269
+ if($createdFolder)
5270
+ {
5271
+ $createdFolder = (array)$createdFolder;
5272
+ $iwp_folder_id = $createdFolder['id'];
5273
+ }
5274
+ }
5275
+ else
5276
+ {
5277
+ $list_result = (array)$list_result[0];
5278
+ $iwp_folder_id = $list_result['id'];
5279
+ }
5280
+ }catch (Exception $e){
5281
+ print "An error occurred: " . $e->getMessage();
5282
+ return array('error' => $e->getMessage(), 'error_code' => 'google_error_occured_list_results');
5283
+ }
5284
+
5285
+ //create sub folder by site name
5286
+ if($create_sub_folder)
5287
+ {
5288
+ $parameters = array();
5289
+ $parameters['q'] = "title = '$sub_folder_name' and trashed = false and mimeType = 'application/vnd.google-apps.folder'";
5290
+ $files = $service->files->listFiles($parameters);
5291
+ $list_result = array();
5292
+ $list_result = array_merge($list_result, $files->getItems());
5293
+ $list_result = (array)$list_result;
5294
+
5295
+ if(empty($list_result))
5296
+ {
5297
+ $file = new IWP_google_Service_Drive_DriveFile();
5298
+ $file->setTitle($sub_folder_name);
5299
+ $file->setMimeType('application/vnd.google-apps.folder');
5300
+
5301
+ //setting parent as infinitewpFolder
5302
+ $parent = new IWP_google_Service_Drive_ParentReference();
5303
+ $parent->setId($iwp_folder_id);
5304
+ $file->setParents(array($parent));
5305
+
5306
+ $createdFolder = $service->files->insert($file, array(
5307
+ 'mimeType' => 'application/vnd.google-apps.folder',
5308
+ ));
5309
+ if($createdFolder)
5310
+ {
5311
+ $createdFolder = (array)$createdFolder;
5312
+ $sub_folder_id = $createdFolder['id'];
5313
+ }
5314
+ }
5315
+ else
5316
+ {
5317
+ $list_result = (array)$list_result[0];
5318
+ $sub_folder_id = $list_result['id'];
5319
+ }
5320
+ }
5321
+
5322
+ //Insert a file
5323
+ $file = new IWP_google_Service_Drive_DriveFile();
5324
+ $file->setTitle(basename($backup_file));
5325
+ $file->setMimeType('binary/octet-stream');
5326
+
5327
+ // Set the Parent Folder on Google Drive
5328
+ $parent = new IWP_google_Service_Drive_ParentReference();
5329
+ if(empty($sub_folder_id))
5330
+ {
5331
+ $parent->setId($iwp_folder_id);
5332
+ }
5333
+ else
5334
+ {
5335
+ $parent->setId($sub_folder_id);
5336
+ }
5337
+ $file->setParents(array($parent));
5338
+
5339
+ $gDriveID = '';
5340
+ try
5341
+ {
5342
+ if(false)
5343
+ {
5344
+ //single upload
5345
+ $data = file_get_contents($backup_file);
5346
+ $createdFile = (array)$service->files->insert($file, array(
5347
+ 'data' => $data,
5348
+ //'mimeType' => 'text/plain',
5349
+ ));
5350
+ $gDriveID = $createdFile['id'];
5351
+ }
5352
+
5353
+ //multipart upload
5354
+
5355
+ if(true)
5356
+ {
5357
+ // Call the API with the media upload, defer so it doesn't immediately return.
5358
+ $client->setDefer(true);
5359
+ $request = $service->files->insert($file);
5360
+
5361
+ // Create a media file upload to represent our upload process.
5362
+ $media = new IWP_google_Http_MediaFileUpload($client, $request, 'application/zip', null, true, $upload_file_block_size);
5363
+ $media->setFileSize(filesize($backup_file));
5364
+
5365
+
5366
+ $status = false;
5367
+ $handle = fopen($backup_file, "rb");
5368
+ fseek($handle, $fileSizeUploaded);
5369
+
5370
+ $resArray = array (
5371
+ 'status' => 'completed',
5372
+ 'backupParentHID' => $historyID,
5373
+ );
5374
+
5375
+ while (!$status && !feof($handle))
5376
+ {
5377
+ $chunk = fread($handle, $upload_file_block_size);
5378
+ $statusArray = $media->nextChunk($chunk, $resumeURI, $fileSizeUploaded);
5379
+ $status = $statusArray['status'];
5380
+ $resumeURI = $statusArray['resumeURI'];
5381
+ //$fileSizeUploaded = ftell($handle);
5382
+ $fileSizeUploaded = $statusArray['progress'];
5383
+
5384
+ $googleTimeTaken = microtime(1) - $GLOBALS['IWP_MMB_PROFILING']['ACTION_START'];
5385
+ if(($googleTimeTaken > 10)&&($status != true))
5386
+ {
5387
+ $chunkResult['resumeURI'] = $resumeURI;
5388
+ $chunkResult['fileSizeUploaded'] = $fileSizeUploaded;
5389
+
5390
+ echo "<br> file uploaded size in this call: ".$fileSizeUploaded."<br>";
5391
+
5392
+ $result_arr = array();
5393
+ $result_arr['response_data'] = $chunkResult;
5394
+ $result_arr['status'] = 'partiallyCompleted';
5395
+ $result_arr['nextFunc'] = 'google_drive_backup';
5396
+ $result_arr['gDriveArgs'] = $tempArgs;
5397
+ $result_arr['current_file_num'] = $current_file_num;
5398
+
5399
+ /* $task_result['task_results'][$historyID]['gDriveOrgFileName'][] = basename($backup_file);
5400
+ $task_result['task_results'][$historyID]['gDrive'][] = $gDriveID;
5401
+ //$task_result['gDrive'] = basename($backup_file);
5402
+ $task_result['gDrive'][] = $gDriveID; */
5403
+
5404
+ $this->statusLog($this -> hisID, array('stage' => 'amazonMultiCall', 'status' => 'partiallyCOmpleted', 'statusMsg' => 'nextCall','nextFunc' => 'amazons3_backup', 'task_result' => $task_result, 'responseParams' => $result_arr));
5405
+
5406
+ $resArray['status'] = "partiallyCompleted";
5407
+ return $resArray;
5408
+ }
5409
+ }
5410
+
5411
+ $result = false;
5412
+ if($status != false) {
5413
+ $result = $status;
5414
+ }
5415
+
5416
+ fclose($handle);
5417
+ $client->setDefer(false);
5418
+
5419
+ $completeBackupResult = (array)$status;
5420
+
5421
+ //$gDriveID = $createdFile['id'];
5422
+ $gDriveID = $completeBackupResult['id'];
5423
+ }
5424
+ }catch (Exception $e)
5425
+ {
5426
+ echo "An error occurred: " . $e->getMessage();
5427
+ return array("error" => "gDrive Error".$e->getMessage(), "error_code" => "google_error_multipart_upload");
5428
+ }
5429
+
5430
+ $current_file_num += 1;
5431
+
5432
+ $result_arr = array();
5433
+ $result_arr['response_data'] = $createdFile['id'];
5434
+ $result_arr['status'] = "completed";
5435
+ $result_arr['nextFunc'] = 'google_drive_completed';
5436
+ $result_arr['gDriveArgs'] = $tempArgs;
5437
+ $result_arr['current_file_num'] = $current_file_num;
5438
+
5439
+ $resArray = array (
5440
+ 'status' => 'completed',
5441
+ 'backupParentHID' => $historyID,
5442
+ );
5443
+
5444
+ //$task_result = $this->getRequiredData($historyID, "taskResults");
5445
+ $task_result['task_results'][$historyID]['gDriveOrgFileName'][] = basename($backup_file);
5446
+ $task_result['task_results'][$historyID]['gDrive'][] = $gDriveID;
5447
+ //$task_result['gDrive'] = basename($backup_file);
5448
+ $task_result['gDrive'][] = $gDriveID;
5449
+
5450
+ if($current_file_num == $backup_files_count)
5451
+ {
5452
+ $result_arr['nextFunc'] = 'google_drive_completed';
5453
+ iwp_mmb_print_flush('Google Drive upload: End');
5454
+ unset($task_result['task_results'][$historyID]['server']);
5455
+ }
5456
+ else
5457
+ {
5458
+ $result_arr['status'] = "partiallyCompleted";
5459
+ $result_arr['nextFunc'] = 'google_drive_backup';
5460
+ $resArray['status'] = 'partiallyCompleted';
5461
+ }
5462
+
5463
+ if($del_host_file)
5464
+ {
5465
+ @unlink($backup_file);
5466
+ }
5467
+
5468
+ $this->statusLog($this -> hisID, array('stage' => 'gDriveMultiCall', 'status' => 'completed', 'statusMsg' => 'nextCall','nextFunc' => 'google_drive_completed', 'task_result' => $task_result, 'responseParams' => $result_arr));
5469
+
5470
+ return $resArray;
5471
+ }
5472
+
5473
+
5474
+ function remove_google_drive_backup($args)
5475
+ {
5476
+ require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php');
5477
+ require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Service/Drive.php');
5478
+
5479
+ $client = new IWP_google_Client();
5480
+ $client->setClientId($args['clientID']);
5481
+ $client->setClientSecret($args['clientSecretKey']);
5482
+ $client->setRedirectUri($args['redirectURL']);
5483
+ $client->setScopes(array(
5484
+ 'https://www.googleapis.com/auth/drive',
5485
+ 'https://www.googleapis.com/auth/userinfo.email',
5486
+ 'https://www.googleapis.com/auth/userinfo.profile'));
5487
+
5488
+ //$client->setUseObjects(true);
5489
+
5490
+ $accessToken = $args['token'];
5491
+ $refreshToken = $accessToken['refresh_token'];
5492
+ $backup_file = $args['backup_file'];
5493
+ if(!is_array($backup_file))
5494
+ {
5495
+ $backup_file = array();
5496
+ $backup_file[0] = $args['backup_file'];
5497
+ }
5498
+
5499
+ try
5500
+ {
5501
+ $client->refreshToken($refreshToken);
5502
+ }
5503
+ catch(Exception $e)
5504
+ {
5505
+ echo 'google Error ', $e->getMessage(), "\n";
5506
+ return array("error" => $e->getMessage(), "error_code" => "google_error_remove_refresh_token");
5507
+ }
5508
+
5509
+ $service = new IWP_google_Service_Drive($client);
5510
+
5511
+ foreach($backup_file as $key => $value)
5512
+ {
5513
+ try
5514
+ {
5515
+ $service->files->delete($value);
5516
+ }
5517
+ catch (Exception $e)
5518
+ {
5519
+ echo "An error occurred: " . $e->getMessage();
5520
+ return array("error" => "gDrive Remove Error".$e->getMessage(), "error_code" => "google_error_delete");
5521
+ }
5522
+ }
5523
+ }
5524
+
5525
+ function schedule_next($type, $schedule)
5526
+ {
5527
+ $schedule = explode("|", $schedule);
5528
+ if (empty($schedule))
5529
+ return false;
5530
+ switch ($type) {
5531
+
5532
+ case 'daily':
5533
+
5534
+ if (isset($schedule[1]) && $schedule[1]) {
5535
+ $delay_time = $schedule[1] * 60;
5536
+ }
5537
+
5538
+ $current_hour = date("H");
5539
+ $schedule_hour = $schedule[0];
5540
+ if ($current_hour >= $schedule_hour){
5541
+ $time = mktime($schedule_hour, 0, 0, date("m"), date("d") + 1, date("Y"));
5542
+ //$time ='0001#'.$current_hour.'|'.$schedule_hour;
5543
+
5544
+ }
5545
+
5546
+ else{
5547
+ $time = mktime($schedule_hour, 0, 0, date("m"), date("d"), date("Y"));
5548
+ //$time ='0000#'.$current_hour.'|'.$schedule_hour;
5549
+ }
5550
+ $time = time() + 30;
5551
+
5552
+
5553
+ break;
5554
+
5555
+
5556
+ case 'weekly':
5557
+ if (isset($schedule[2]) && $schedule[2]) {
5558
+ $delay_time = $schedule[2] * 60;
5559
+ }
5560
+ $current_weekday = date('w');
5561
+ $schedule_weekday = $schedule[1];
5562
+ $current_hour = date("H");
5563
+ $schedule_hour = $schedule[0];
5564
+
5565
+ if ($current_weekday > $schedule_weekday)
5566
+ $weekday_offset = 7 - ($week_day - $task_schedule[1]);
5567
+ else
5568
+ $weekday_offset = $schedule_weekday - $current_weekday;
5569
+
5570
+
5571
+ if (!$weekday_offset) { //today is scheduled weekday
5572
+ if ($current_hour >= $schedule_hour)
5573
+ $time = mktime($schedule_hour, 0, 0, date("m"), date("d") + 7, date("Y"));
5574
+ else
5575
+ $time = mktime($schedule_hour, 0, 0, date("m"), date("d"), date("Y"));
5576
+ } else {
5577
+ $time = mktime($schedule_hour, 0, 0, date("m"), date("d") + $weekday_offset, date("Y"));
5578
+ }
5579
+
5580
+ break;
5581
+
5582
+ case 'monthly':
5583
+ if (isset($schedule[2]) && $schedule[2]) {
5584
+ $delay_time = $schedule[2] * 60;
5585
+ }
5586
+ $current_monthday = date('j');
5587
+ $schedule_monthday = $schedule[1];
5588
+ $current_hour = date("H");
5589
+ $schedule_hour = $schedule[0];
5590
+
5591
+ if ($current_monthday > $schedule_monthday) {
5592
+ $time = mktime($schedule_hour, 0, 0, date("m") + 1, $schedule_monthday, date("Y"));
5593
+ } else if ($current_monthday < $schedule_monthday) {
5594
+ $time = mktime($schedule_hour, 0, 0, date("m"), $schedule_monthday, date("Y"));
5595
+ } else if ($current_monthday == $schedule_monthday) {
5596
+ if ($current_hour >= $schedule_hour)
5597
+ $time = mktime($schedule_hour, 0, 0, date("m") + 1, $schedule_monthday, date("Y"));
5598
+ else
5599
+ $time = mktime($schedule_hour, 0, 0, date("m"), $schedule_monthday, date("Y"));
5600
+ break;
5601
+ }
5602
+
5603
+ break;
5604
+ default:
5605
+ break;
5606
+ }
5607
+
5608
+ if (isset($delay_time) && $delay_time) {
5609
+ $time += $delay_time;
5610
+ }
5611
+
5612
+ return $time;
5613
+ }
5614
+
5615
+
5616
+ //Parse task arguments for info on IWP Admin Panel
5617
+ /* function get_backup_stats()
5618
+ {
5619
+ $stats = array();
5620
+ $tasks = $this->tasks;
5621
+ if (is_array($tasks) && !empty($tasks)) {
5622
+ foreach ($tasks as $task_name => $info) {
5623
+ if (is_array($info['task_results']) && !empty($info['task_results'])) {
5624
+ foreach ($info['task_results'] as $key => $result) {
5625
+ if (isset($result['server']) && !isset($result['error'])) {
5626
+ if (!file_exists($result['server']['file_path'])) {
5627
+ $info['task_results'][$key]['error'] = 'Backup created but manually removed from server.';
5628
+ }
5629
+ }
5630
+ }
5631
+ }
5632
+ if (is_array($info['task_results']))
5633
+ $stats[$task_name] = $info['task_results'];
5634
+ }
5635
+ }
5636
+ return $stats;
5637
+ } */
5638
+
5639
+
5640
+ /*function get_next_schedules()
5641
+ {
5642
+ $stats = array();
5643
+ $tasks = $this->tasks;
5644
+ if (is_array($tasks) && !empty($tasks)) {
5645
+ foreach ($tasks as $task_name => $info) {
5646
+ $stats[$task_name] = isset($info['task_args']['next']) ? $info['task_args']['next'] : array();
5647
+ }
5648
+ }
5649
+ return $stats;
5650
+ }
5651
+ */
5652
+
5653
+ function remove_old_backups($task_name)
5654
+ {
5655
+ //Check for previous failed backups first
5656
+ //$this->cleanup();
5657
+
5658
+ global $wpdb;
5659
+
5660
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
5661
+
5662
+ //Check for previous failed backups first
5663
+ $this->cleanup();
5664
+
5665
+ //Remove by limit
5666
+ $backups = $this->get_all_tasks();
5667
+
5668
+ $thisTask = $this->get_this_tasks();
5669
+ $requestParams = unserialize($thisTask['requestParams']);
5670
+ $limit = $requestParams['args']['limit'];
5671
+
5672
+ /*if ($task_name == 'Backup Now') {
5673
+ $num = 0;
5674
+ } else {
5675
+ $num = 1;
5676
+ }*/
5677
+
5678
+ $select_prev_backup = "SELECT historyID, taskResults FROM ".$table_name." WHERE taskName = '".$task_name."' ORDER BY ID DESC LIMIT ".$limit.",100 ";
5679
+
5680
+ $select_prev_backup_res = $wpdb->get_results($select_prev_backup, ARRAY_A);
5681
+
5682
+
5683
+
5684
+ foreach ( $select_prev_backup_res as $backup_data )
5685
+ {
5686
+ $task_result = unserialize($backup_data['taskResults']);
5687
+
5688
+ if (isset($task_result['task_results'][$backup_data['historyID']]['server'])) {
5689
+ $backup_file = $task_result['task_results'][$backup_data['historyID']]['server']['file_path'];
5690
+ if(!is_array($backup_file))
5691
+ {
5692
+ $temp_backup_file = $backup_file;
5693
+ $backup_file = array();
5694
+ $backup_file[0] = $temp_backup_file;
5695
+ }
5696
+ foreach($backup_file as $value)
5697
+ {
5698
+ @unlink($value);
5699
+ }
5700
+ }
5701
+
5702
+ $thisRequestParams = $this->getRequiredData($backup_data['historyID'], "requestParams");
5703
+
5704
+ if (isset($task_result['task_results'][$backup_data['historyID']]['ftp'])) {
5705
+ $ftp_file = $task_result['task_results'][$backup_data['historyID']]['ftp'];
5706
+ $args = $thisRequestParams['account_info']['iwp_ftp'];
5707
+ $args['backup_file'] = $ftp_file;
5708
+ $this->remove_ftp_backup($args);
5709
+ }
5710
+
5711
+ if (isset($task_result['task_results'][$backup_data['historyID']]['amazons3'])) {
5712
+ $amazons3_file = $task_result['task_results'][$backup_data['historyID']]['amazons3'];
5713
+ $args = $thisRequestParams['account_info']['iwp_amazon_s3'];
5714
+ $args['backup_file'] = $amazons3_file;
5715
+ $this->remove_amazons3_backup($args);
5716
+ }
5717
+
5718
+ if (isset($task_result['task_results'][$backup_data['historyID']]['dropbox']) && isset($thisRequestParams['account_info']['iwp_dropbox'])) {
5719
+ //To do: dropbox remove
5720
+ $dropbox_file = $task_result['task_results'][$backup_data['historyID']]['dropbox'];
5721
+ $args = $thisRequestParams['account_info']['iwp_dropbox'];
5722
+ $args['backup_file'] = $dropbox_file;
5723
+ $this->remove_dropbox_backup($args);
5724
+ }
5725
+
5726
+ if (isset($task_result['task_results'][$backup_data['historyID']]['gDrive'])) {
5727
+ $gdrive_file = $task_result['task_results'][$backup_data['historyID']]['gDrive'];
5728
+ $args = $thisRequestParams['account_info']['iwp_gdrive'];
5729
+ $args['backup_file'] = $gdrive_file;
5730
+ $this->remove_google_drive_backup($args);
5731
+ }
5732
+
5733
+ $delete_query = "DELETE FROM ".$table_name." WHERE historyID = ".$backup_data['historyID'];
5734
+
5735
+ $deleteRes = $wpdb->query($delete_query);
5736
+ }
5737
+
5738
+ return true;
5739
+
5740
+ }
5741
+
5742
+ function cleanup()
5743
+ {
5744
+ $tasks = $this->get_all_tasks(); //all backups task results array.
5745
+
5746
+ $backup_folder = WP_CONTENT_DIR . '/' . md5('iwp_mmb-client') . '/iwp_backups/';
5747
+ $backup_folder_new = IWP_BACKUP_DIR . '/';
5748
+ $files = glob($backup_folder . "*");
5749
+ $new = glob($backup_folder_new . "*");
5750
+
5751
+ //Failed db files first
5752
+ $db_folder = IWP_DB_DIR . '/';
5753
+ $db_files = glob($db_folder . "*");
5754
+ if (is_array($db_files) && !empty($db_files)) {
5755
+ foreach ($db_files as $file) {
5756
+ @unlink($file);
5757
+ }
5758
+ @unlink(IWP_BACKUP_DIR.'/iwp_db/index.php');
5759
+ @rmdir(IWP_DB_DIR);
5760
+ }
5761
+
5762
+
5763
+ //clean_old folder?
5764
+ if ((basename($files[0]) == 'index.php' && count($files) == 1) || (!empty($files))) { //USE (!empty($files)
5765
+ foreach ($files as $file) {
5766
+ @unlink($file);
5767
+ }
5768
+ @rmdir(WP_CONTENT_DIR . '/' . md5('iwp_mmb-client') . '/iwp_backups');
5769
+ @rmdir(WP_CONTENT_DIR . '/' . md5('iwp_mmb-client'));
5770
+ }
5771
+
5772
+ if (!empty($new)) {
5773
+ foreach ($new as $b) {
5774
+ $files[] = $b;
5775
+ }
5776
+ }
5777
+ $deleted = array();
5778
+
5779
+ if (is_array($files) && count($files)) {
5780
+ $results = array();
5781
+ if (!empty($tasks)) {
5782
+ foreach ((array) $tasks as $task) {
5783
+ //if (isset($task) && count($task)) {
5784
+ // foreach ($task as $backup) {
5785
+ if (isset($task['task_results']) && count($task['task_results'])) {
5786
+ foreach ($task['task_results'] as $backup) {
5787
+ if (isset($backup['server'])) {
5788
+ $this_backup_file = $backup['server']['file_path'];
5789
+ if(is_array($this_backup_file))
5790
+ {
5791
+ foreach($this_backup_file as $single_backup_file)
5792
+ {
5793
+ $results[] = $single_backup_file;
5794
+ }
5795
+ }
5796
+ else
5797
+ {
5798
+ $results[] = $this_backup_file;
5799
+ }
5800
+ }
5801
+ }
5802
+ }
5803
+ }
5804
+ }
5805
+ $num_deleted = 0;
5806
+
5807
+ foreach ($files as $file) {
5808
+ if (!in_array($file, $results) && basename($file) != 'index.php') {
5809
+ @unlink($file);
5810
+ //$deleted[] = basename($file);
5811
+ $deleted[] = $file;
5812
+ $num_deleted++;
5813
+ }
5814
+ }
5815
+ }
5816
+ return $deleted;
5817
+ }
5818
+
5819
+
5820
+ /**
5821
+ * Delete specified backup
5822
+ * Args: $task_name, $result_id
5823
+ */
5824
+
5825
+ function delete_backup($args)
5826
+ {
5827
+
5828
+ if (empty($args))
5829
+ return false;
5830
+
5831
+ global $wpdb;
5832
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
5833
+
5834
+ extract($args);
5835
+
5836
+ $tasks = $this->get_requested_task($result_id);
5837
+
5838
+ $backup = $tasks['task_results'][$result_id];
5839
+
5840
+ $requestParams = unserialize($tasks['requestParams']);
5841
+ $args = $requestParams['secure']['account_info'];
5842
+
5843
+ if (isset($backup['server'])) {
5844
+ $backup_file = $backup['server']['file_path'];
5845
+ if(is_array($backup_file))
5846
+ {
5847
+ foreach($backup_file as $value)
5848
+ {
5849
+ @unlink($value);
5850
+ }
5851
+ }
5852
+ else
5853
+ {
5854
+ @unlink($backup_file);
5855
+ }
5856
+ }
5857
+
5858
+
5859
+ //Remove from ftp
5860
+ if (isset($backup['ftp'])) {
5861
+ $ftp_file = $backup['ftp'];
5862
+ $args = $args['iwp_ftp'];
5863
+ $args['backup_file'] = $ftp_file;
5864
+ $this->remove_ftp_backup($args);
5865
+ }
5866
+
5867
+ if (isset($backup['amazons3'])) {
5868
+ $amazons3_file = $backup['amazons3'];
5869
+ $args = $args['iwp_amazon_s3'];
5870
+ $args['backup_file'] = $amazons3_file;
5871
+ $this->remove_amazons3_backup($args);
5872
+ }
5873
+
5874
+ if (isset($backup['dropbox'])) {
5875
+ $dropbox_file = $backup['dropbox'];
5876
+ $args = $args['iwp_dropbox'];
5877
+ $args['backup_file'] = $dropbox_file;
5878
+ $this->remove_dropbox_backup($args);
5879
+ }
5880
+
5881
+ if (isset($backup['gDrive'])) {
5882
+ $g_drive_file = $backup['gDrive'];
5883
+ $args = $args['iwp_gdrive'];
5884
+ $args['backup_file'] = $g_drive_file;
5885
+ $this->remove_google_drive_backup($args);
5886
+ }
5887
+
5888
+ $delete_query = "DELETE FROM ".$table_name." WHERE historyID = ".$result_id;
5889
+
5890
+ $deleteRes = $wpdb->query($delete_query);
5891
+
5892
+ return true;
5893
+
5894
+ }
5895
+
5896
+ function cleanup_old_method()
5897
+ {
5898
+ //$tasks = $this->tasks;
5899
+ $tasks = $this->get_all_tasks();
5900
+ $backup_folder = WP_CONTENT_DIR . '/' . md5('iwp_mmb-client') . '/iwp_backups/';
5901
+ $backup_folder_new = IWP_BACKUP_DIR . '/';
5902
+ $files = glob($backup_folder . "*");
5903
+ $new = glob($backup_folder_new . "*");
5904
+
5905
+ //Failed db files first
5906
+ $db_folder = IWP_DB_DIR . '/';
5907
+ $db_files = glob($db_folder . "*");
5908
+ if (is_array($db_files) && !empty($db_files)) {
5909
+ foreach ($db_files as $file) {
5910
+ @unlink($file);
5911
+ }
5912
+ @unlink(IWP_BACKUP_DIR.'/iwp_db/index.php');
5913
+ @rmdir(IWP_DB_DIR);
5914
+ }
5915
+
5916
+
5917
+ //clean_old folder?
5918
+ if ((basename($files[0]) == 'index.php' && count($files) == 1) || (!empty($files))) { //USE (!empty($files)
5919
+ foreach ($files as $file) {
5920
+ @unlink($file);
5921
+ }
5922
+ @rmdir(WP_CONTENT_DIR . '/' . md5('iwp_mmb-client') . '/iwp_backups');
5923
+ @rmdir(WP_CONTENT_DIR . '/' . md5('iwp_mmb-client'));
5924
+ }
5925
+
5926
+ if (!empty($new)) {
5927
+ foreach ($new as $b) {
5928
+ $files[] = $b;
5929
+ }
5930
+ }
5931
+ $deleted = array();
5932
+
5933
+ if (is_array($files) && count($files)) {
5934
+ $results = array();
5935
+ if (!empty($tasks)) {
5936
+ foreach ((array) $tasks as $task) {
5937
+ if (isset($task['task_results']) && count($task['task_results'])) {
5938
+ foreach ($task['task_results'] as $backup) {
5939
+ if (isset($backup['server'])) {
5940
+ $results[] = $backup['server']['file_path'];
5941
+ }
5942
+ }
5943
+ }
5944
+ }
5945
+ }
5946
+
5947
+ $num_deleted = 0;
5948
+ foreach ($files as $file) {
5949
+ if (!in_array($file, $results) && basename($file) != 'index.php') {
5950
+ @unlink($file);
5951
+ $deleted[] = basename($file);
5952
+ $num_deleted++;
5953
+ }
5954
+ }
5955
+ }
5956
+
5957
+
5958
+
5959
+ return $deleted;
5960
+ }
5961
+
5962
+
5963
+ function wpdb_reconnect(){
5964
+ global $wpdb;
5965
+ $old_wpdb = $wpdb;
5966
+ //Reconnect to avoid timeout problem after ZIP files
5967
+ if(class_exists('wpdb') && function_exists('wp_set_wpdb_vars')){
5968
+ @mysql_close($wpdb->dbh);
5969
+ $wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST );
5970
+ wp_set_wpdb_vars();
5971
+ $wpdb->options = $old_wpdb->options;//fix for multi site full backup
5972
+ }
5973
+ }
5974
+
5975
+ function replace_htaccess($url, $remote_abspath)
5976
+ {
5977
+ global $wp_filesystem;
5978
+ //$file = @file_get_contents(ABSPATH.'.htaccess');
5979
+ $file = $wp_filesystem->get_contents($remote_abspath.'.htaccess');
5980
+ if ($file && strlen($file)) {
5981
+ $args = parse_url($url);
5982
+ $string = rtrim($args['path'], "/");
5983
+ $regex = "/BEGIN WordPress(.*?)RewriteBase(.*?)\n(.*?)RewriteRule \.(.*?)index\.php(.*?)END WordPress/sm";
5984
+ $replace = "BEGIN WordPress$1RewriteBase " . $string . "/ \n$3RewriteRule . " . $string . "/index.php$5END WordPress";
5985
+ $file = preg_replace($regex, $replace, $file);
5986
+ //@file_put_contents(ABSPATH.'.htaccess', $file);
5987
+ $wp_filesystem->put_contents($remote_abspath.'.htaccess', $file);
5988
+ }
5989
+ }
5990
+
5991
+ function check_cron_remove(){
5992
+ if(empty($this->tasks) || (count($this->tasks) == 1 && isset($this->tasks['Backup Now'])) ){
5993
+ wp_clear_scheduled_hook('iwp_client_backup_tasks');
5994
+ exit;
5995
+ }
5996
+ }
5997
+
5998
+ public function readd_tasks( $params = array() ){
5999
+ global $iwp_mmb_core;
6000
+
6001
+ if( empty($params) || !isset($params['backups']) )
6002
+ return $params;
6003
+
6004
+ $before = array();
6005
+ $tasks = $params['backups'];
6006
+ if( !empty($tasks) ){
6007
+ $iwp_mmb_backup = new IWP_MMB_Backup();
6008
+
6009
+ if( function_exists( 'wp_next_scheduled' ) ){
6010
+ if ( !wp_next_scheduled('iwp_client_backup_tasks') ) {
6011
+ wp_schedule_event( time(), 'tenminutes', 'iwp_client_backup_tasks' );
6012
+ }
6013
+ }
6014
+
6015
+ foreach( $tasks as $task ){
6016
+ $before[$task['task_name']] = array();
6017
+
6018
+ if(isset($task['secure'])){
6019
+ if($decrypted = $iwp_mmb_core->_secure_data($task['secure'])){
6020
+ $decrypted = maybe_unserialize($decrypted);
6021
+ if(is_array($decrypted)){
6022
+ foreach($decrypted as $key => $val){
6023
+ if(!is_numeric($key))
6024
+ $task[$key] = $val;
6025
+ }
6026
+ unset($task['secure']);
6027
+ } else
6028
+ $task['secure'] = $decrypted;
6029
+ }
6030
+
6031
+ }
6032
+ if (isset($task['account_info']) && is_array($task['account_info'])) { //only if sends from panel first time(secure data)
6033
+ $task['args']['account_info'] = $task['account_info'];
6034
+ }
6035
+
6036
+ $before[$task['task_name']]['task_args'] = $task['args'];
6037
+ $before[$task['task_name']]['task_args']['next'] = $iwp_mmb_backup->schedule_next($task['args']['type'], $task['args']['schedule']);
6038
+ }
6039
+ }
6040
+ update_option('iwp_client_backup_tasks', $before);
6041
+
6042
+ unset($params['backups']);
6043
+ return $params;
6044
+ }
6045
+
6046
+ function is_server_writable(){
6047
+ if((!defined('FTP_HOST') || !defined('FTP_USER') || !defined('FTP_PASS')) && (get_filesystem_method(array(), ABSPATH) != 'direct'))
6048
+ return false;
6049
+ else
6050
+ return true;
6051
+ }
6052
+ }
6053
+
6054
+ /*if( function_exists('add_filter') ){
6055
+ add_filter( 'iwp_website_add', 'IWP_MMB_Backup::readd_tasks' );
6056
+ }*/
6057
+
6058
+ if(!function_exists('get_all_files_from_dir')) {
6059
+ /**
6060
+ * Get all files in directory
6061
+ *
6062
+ * @param string $path Relative or absolute path to folder
6063
+ * @param array $exclude List of excluded files or folders, relative to $path
6064
+ * @return array List of all files in folder $path, exclude all files in $exclude array
6065
+ */
6066
+ function get_all_files_from_dir($path, $exclude = array()) {
6067
+ if ($path[strlen($path) - 1] === "/") $path = substr($path, 0, -1);
6068
+ global $directory_tree, $ignore_array;
6069
+ $directory_tree = array();
6070
+ if(!empty($exclude))
6071
+ {
6072
+ foreach ($exclude as $file) {
6073
+ if (!in_array($file, array('.', '..'))) {
6074
+ if ($file[0] === "/") $path = substr($file, 1);
6075
+ $ignore_array[] = "$path/$file";
6076
+ }
6077
+ }
6078
+ }
6079
+ get_all_files_from_dir_recursive($path);
6080
+ return $directory_tree;
6081
+ }
6082
+ }
6083
+
6084
+ if (!function_exists('get_all_files_from_dir_recursive')) {
6085
+ /**
6086
+ * Get all files in directory,
6087
+ * wrapped function which writes in global variable
6088
+ * and exclued files or folders are read from global variable
6089
+ *
6090
+ * @param string $path Relative or absolute path to folder
6091
+ * @return void
6092
+ */
6093
+ function get_all_files_from_dir_recursive($path) {
6094
+ if ($path[strlen($path) - 1] === "/") $path = substr($path, 0, -1);
6095
+ global $directory_tree, $ignore_array;
6096
+ $directory_tree_temp = array();
6097
+ $dh = @opendir($path);
6098
+
6099
+ while (false !== ($file = @readdir($dh))) {
6100
+ if (!in_array($file, array('.', '..'))) {
6101
+ if (!in_array("$path/$file", $ignore_array)) {
6102
+ if (!is_dir("$path/$file")) {
6103
+ $directory_tree[] = "$path/$file";
6104
+ } else {
6105
+ get_all_files_from_dir_recursive("$path/$file");
6106
+ }
6107
+ }
6108
+ }
6109
+ }
6110
+ @closedir($dh);
6111
+ }
6112
+ }
6113
+
6114
+ ?>
backup.class.php → backup.class.singlecall.php RENAMED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /************************************************************
3
  * This plugin was modified by Revmakx *
4
  * Copyright (c) 2012 Revmakx *
@@ -15,8 +16,18 @@
15
  * Copyright (c) 2011 Prelovac Media
16
  * www.prelovac.com
17
  **************************************************************/
 
 
18
  define('IWP_BACKUP_DIR', WP_CONTENT_DIR . '/infinitewp/backups');
 
 
 
19
  define('IWP_DB_DIR', IWP_BACKUP_DIR . '/iwp_db');
 
 
 
 
 
20
 
21
  $zip_errors = array(
22
  'No error',
@@ -60,7 +71,7 @@ $unzip_errors = array(
60
  );
61
 
62
 
63
- class IWP_MMB_Backup extends IWP_MMB_Core
64
  {
65
  var $site_name;
66
  var $statuses;
@@ -86,26 +97,32 @@ class IWP_MMB_Backup extends IWP_MMB_Core
86
  'files_zip' => 3,
87
  'finished' => 100
88
  );
89
- $this->tasks = get_option('iwp_client_backup_tasks');
 
 
90
  }
91
- function set_memory()
92
  {
93
  $changed = array('execution_time' => 0, 'memory_limit' => 0);
94
  @ignore_user_abort(true);
95
- $memory_limit = trim(ini_get('memory_limit'));
96
- $last = strtolower(substr($memory_limit, -1));
97
-
98
- if($last == 'g')
99
- $memory_limit = ((int) $memory_limit)*1024;
100
- else if($last == 'm')
101
- $memory_limit = (int) $memory_limit;
102
- if($last == 'k')
103
- $memory_limit = ((int) $memory_limit)/1024;
104
-
105
- if ( $memory_limit < 384 ) {
106
- @ini_set('memory_limit', '384M');
107
- $changed['memory_limit'] = 1;
108
- }
 
 
 
 
109
 
110
  if ( (int) @ini_get('max_execution_time') < 1200 ) {
111
  @ini_set('max_execution_time', 1200);//twenty minutes
@@ -116,193 +133,59 @@ class IWP_MMB_Backup extends IWP_MMB_Core
116
  return $changed;
117
 
118
  }
119
- function get_backup_settings()
 
120
  {
121
  $backup_settings = get_option('iwp_client_backup_tasks');
122
  if (!empty($backup_settings))
123
  return $backup_settings;
124
  else
125
  return false;
126
- }
127
 
128
- function set_backup_task($params)
129
- {
130
- //$params => [$task_name, $args, $error]
131
- if (!empty($params)) {
132
 
133
- //Make sure backup cron job is set
134
- if (!wp_next_scheduled('iwp_client_backup_tasks')) {
135
- wp_schedule_event( time(), 'tenminutes', 'iwp_client_backup_tasks' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  }
137
-
138
- extract($params);
139
-
140
- //$before = $this->get_backup_settings();
141
- $before = $this->tasks;
142
- if (!$before || empty($before))
143
- $before = array();
144
-
145
- if (isset($args['remove'])) {
146
- unset($before[$task_name]);
147
- $return = array(
148
- 'removed' => true
149
- );
150
- } else {
151
-
152
- if (is_array($params['account_info'])) { //only if sends from IWP Admin Panel first time(secure data)
153
- $args['account_info'] = $account_info;
154
- }
155
-
156
- $before[$task_name]['task_args'] = $args;
157
- //$before[$task_name]['task_args'] = $task_name;
158
-
159
- /*if (strlen($args['schedule']))
160
- $before[$task_name]['task_args']['next'] = $this->schedule_next($args['type'], $args['schedule']);*///to WP cron
161
- $before[$task_name]['task_args']['task_name'] = $task_name;
162
-
163
- $return = $before[$task_name];
164
- }
165
-
166
- //Update with error
167
- if (isset($error)) {
168
- if (is_array($error)) {
169
- $before[$task_name]['task_results'][count($before[$task_name]['task_results']) - 1]['error'] = $error['error'];
170
- } else {
171
- $before[$task_name]['task_results'][count($before[$task_name]['task_results'])]['error'] = $error;
172
- }
173
- }
174
-
175
- // if (isset($time) && $time) { //set next result time before backup
176
- if (is_array($before[$task_name]['task_results'])) {
177
- $before[$task_name]['task_results'] = array_values($before[$task_name]['task_results']);
178
- }
179
- //$before[$task_name]['task_results'][count($before[$task_name]['task_results'])]['time'] = (isset($time) && $time) ? $time : time();
180
- //}
181
- if (isset($time) && $time) { //This will occur for schedule runtask.
182
- $before[$task_name]['task_results'][count($before[$task_name]['task_results'])]['time'] = $time;
183
- }else{
184
- if($task_name == 'Backup Now')
185
- $before[$task_name]['task_results'][count($before[$task_name]['task_results'])]['time'] = time();
186
- }
187
-
188
- $this->update_tasks($before);
189
- //update_option('iwp_client_backup_tasks', $before);
190
-
191
- if ($task_name == 'Backup Now') {
192
- $result = $this->backup($args, $task_name);
193
- $backup_settings = $this->tasks;
194
-
195
- if (is_array($result) && array_key_exists('error', $result)) {
196
- $return = $result;
197
- } else {
198
- $return = $backup_settings[$task_name];
199
- }
200
- }
201
- return $return;
202
  }
203
 
204
-
205
-
206
  return false;
207
  }
208
 
209
- //Cron check
210
- function check_backup_tasks()
211
- {
212
-
213
- $this->check_cron_remove();
214
-
215
- $settings = $this->tasks;
216
- if (is_array($settings) && !empty($settings)) {
217
- foreach ($settings as $task_name => $setting) {
218
-
219
- if ($setting['task_args']['next'] && $setting['task_args']['next'] < time()) {
220
- //if ($setting['task_args']['next'] && $_GET['force_backup']) {
221
- if ($setting['task_args']['url'] && $setting['task_args']['task_id'] && $setting['task_args']['site_key']) {
222
- //Check orphan task
223
- $check_data = array(
224
- 'task_name' => $task_name,
225
- 'task_id' => $setting['task_args']['task_id'],
226
- 'site_key' => $setting['task_args']['site_key']
227
- );
228
-
229
- $check = $this->validate_task($check_data, $setting['task_args']['url']);
230
-
231
- }
232
-
233
- $update = array(
234
- 'task_name' => $task_name,
235
- 'args' => $settings[$task_name]['task_args']
236
- );
237
-
238
-
239
- if($check != 'paused'){
240
- $update['time'] = time();
241
- }
242
-
243
- //Update task with next schedule
244
- $this->set_backup_task($update);
245
-
246
- if($check == 'paused'){
247
- continue;
248
- }
249
-
250
-
251
- $result = $this->backup($setting['task_args'], $task_name);
252
- $error = '';
253
- if (is_array($result) && array_key_exists('error', $result)) {
254
- $error = $result;
255
- $this->set_backup_task(array(
256
- 'task_name' => $task_name,
257
- 'args' => $settings[$task_name]['task_args'],
258
- 'error' => $error
259
- ));
260
- } else {
261
- $error = '';
262
- }
263
- break; //Only one backup per cron
264
- }
265
- }
266
- }
267
-
268
- }
269
 
270
-
271
- function task_now($task_name){
272
-
273
- $settings = $this->tasks;
274
- if(!array_key_exists($task_name,$settings)){
275
- return array('error' => $task_name." does not exist.");
276
- } else {
277
- $setting = $settings[$task_name];
278
- }
279
-
280
- $this->set_backup_task(array(
281
- 'task_name' => $task_name,
282
- 'args' => $settings[$task_name]['task_args'],
283
- 'time' => time()
284
- ));
285
-
286
- //Run backup
287
- $result = $this->backup($setting['task_args'], $task_name);
288
-
289
- //Check for error
290
- if (is_array($result) && array_key_exists('error', $result)) {
291
- $this->set_backup_task(array(
292
- 'task_name' => $task_name,
293
- 'args' => $settings[$task_name]['task_args'],
294
- 'error' => $result['error']
295
- ));
296
- return $result;
297
- } else {
298
- return $this->get_backup_stats();
299
- }
300
-
301
- }
302
-
303
  function delete_task_now($task_name){
 
 
 
 
304
  $tasks = $this->tasks;
305
- unset($tasks[$task_name]);
 
 
 
 
 
306
  $this->update_tasks($tasks);
307
  $this->cleanup();
308
 
@@ -310,7 +193,6 @@ function delete_task_now($task_name){
310
 
311
  }
312
 
313
-
314
  /*
315
  * If Task Name not set then it's manual backup
316
  * Backup args:
@@ -326,13 +208,7 @@ function delete_task_now($task_name){
326
  return false;
327
 
328
  extract($args); //extract settings
329
-
330
- //$adminHistoryID - admin panel history ID for backup task.
331
-
332
-
333
- //Try increase memory limit and execution time
334
- $this->set_memory();
335
-
336
  //Remove old backup(s)
337
  $removed = $this->remove_old_backups($task_name);
338
  if (is_array($removed) && isset($removed['error'])) {
@@ -345,181 +221,119 @@ function delete_task_now($task_name){
345
  if (!file_exists($new_file_path)) {
346
  if (!mkdir($new_file_path, 0755, true))
347
  return array(
348
- 'error' => 'Permission denied, make sure you have write permission to wp-content folder.'
349
  );
350
  }
351
 
352
  @file_put_contents($new_file_path . '/index.php', ''); //safe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
353
 
354
  //Prepare .zip file name
355
  $hash = md5(time());
356
  $label = $type ? $type : 'manual';
357
  $backup_file = $new_file_path . '/' . $this->site_name . '_' . $label . '_' . $what . '_' . date('Y-m-d') . '_' . $hash . '.zip';
358
- $backup_url = content_url() . '/infinitewp/backups/' . $this->site_name . '_' . $label . '_' . $what . '_' . date('Y-m-d') . '_' . $hash . '.zip';
359
 
360
  //Optimize tables?
361
  if (isset($optimize_tables) && !empty($optimize_tables)) {
362
  $this->optimize_tables();
363
  }
364
 
 
 
 
 
 
365
  //What to backup - db or full?
366
  if (trim($what) == 'db') {
367
- //Take database backup
368
- $this->update_status($task_name, 'db_dump');
369
- $GLOBALS['fail_safe_db'] = $this->tasks[$task_name]['task_args']['fail_safe_db'];
 
 
 
 
 
370
 
371
- $db_result = $this->backup_db();
372
- if ($db_result == false) {
 
 
373
  return array(
374
- 'error' => 'Failed to backup database.'
375
  );
376
- } else if (is_array($db_result) && isset($db_result['error'])) {
 
 
 
 
377
  return array(
378
- 'error' => $db_result['error']
379
  );
380
- } else {
381
- $this->update_status($task_name, 'db_dump', true);
382
- $this->update_status($task_name, 'db_zip');
383
-
384
- /*zip_backup_db*/
385
- $fail_safe_files = $this->tasks[$task_name]['task_args']['fail_safe_files'];
386
- $disable_comp = $this->tasks[$task_name]['task_args']['disable_comp'];
387
-
388
- if($fail_safe_files){
389
- $pcl_result = $this->fail_safe_pcl_db($backup_file,$fail_safe_files,$disable_comp);
390
- if(is_array($pcl_result) && isset($pcl_result['error'])){
391
- return $pcl_result;
392
- }
393
- }
394
- else{
395
- $comp_level = $disable_comp ? '-0' : '-1';
396
- chdir(IWP_BACKUP_DIR);
397
- $zip = $this->get_zip();
398
- $command = "$zip -q -r $comp_level $backup_file 'iwp_db'";
399
- iwp_mmb_print_flush('DB ZIP CMD: Start');
400
- ob_start();
401
- $result = $this->iwp_mmb_exec($command);
402
- ob_get_clean();
403
- iwp_mmb_print_flush('DB ZIP CMD Result: '.$result);
404
- iwp_mmb_print_flush('DB ZIP CMD: End');
405
- /*zip_backup_db */
406
- if(!$result){
407
- $zip_archive_db_result = false;
408
- if (class_exists("ZipArchive")) {
409
- $this->_log("DB zip, fallback to ZipArchive");
410
- iwp_mmb_print_flush('DB ZIP Archive: Start');
411
- $zip_archive_db_result = $this->zip_archive_backup_db($task_name, $db_result, $backup_file);
412
- iwp_mmb_print_flush('DB ZIP Archive: End');
413
- }
414
-
415
- if (!$zip_archive_db_result) {
416
- $pcl_result = $this->fail_safe_pcl_db($backup_file,$fail_safe_files,$disable_comp);
417
- if(is_array($pcl_result) && isset($pcl_result['error'])){
418
- return $pcl_result;
419
- }
420
- }
421
- }
422
- }
423
-
424
- @unlink($db_result);
425
- @unlink(IWP_BACKUP_DIR.'/iwp_db/index.php');
426
- @rmdir(IWP_DB_DIR);
427
- /*if (!$result) {
428
- return array(
429
- 'error' => 'Failed to zip database.'
430
- );
431
- }*///commented because of zipArchive
432
- $this->update_status($task_name, 'db_zip', true);
433
- }
434
- } elseif (trim($what) == 'full') {
435
- $content_backup = $this->backup_full($task_name, $backup_file, $exclude, $include);
436
  if (is_array($content_backup) && array_key_exists('error', $content_backup)) {
437
  return array(
438
- 'error' => $content_backup['error']
439
  );
440
  }
441
  }
442
-
 
443
  //Update backup info
444
  if ($task_name) {
445
  //backup task (scheduled)
 
446
  $backup_settings = $this->tasks;
447
  $paths = array();
448
- $size = round(filesize($backup_file) / 1024, 2);
449
 
450
  if ($size > 1000) {
451
  $paths['size'] = round($size / 1024, 2) . " MB";//Modified by IWP //Mb => MB
452
  } else {
453
  $paths['size'] = $size . 'KB';//Modified by IWP //Kb => KB
454
  }
 
 
 
455
 
456
- $paths['backup_name'] = $backup_settings[$task_name]['task_args']['backup_name'];
457
-
458
- if ($task_name != 'Backup Now') {
459
- if (!$backup_settings[$task_name]['task_args']['del_host_file']) {
460
- $paths['server'] = array(
461
- 'file_path' => $backup_file,
462
- 'file_url' => $backup_url
463
- );
464
- }
465
- } else {
466
- $paths['server'] = array(
467
  'file_path' => $backup_file,
468
- 'file_url' => $backup_url
469
- );
470
- }
471
-
472
-
473
- if (isset($backup_settings[$task_name]['task_args']['account_info']['iwp_ftp'])) {
474
- $paths['ftp'] = basename($backup_url);
475
- }
476
-
477
- if (isset($backup_settings[$task_name]['task_args']['account_info']['iwp_amazon_s3'])) {
478
- $paths['amazons3'] = basename($backup_url);
479
- }
480
-
481
- if (isset($backup_settings[$task_name]['task_args']['account_info']['iwp_dropbox'])) {
482
- $paths['dropbox'] = basename($backup_url);
483
- }
484
 
485
- if (isset($backup_settings[$task_name]['task_args']['account_info']['iwp_gdrive'])) {
486
- //$paths['gDrive'] = basename($backup_url);
487
- $paths['gDriveOrgFileName'] = basename($backup_url);
488
- }
489
 
490
- if (isset($backup_settings[$task_name]['task_args']['account_info']['iwp_email'])) {
491
- $paths['email'] = basename($backup_url);
492
- }
493
-
494
- $temp = $backup_settings[$task_name]['task_results'];
495
- $temp = @array_values($temp);
496
- $paths['time'] = time();
497
-
498
-
499
- //if ($task_name != 'Backup Now') {
500
- $paths['backhack_status'] = $temp[count($temp) - 1]['backhack_status'];
501
- //$paths['status'] = $temp[count($temp) - 1]['status'];
502
- $temp[count($temp) - 1] = $paths;
503
-
504
- /*
505
- } else {
506
- $temp[count($temp)] = $paths;
507
- }
508
- */
509
-
510
- $backup_settings[$task_name]['task_results'] = $temp;
511
- $this->update_tasks($backup_settings);
512
- //update_option('iwp_client_backup_tasks', $backup_settings);
513
- }
514
-
515
-
516
- if ($task_name != 'Backup Now') {
517
-
518
- if (isset($account_info['iwp_ftp']) && !empty($account_info['iwp_ftp'])) {
519
- $this->update_status($task_name, 'ftp');
520
- $account_info['iwp_ftp']['backup_file'] = $backup_file;
521
  iwp_mmb_print_flush('FTP upload: Start');
522
- $ftp_result = $this->ftp_backup($account_info['iwp_ftp']);
523
  iwp_mmb_print_flush('FTP upload: End');
524
  if ($ftp_result !== true && $del_host_file) {
525
  @unlink($backup_file);
@@ -528,15 +342,20 @@ function delete_task_now($task_name){
528
  if (is_array($ftp_result) && isset($ftp_result['error'])) {
529
  return $ftp_result;
530
  }
531
- $this->wpdb_reconnect();
532
- $this->update_status($task_name, 'ftp', true);
533
- }
 
534
 
535
- if (isset($account_info['iwp_amazon_s3']) && !empty($account_info['iwp_amazon_s3'])) {
536
- $this->update_status($task_name, 's3');
537
- $account_info['iwp_amazon_s3']['backup_file'] = $backup_file;
 
 
 
 
538
  iwp_mmb_print_flush('Amazon S3 upload: Start');
539
- $amazons3_result = $this->amazons3_backup($account_info['iwp_amazon_s3']);
540
  iwp_mmb_print_flush('Amazon S3 upload: End');
541
  if ($amazons3_result !== true && $del_host_file) {
542
  @unlink($backup_file);
@@ -544,15 +363,21 @@ function delete_task_now($task_name){
544
  if (is_array($amazons3_result) && isset($amazons3_result['error'])) {
545
  return $amazons3_result;
546
  }
547
- $this->wpdb_reconnect();
548
- $this->update_status($task_name, 's3', true);
 
 
549
  }
550
 
551
- if (isset($account_info['iwp_dropbox']) && !empty($account_info['iwp_dropbox'])) {
552
- $this->update_status($task_name, 'dropbox');
553
- $account_info['iwp_dropbox']['backup_file'] = $backup_file;
 
 
 
 
554
  iwp_mmb_print_flush('Dropbox upload: Start');
555
- $dropbox_result = $this->dropbox_backup($account_info['iwp_dropbox']);
556
  iwp_mmb_print_flush('Dropbox upload: End');
557
  if ($dropbox_result !== true && $del_host_file) {
558
  @unlink($backup_file);
@@ -561,15 +386,21 @@ function delete_task_now($task_name){
561
  if (is_array($dropbox_result) && isset($dropbox_result['error'])) {
562
  return $dropbox_result;
563
  }
564
- $this->wpdb_reconnect();
565
- $this->update_status($task_name, 'dropbox', true);
 
566
  }
567
- if (isset($account_info['iwp_gdrive']) && !empty($account_info['iwp_gdrive'])) {
 
568
 
569
  $this->update_status($task_name,'gDrive');
570
- $account_info['iwp_gdrive']['backup_file'] = $backup_file;
571
- iwp_mmb_print_flush('google Drive upload: Start');
572
- $gdrive_result = $this->google_drive_backup($account_info['iwp_gdrive']);
 
 
 
 
573
  iwp_mmb_print_flush('google Drive upload: End');
574
 
575
  if ($gdrive_result == false && $del_host_file) {
@@ -586,89 +417,113 @@ function delete_task_now($task_name){
586
  $this->update_status($task_name,'gDrive', true);
587
  unset($paths['server']);
588
  }
589
- if ($del_host_file) {
590
- @unlink($backup_file);
591
- }
592
-
593
- } //end additional
594
 
595
- $this->update_status($task_name,'finished',true);
596
-
597
- return $backup_url; //Return url to backup file
 
 
 
 
598
  }
599
 
600
-
601
- function backup_full($task_name, $backup_file, $exclude = array(), $include = array())
602
- {
603
-
604
- global $zip_errors;
605
- $sys = substr(PHP_OS, 0, 3);
606
-
607
- $this->update_status($task_name, 'db_dump');
608
- $GLOBALS['fail_safe_db'] = $this->tasks[$task_name]['task_args']['fail_safe_db'];
609
- $db_result = $this->backup_db();
610
-
611
- if ($db_result == false) {
612
- return array(
613
- 'error' => 'Failed to backup database.'
614
- );
615
- } else if (is_array($db_result) && isset($db_result['error'])) {
616
- return array(
617
- 'error' => $db_result['error']
618
- );
619
- }
620
-
621
- $this->update_status($task_name, 'db_dump', true);
622
- $this->update_status($task_name, 'db_zip');
623
-
624
- /*zip_backup_db*/
625
- $fail_safe_files = $this->tasks[$task_name]['task_args']['fail_safe_files'];
626
- $disable_comp = $this->tasks[$task_name]['task_args']['disable_comp'];
627
-
628
- if($fail_safe_files){
629
- $pcl_result = $this->fail_safe_pcl_db($backup_file,$fail_safe_files,$disable_comp);
630
- if(is_array($pcl_result) && isset($pcl_result['error'])){
631
- return $pcl_result;
632
- }
633
- }
634
- else{
635
- $comp_level = $disable_comp ? '-0' : '-1';
636
- $zip = $this->get_zip();
637
- iwp_mmb_print_flush('DB ZIP CMD: Start');
638
- //Add database file
639
- chdir(IWP_BACKUP_DIR);
640
- $command = "$zip -q -r $comp_level $backup_file 'iwp_db'";
641
- ob_start();
642
- $result = $this->iwp_mmb_exec($command);
643
- ob_get_clean();
644
- iwp_mmb_print_flush('DB ZIP CMD Result: '.$result);
645
- iwp_mmb_print_flush('DB ZIP CMD: End');
646
- /*zip_backup_db*/
647
-
648
- if(!$result){
649
- $zip_archive_db_result = false;
650
- if (class_exists("ZipArchive")) {
651
- iwp_mmb_print_flush('DB ZIP Archive: Start');
652
- $this->_log("DB zip, fallback to ZipArchive");
653
- $zip_archive_db_result = $this->zip_archive_backup_db($task_name, $db_result, $backup_file);
654
- iwp_mmb_print_flush('DB ZIP Archive: End');
655
- }
656
 
657
- if (!$zip_archive_db_result) {
658
- $pcl_result = $this->fail_safe_pcl_db($backup_file,$fail_safe_files,$disable_comp);
659
- if(is_array($pcl_result) && isset($pcl_result['error'])){
660
- return $pcl_result;
661
- }
662
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
663
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
664
  }
665
- @unlink($db_result);
666
- @unlink(IWP_BACKUP_DIR.'/iwp_db/index.php');
667
- @rmdir(IWP_DB_DIR);
668
 
669
- $this->update_status($task_name, 'db_zip', true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
670
 
 
 
671
 
 
 
 
 
 
 
 
 
 
 
 
672
  //Always remove backup folders
673
  $remove = array(
674
  trim(basename(WP_CONTENT_DIR)) . "/infinitewp/backups",
@@ -676,7 +531,51 @@ function delete_task_now($task_name){
676
  trim(basename(WP_CONTENT_DIR)) . "/cache",
677
  trim(basename(WP_CONTENT_DIR)) . "/w3tc"
678
  );
679
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
680
  $exclude = array_merge($exclude, $remove);
681
 
682
  //Exclude paths
@@ -713,14 +612,6 @@ function delete_task_now($task_name){
713
  $exclude_file_data = "-x".$exclude_file_data;
714
  }
715
 
716
- /* foreach ($remove as $data) {
717
- if(empty($data))
718
- continue;
719
- if ($sys == 'WIN')
720
- $exclude_data .= " $data/*.*";
721
- else
722
- $exclude_data .= " '$data/*'";
723
- }*/ //commented for pclzip modifications
724
 
725
  //Include paths by default
726
  $add = array(
@@ -754,90 +645,89 @@ function delete_task_now($task_name){
754
  $this->update_status($task_name, 'files_zip');
755
  chdir(ABSPATH);
756
 
 
 
757
  if($fail_safe_files){
758
  $pcl_result = $this->fail_safe_pcl_files($task_name, $backup_file, $exclude, $include, $fail_safe_files, $disable_comp, $add, $remove);
759
  if(is_array($pcl_result) && isset($pcl_result['error'])){
760
  return $pcl_result;
761
  }
762
  }
763
- else{
764
- $do_cmd_zip_alternative = false;
765
- @copy($backup_file, $backup_file.'_2');
766
-
767
- iwp_mmb_print_flush('Files ZIP CMD: Start');
768
- $command = "$zip -q -j $comp_level $backup_file .* * $exclude_file_data";
769
- ob_start();
770
- $result_f = $this->iwp_mmb_exec($command, false, true);
771
- ob_get_clean();
772
- iwp_mmb_print_flush('Files ZIP CMD: 1/2 over');
773
- if (!$result_f || $result_f == 18) { // disregard permissions error, file can't be accessed
774
- $command = "$zip -q -r $comp_level $backup_file $include_data $exclude_data";
775
- ob_start();
776
- $result_d = $this->iwp_mmb_exec($command, false, true);
777
- ob_get_clean();
778
- if ($result_d && $result_d != 18) {
779
- @unlink($backup_file);
780
- $do_cmd_zip_alternative = true;
781
-
782
-
783
- if($result_d > 0 && $result_d < 18){
784
- //return array(
785
- // 'error' => 'Failed to archive files (' . $zip_errors[$result_d] . ') .'
786
- // );
787
- iwp_mmb_print_flush('Files ZIP CMD: Failed to archive files (' . $zip_errors[$result_d] . ') .');
788
- }
789
- else{
790
- //return array(
791
- // 'error' => 'Failed to archive files.'
792
- //);
793
- iwp_mmb_print_flush('Files ZIP CMD: Failed to archive files.');
794
  }
795
- }
796
- }
797
-
798
- if(!$do_cmd_zip_alternative){//if FILE ZIP CMD successful
799
- @unlink($backup_file.'_2');
800
- }
801
-
802
- iwp_mmb_print_flush('Files ZIP CMD: End');
803
- if (($result_f && $result_f != 18) || ($do_cmd_zip_alternative)) {
804
 
805
- if($do_cmd_zip_alternative){
806
- @copy($backup_file.'_2', $backup_file);
807
  @unlink($backup_file.'_2');
808
  }
809
 
810
- $zip_archive_result = false;
811
- if (class_exists("ZipArchive")) {
812
- iwp_mmb_print_flush('Files ZIP Archive: Start');
813
- $this->_log("Files zip fallback to ZipArchive");
814
- $zip_archive_result = $this->zip_archive_backup($task_name, $backup_file, $exclude, $include);
815
- iwp_mmb_print_flush('Files ZIP Archive: End');
816
- }
817
-
818
-
819
- if (!$zip_archive_result) {
820
- $pcl_result = $this->fail_safe_pcl_files($task_name, $backup_file, $exclude, $include, $fail_safe_files, $disable_comp, $add, $remove);
821
- if(is_array($pcl_result) && isset($pcl_result['error'])){
822
- return $pcl_result;
 
 
 
 
 
 
 
 
 
823
  }
824
  }
825
- }
826
- }
827
 
828
  //Reconnect
829
  $this->wpdb_reconnect();
830
-
831
  $this->update_status($task_name, 'files_zip', true);
832
  return true;
833
  }
 
834
 
835
 
836
  function fail_safe_pcl_files($task_name, $backup_file, $exclude, $include, $fail_safe_files, $disable_comp, $add, $remove){ //Try pclZip
837
  //$this->back_hack($task_name, 'Files ZIP PCL: Start');
838
  iwp_mmb_print_flush('Files ZIP PCL: Start');
839
  if (!isset($archive)) {
840
- define('PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
841
  //require_once ABSPATH . '/wp-admin/includes/class-pclzip.php';
842
  require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
843
  $archive = new IWPPclZip($backup_file);
@@ -900,7 +790,7 @@ function delete_task_now($task_name){
900
  if (!$result) {
901
  @unlink($backup_file);
902
  return array(
903
- 'error' => 'Failed to zip files. pclZip error (' . $archive->error_code . '): .' . $archive->error_string
904
  );
905
  }
906
  //}
@@ -909,7 +799,7 @@ function delete_task_now($task_name){
909
  function fail_safe_pcl_db($backup_file,$fail_safe_files,$disable_comp){
910
  //$this->back_hack($task_name, 'DB ZIP PCL: Start');
911
  iwp_mmb_print_flush('DB ZIP PCL: Start');
912
- define('PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
913
  require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
914
  $archive = new IWPPclZip($backup_file);
915
 
@@ -934,7 +824,7 @@ function delete_task_now($task_name){
934
 
935
  if (!$result_db) {
936
  return array(
937
- 'error' => 'Failed to zip database. pclZip error (' . $archive->error_code . '): .' . $archive->error_string
938
  );
939
  }
940
  }
@@ -947,11 +837,12 @@ function delete_task_now($task_name){
947
  * @return bool is compress successful or not
948
  */
949
  function zip_archive_backup_db($task_name, $db_result, $backup_file) {
950
- $disable_comp = $this->tasks[$task_name]['task_args']['disable_comp'];
951
  if (!$disable_comp) {
952
  $this->_log("Compression is not supported by ZipArchive");
953
  }
954
  $zip = new ZipArchive();
 
955
  $result = $zip->open($backup_file, ZIPARCHIVE::OVERWRITE); // Tries to open $backup_file for acrhiving
956
  if ($result === true) {
957
  $result = $result && $zip->addFile(IWP_BACKUP_DIR.'/iwp_db/index.php', "iwp_db/index.php"); // Tries to add iwp_db/index.php to $backup_file
@@ -975,17 +866,24 @@ function delete_task_now($task_name){
975
  * @return array|bool true if successful or an array with error message if not
976
  */
977
  function zip_archive_backup($task_name, $backup_file, $exclude, $include, $overwrite = false) {
978
-
979
  $filelist = $this->get_backup_files($exclude, $include);
980
- $disable_comp = $this->tasks[$task_name]['task_args']['disable_comp'];
 
981
  if (!$disable_comp) {
982
  $this->_log("Compression is not supported by ZipArchive");
983
  }
 
984
  $zip = new ZipArchive();
 
985
  if ($overwrite) {
986
  $result = $zip->open($backup_file, ZipArchive::OVERWRITE); // Tries to open $backup_file for acrhiving
987
  } else {
988
- $result = $zip->open($backup_file); // Tries to open $backup_file for acrhiving
 
 
 
 
989
  }
990
  if ($result === true) {
991
  foreach ($filelist as $file) {
@@ -1028,9 +926,8 @@ function delete_task_now($task_name){
1028
  }
1029
  closedir($handle);
1030
  }
1031
-
1032
  $filelist = get_all_files_from_dir(ABSPATH, $exclude);
1033
-
1034
  return $filelist;
1035
  }
1036
 
@@ -1041,7 +938,7 @@ function delete_task_now($task_name){
1041
  if (!file_exists($db_folder)) {
1042
  if (!mkdir($db_folder, 0755, true))
1043
  return array(
1044
- 'error' => 'Error creating database backup folder (' . $db_folder . '). Make sure you have corrrect write permissions.'
1045
  );
1046
  $db_index_file = '<?php
1047
  global $old_url, $old_file_path;
@@ -1067,6 +964,7 @@ function delete_task_now($task_name){
1067
  global $wpdb;
1068
  $paths = $this->check_mysql_paths();
1069
  $brace = (substr(PHP_OS, 0, 3) == 'WIN') ? '"' : '';
 
1070
  $command0 = $wpdb->get_col('SHOW TABLES LIKE "'.$wpdb->base_prefix.'%"');
1071
  $wp_tables = join("\" \"",$command0);
1072
  $command = $brace . $paths['mysqldump'] . $brace . ' --force --host="' . DB_HOST . '" --user="' . DB_USER . '" --password="' . DB_PASSWORD . '" --add-drop-table --skip-lock-tables --extended-insert=FALSE "' . DB_NAME . '" "'.$wp_tables.'" > ' . $brace . $file . $brace;
@@ -1081,7 +979,7 @@ function delete_task_now($task_name){
1081
  return $result;
1082
  }
1083
 
1084
- if (filesize($file) == 0 || !is_file($file) || !$result) {
1085
  @unlink($file);
1086
  return false;
1087
  } else {
@@ -1102,11 +1000,12 @@ function delete_task_now($task_name){
1102
  }
1103
  $_count = 0;
1104
  $insert_sql = '';
 
1105
  $result = mysql_query( 'SHOW TABLES LIKE "'.$wpdb->base_prefix.'%"' );
1106
  if(!$result)
1107
  {
1108
  return array(
1109
- 'error' => 'MySQL '.mysql_error()." "
1110
  );
1111
  }
1112
  while( $row = mysql_fetch_row( $result ) ) {
@@ -1181,6 +1080,7 @@ function delete_task_now($task_name){
1181
  else{
1182
  iwp_mmb_print_flush('DB DUMP PHP Fail-safe: Start');
1183
  file_put_contents($file, '');//safe to reset any old data
 
1184
  $tables = $wpdb->get_results('SHOW TABLES LIKE "'.$wpdb->base_prefix.'%"', ARRAY_N);
1185
  foreach ($tables as $table) {
1186
 
@@ -1230,10 +1130,10 @@ function delete_task_now($task_name){
1230
  iwp_mmb_print_flush('DB DUMP PHP Fail-safe: End');
1231
  }
1232
 
1233
- if (filesize($file) == 0 || !is_file($file)) {
1234
  @unlink($file);
1235
  return array(
1236
- 'error' => 'Database backup failed. Try to enable MySQL dump on your server.'
1237
  );
1238
  }
1239
 
@@ -1344,14 +1244,13 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
1344
 
1345
  function restore($args)
1346
  {
1347
-
1348
- global $wpdb, $wp_filesystem;
1349
  if (empty($args)) {
1350
  return false;
1351
  }
1352
 
1353
  extract($args);
1354
- $this->set_memory();
1355
 
1356
  $unlink_file = true; //Delete file after restore
1357
 
@@ -1364,44 +1263,58 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
1364
  $backup_file = download_url($backup_url);
1365
  if (is_wp_error($backup_file)) {
1366
  return array(
1367
- 'error' => 'Unable to download backup file ('.$backup_file->get_error_message().')'
1368
  );
1369
  }
1370
  $what = 'full';
1371
  } else {
1372
- $tasks = $this->tasks;
1373
- $task = $tasks[$task_name];
1374
- if (isset($task['task_results'][$result_id]['server'])) {
1375
- $backup_file = $task['task_results'][$result_id]['server']['file_path'];
 
 
 
 
 
 
1376
  $unlink_file = false; //Don't delete file if stored on server
1377
 
1378
- } elseif (isset($task['task_results'][$result_id]['ftp'])) {
1379
- $ftp_file = $task['task_results'][$result_id]['ftp'];
1380
- $args = $task['task_args']['account_info']['iwp_ftp'];
 
 
1381
  $args['backup_file'] = $ftp_file;
 
1382
  iwp_mmb_print_flush('FTP download: Start');
1383
  $backup_file = $this->get_ftp_backup($args);
1384
  iwp_mmb_print_flush('FTP download: End');
 
1385
  if ($backup_file == false) {
1386
  return array(
1387
- 'error' => 'Failed to download file from FTP.'
1388
  );
1389
  }
1390
- } elseif (isset($task['task_results'][$result_id]['amazons3'])) {
1391
- $amazons3_file = $task['task_results'][$result_id]['amazons3'];
1392
- $args = $task['task_args']['account_info']['iwp_amazon_s3'];
 
1393
  $args['backup_file'] = $amazons3_file;
 
1394
  iwp_mmb_print_flush('Amazon S3 download: Start');
1395
  $backup_file = $this->get_amazons3_backup($args);
1396
  iwp_mmb_print_flush('Amazon S3 download: End');
 
1397
  if ($backup_file == false) {
1398
  return array(
1399
- 'error' => 'Failed to download file from Amazon S3.'
1400
  );
1401
  }
1402
- } elseif(isset($task['task_results'][$result_id]['dropbox'])){
1403
- $dropbox_file = $task['task_results'][$result_id]['dropbox'];
1404
- $args = $task['task_args']['account_info']['iwp_dropbox'];
 
1405
  $args['backup_file'] = $dropbox_file;
1406
  iwp_mmb_print_flush('Dropbox download: Start');
1407
  $backup_file = $this->get_dropbox_backup($args);
@@ -1409,36 +1322,32 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
1409
 
1410
  if ($backup_file == false) {
1411
  return array(
1412
- 'error' => 'Failed to download file from Dropbox.'
1413
  );
1414
  }
1415
  }
1416
- elseif(isset($task['task_results'][$result_id]['gDrive'])){
1417
- $gdrive_file = $task['task_results'][$result_id]['gDrive'];
1418
- $args = $task['task_args']['account_info']['iwp_gdrive'];
1419
  $args['backup_file'] = $gdrive_file;
1420
  iwp_mmb_print_flush('gDrive download: Start');
1421
  $backup_file = $this->get_google_drive_backup($args);
1422
  iwp_mmb_print_flush('gDrive download: End');
1423
-
1424
  if(is_array($backup_file) && array_key_exists('error', $backup_file))
1425
  {
1426
  return $backup_file;
1427
  }
1428
-
1429
  if ($backup_file == false) {
1430
  return array(
1431
  'error' => 'Failed to download file from gDrive.'
1432
  );
1433
  }
1434
- }
1435
-
1436
-
1437
- $what = $tasks[$task_name]['task_args']['what'];
1438
  }
1439
 
1440
-
1441
-
1442
  $this->wpdb_reconnect();
1443
 
1444
  /////////////////// dev ////////////////////////
@@ -1446,7 +1355,7 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
1446
 
1447
  if (!$this->is_server_writable()) {
1448
  return array(
1449
- 'error' => 'Failed, please add FTP details'
1450
  );
1451
  }
1452
 
@@ -1454,7 +1363,7 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
1454
  ob_start();
1455
  if (false === ($creds = request_filesystem_credentials($url, '', false, ABSPATH, null) ) ) {
1456
  return array(
1457
- 'error' => 'Unable to get file system credentials'
1458
  ); // stop processing here
1459
  }
1460
  ob_end_clean();
@@ -1462,7 +1371,7 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
1462
  if ( ! WP_Filesystem($creds, ABSPATH) ) {
1463
  //request_filesystem_credentials($url, '', true, false, null);
1464
  return array(
1465
- 'error' => 'Unable to initiate file system. Please check you have entered valid FTP credentials.'
1466
  ); // stop processing here
1467
  //return;
1468
  }
@@ -1480,7 +1389,7 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
1480
  $is_dir_created = mkdir($new_temp_folder);// new folder should be empty
1481
  if(!$is_dir_created){
1482
  return array(
1483
- 'error' => 'Unable to create a temporary directory.'
1484
  );
1485
  }
1486
 
@@ -1491,7 +1400,7 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
1491
  $remote_abspath = trailingslashit($remote_abspath);
1492
  }else{
1493
  return array(
1494
- 'error' => 'Unable to locate WP root directory using file system.'
1495
  );
1496
  }
1497
 
@@ -1510,7 +1419,7 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
1510
  if (!$wp_filesystem->copy($remote_abspath . 'wp-config.php', $remote_abspath . 'iwp-temp-wp-config.php', true)) {
1511
  if($unlink_file) @unlink($backup_file);
1512
  return array(
1513
- 'error' => 'Error creating wp-config. Please check your write permissions.'
1514
  );
1515
  }
1516
 
@@ -1529,17 +1438,22 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
1529
 
1530
  }
1531
 
1532
- $clone_options['iwp_client_backup_tasks'] = serialize(get_option('iwp_client_backup_tasks'));
1533
  $clone_options['iwp_client_notifications'] = serialize(get_option('iwp_client_notifications'));
1534
  $clone_options['iwp_client_pageview_alerts'] = serialize(get_option('iwp_client_pageview_alerts'));
1535
 
 
 
1536
 
1537
  } else {
 
1538
  $restore_options = array();
1539
- $restore_options['iwp_client_notifications'] = serialize(get_option('iwp_client_notifications'));
1540
- $restore_options['iwp_client_pageview_alerts'] = serialize(get_option('iwp_client_pageview_alerts'));
1541
- $restore_options['iwp_client_user_hit_count'] = serialize(get_option('iwp_client_user_hit_count'));
1542
- $restore_options['iwp_client_backup_tasks'] = serialize(get_option('iwp_client_backup_tasks'));
 
 
1543
  }
1544
 
1545
 
@@ -1562,7 +1476,8 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
1562
  require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
1563
  iwp_mmb_print_flush('ZIP Extract PCL: Start');
1564
  $archive = new IWPPclZip($backup_file);
1565
- $result = $archive->extract(PCLZIP_OPT_PATH, $new_temp_folder, PCLZIP_OPT_TEMP_FILE_THRESHOLD, 1);
 
1566
  iwp_mmb_print_flush('ZIP Extract PCL: End');
1567
  }
1568
  $this->wpdb_reconnect();
@@ -1573,7 +1488,7 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
1573
 
1574
  if (!$result) {
1575
  return array(
1576
- 'error' => 'Failed to unzip files. pclZip error (' . $archive->error_code . '): .' . $archive->error_string
1577
  );
1578
  }
1579
 
@@ -1581,7 +1496,7 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
1581
 
1582
  if (!$db_result) {
1583
  return array(
1584
- 'error' => 'Error restoring database.'
1585
  );
1586
  } else if(is_array($db_result) && isset($db_result['error'])){
1587
  return array(
@@ -1591,7 +1506,7 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
1591
 
1592
  } else {
1593
  return array(
1594
- 'error' => 'Backup file not found.'
1595
  );
1596
  }
1597
 
@@ -2020,34 +1935,11 @@ function iwp_mmb_direct_to_any_copy($source, $destination, $overwrite = false, $
2020
 
2021
  return $reqs;
2022
  }
2023
- /*
2024
- * SFTP custom function start here
2025
- */
2026
-
2027
- function iwp_sftp_mkdir($sftOpj,$dirStr) {
2028
-
2029
- $dirs = explode('/', preg_replace('#/(?=/)|/$#', '', $dirStr));
2030
- if (empty($dirs[0])) {
2031
- array_shift($dirs);
2032
- $dirs[0] = '/' . $dirs[0];
2033
- }
2034
- foreach($dirs as $dirlist) {
2035
- if (!empty($dirlist)) {
2036
- $sftOpj->mkdir($dirlist,'07777',true);
2037
- $sftOpj->chdir($dirlist);
2038
- }
2039
- }
2040
- }
2041
-
2042
- /*
2043
- * SFTP custom function end here
2044
- */
2045
 
2046
  function ftp_backup($args)
2047
  {
2048
  extract($args);
2049
  //Args: $ftp_username, $ftp_password, $ftp_hostname, $backup_file, $ftp_remote_folder, $ftp_site_folder
2050
-
2051
  if(isset($use_sftp) && $use_sftp==1) {
2052
  $port = $ftp_port ? $ftp_port : 22; //default port is 22
2053
  /*
@@ -2058,7 +1950,7 @@ function ftp_backup($args)
2058
  set_include_path(get_include_path() . PATH_SEPARATOR . $path);
2059
  include_once('Net/SFTP.php');
2060
 
2061
-
2062
  $sftp = new Net_SFTP($ftp_hostname, $port);
2063
  if(!$sftp) {
2064
  return array(
@@ -2092,71 +1984,76 @@ function ftp_backup($args)
2092
  }
2093
 
2094
  } else {
2095
- $port = $ftp_port ? $ftp_port : 21; //default port is 21
2096
- if ($ftp_ssl) {
2097
- if (function_exists('ftp_ssl_connect')) {
2098
- $conn_id = ftp_ssl_connect($ftp_hostname,$port);
2099
- if ($conn_id === false) {
2100
- return array(
2101
- 'error' => 'Failed to connect to ' . $ftp_hostname,
2102
- 'partial' => 1
2103
- );
2104
- }
2105
- } else {
2106
- return array(
2107
- 'error' => 'Your server doesn\'t support FTP SSL',
2108
- 'partial' => 1
2109
- );
2110
  }
2111
  } else {
2112
- if (function_exists('ftp_connect')) {
2113
- $conn_id = ftp_connect($ftp_hostname,$port);
2114
- if ($conn_id === false) {
2115
- return array(
2116
- 'error' => 'Failed to connect to ' . $ftp_hostname,
2117
- 'partial' => 1
2118
- );
2119
- }
2120
- } else {
2121
- return array(
2122
- 'error' => 'Your server doesn\'t support FTP',
2123
- 'partial' => 1
2124
- );
2125
- }
2126
- }
2127
- $login = @ftp_login($conn_id, $ftp_username, $ftp_password);
2128
- if ($login === false) {
2129
  return array(
2130
- 'error' => 'FTP login failed for ' . $ftp_username . ', ' . $ftp_password,
 
2131
  'partial' => 1
2132
  );
2133
  }
2134
-
2135
- if($ftp_passive){
2136
- @ftp_pasv($conn_id,true);
2137
- }
2138
-
2139
- @ftp_mkdir($conn_id, $ftp_remote_folder);
2140
- if ($ftp_site_folder) {
2141
- $ftp_remote_folder .= '/' . $this->site_name;
2142
- }
2143
- @ftp_mkdir($conn_id, $ftp_remote_folder);
2144
-
2145
- $upload = @ftp_put($conn_id, $ftp_remote_folder . '/' . basename($backup_file), $backup_file, FTP_BINARY);
2146
-
2147
- if ($upload === false) { //Try ascii
2148
- $upload = @ftp_put($conn_id, $ftp_remote_folder . '/' . basename($backup_file), $backup_file, FTP_ASCII);
2149
- }
2150
- @ftp_close($conn_id);
2151
-
2152
- if ($upload === false) {
2153
  return array(
2154
- 'error' => 'Failed to upload file to FTP. Please check your specified path.',
 
2155
  'partial' => 1
2156
  );
2157
  }
2158
  }
 
 
 
 
 
 
 
 
2159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2160
  return true;
2161
  }
2162
 
@@ -2164,8 +2061,6 @@ function ftp_backup($args)
2164
  {
2165
  extract($args);
2166
  //Args: $ftp_username, $ftp_password, $ftp_hostname, $backup_file, $ftp_remote_folder
2167
-
2168
-
2169
  if(isset($use_sftp) && $use_sftp==1) {
2170
  $port = $ftp_port ? $ftp_port : 22; //default port is 22
2171
  /*
@@ -2203,35 +2098,43 @@ function ftp_backup($args)
2203
  //SFTP library has automatic connection closed. So no need to call seperate connection close function
2204
 
2205
  } else {
2206
- $port = $ftp_port ? $ftp_port : 21; //default port is 21
2207
- if ($ftp_ssl && function_exists('ftp_ssl_connect')) {
2208
- $conn_id = ftp_ssl_connect($ftp_hostname,$port);
2209
- } else if (function_exists('ftp_connect')) {
2210
- $conn_id = ftp_connect($ftp_hostname,$port);
2211
- }
2212
-
2213
- if ($conn_id) {
2214
- $login = @ftp_login($conn_id, $ftp_username, $ftp_password);
2215
- if ($ftp_site_folder)
2216
- $ftp_remote_folder .= '/' . $this->site_name;
2217
-
2218
- if($ftp_passive){
2219
- @ftp_pasv($conn_id,true);
2220
- }
2221
-
2222
- $delete = ftp_delete($conn_id, $ftp_remote_folder . '/' . $backup_file);
2223
-
2224
- ftp_close($conn_id);
 
 
 
 
 
 
 
2225
  }
 
2226
  }
 
 
2227
  }
2228
 
2229
  function get_ftp_backup($args)
2230
  {
2231
  extract($args);
2232
  //Args: $ftp_username, $ftp_password, $ftp_hostname, $backup_file, $ftp_remote_folder
2233
-
2234
-
2235
  if(isset($use_sftp) && $use_sftp==1) {
2236
  $port = $ftp_port ? $ftp_port : 22; //default port is 22
2237
  /*
@@ -2277,42 +2180,40 @@ function ftp_backup($args)
2277
  }
2278
 
2279
  } else {
2280
- $port = $ftp_port ? $ftp_port : 21; //default port is 21
2281
- if ($ftp_ssl && function_exists('ftp_ssl_connect')) {
2282
- $conn_id = ftp_ssl_connect($ftp_hostname,$port);
2283
-
2284
- } else if (function_exists('ftp_connect')) {
2285
- $conn_id = ftp_connect($ftp_hostname,$port);
2286
- if ($conn_id === false) {
2287
- return false;
2288
- }
2289
- }
2290
- $login = @ftp_login($conn_id, $ftp_username, $ftp_password);
2291
- if ($login === false) {
2292
- return false;
2293
- }
2294
-
2295
- if ($ftp_site_folder)
2296
- $ftp_remote_folder .= '/' . $this->site_name;
2297
-
2298
- if($ftp_passive){
2299
- @ftp_pasv($conn_id,true);
2300
- }
2301
-
2302
- //$temp = ABSPATH . 'iwp_temp_backup.zip';
2303
- $temp = wp_tempnam('iwp_temp_backup.zip');
2304
-
2305
- $get = ftp_get($conn_id, $temp, $ftp_remote_folder . '/' . $backup_file, FTP_BINARY);
2306
- if ($get === false) {
2307
  return false;
2308
- } else {
2309
  }
2310
- ftp_close($conn_id);
2311
-
2312
- return $temp;
 
2313
  }
2314
 
 
 
2315
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2316
  }
2317
 
2318
 
@@ -2323,9 +2224,7 @@ function ftp_backup($args)
2323
 
2324
  require_once $GLOBALS['iwp_mmb_plugin_dir'] . '/lib/dropbox.php';
2325
 
2326
-
2327
- $dropbox = new IWP_Dropbox($consumer_key, $consumer_secret);
2328
-
2329
  $dropbox->setOAuthTokens($oauth_token, $oauth_token_secret);
2330
 
2331
  if ($dropbox_site_folder == true)
@@ -2347,7 +2246,8 @@ function ftp_backup($args)
2347
 
2348
  } else {
2349
  return array(
2350
- 'error' => 'Please connect your InfiniteWP panel with your Dropbox account.'
 
2351
  );
2352
  }
2353
 
@@ -2359,25 +2259,30 @@ function ftp_backup($args)
2359
 
2360
  require_once $GLOBALS['iwp_mmb_plugin_dir'] . '/lib/dropbox.php';
2361
 
2362
-
2363
- $dropbox = new IWP_Dropbox($consumer_key, $consumer_secret);
2364
-
2365
-
2366
  $dropbox->setOAuthTokens($oauth_token, $oauth_token_secret);
2367
 
2368
  if ($dropbox_site_folder == true)
2369
  $dropbox_destination .= '/' . $this->site_name;
2370
 
2371
- try {
2372
- $dropbox->fileopsDelete($dropbox_destination . '/' . $backup_file);
2373
- } catch (Exception $e) {
2374
- $this->_log($e->getMessage());
2375
- /*return array(
2376
- 'error' => $e->getMessage(),
2377
- 'partial' => 1
2378
- );*/
 
 
 
 
 
 
 
 
 
2379
  }
2380
-
2381
  //return true;
2382
  }
2383
 
@@ -2387,10 +2292,7 @@ function ftp_backup($args)
2387
 
2388
  require_once $GLOBALS['iwp_mmb_plugin_dir'] . '/lib/dropbox.php';
2389
 
2390
-
2391
- $dropbox = new IWP_Dropbox($consumer_key, $consumer_secret);
2392
-
2393
-
2394
  $dropbox->setOAuthTokens($oauth_token, $oauth_token_secret);
2395
 
2396
  if ($dropbox_site_folder == true)
@@ -2414,6 +2316,7 @@ function ftp_backup($args)
2414
  $this->_log($e->getMessage());
2415
  return array(
2416
  'error' => $e->getMessage(),
 
2417
  'partial' => 1
2418
  );
2419
  }
@@ -2424,23 +2327,39 @@ function ftp_backup($args)
2424
  {
2425
  if ($this->iwp_mmb_function_exists('curl_init')) {
2426
  require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/amazon_s3/sdk.class.php');
2427
-
2428
- extract($args);
2429
 
2430
  if ($as3_site_folder == true)
2431
- $as3_directory .= '/' . $this->site_name;
2432
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2433
  try{
2434
 
2435
  CFCredentials::set(array('development' => array('key' => trim($as3_access_key), 'secret' => trim(str_replace(' ', '+', $as3_secure_key)), 'default_cache_config' => '', 'certificate_authority' => true, 'use_ssl'=>false, 'ssl_verification'=>false), '@default' => 'development'));
2436
  $s3 = new AmazonS3();
2437
- $response = $s3->create_object($as3_bucket, $as3_directory . '/' . basename($backup_file), array('fileUpload' => $backup_file));
2438
  $upload = $response->isOk();
2439
  if($upload) {
2440
  return true;
2441
  } else {
2442
  return array(
2443
  'error' => 'Failed to upload to Amazon S3. Please check your details and set upload/delete permissions on your bucket.',
 
2444
  'partial' => 1
2445
  );
2446
  }
@@ -2449,17 +2368,20 @@ function ftp_backup($args)
2449
  $err = $e->getMessage();
2450
  if($err){
2451
  return array(
2452
- 'error' => 'Failed to upload to AmazonS3 ('.$err.').'
 
2453
  );
2454
  } else {
2455
  return array(
2456
- 'error' => 'Failed to upload to Amazon S3.'
 
2457
  );
2458
  }
2459
  }
2460
  } else {
2461
  return array(
2462
  'error' => 'You cannot use Amazon S3 on your server. Please enable curl first.',
 
2463
  'partial' => 1
2464
  );
2465
  }
@@ -2467,7 +2389,6 @@ function ftp_backup($args)
2467
 
2468
  function google_drive_backup($args = '', $uploadid = null, $offset = 0)
2469
  {
2470
-
2471
  require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php');
2472
  require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/MediaFileUpload.php');
2473
  require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Service/Drive.php');
@@ -2505,7 +2426,7 @@ function ftp_backup($args)
2505
  catch(Exception $e)
2506
  {
2507
  echo 'google Error ', $e->getMessage(), "\n";
2508
- return array("error" => $e->getMessage());
2509
  }
2510
 
2511
  $service = new IWP_google_Service_Drive($client);
@@ -2626,6 +2547,7 @@ function ftp_backup($args)
2626
  $media = new IWP_google_Http_MediaFileUpload($client, $request, 'application/zip', null, true, $upload_file_block_size);
2627
  $media->setFileSize(filesize($backup_file));
2628
 
 
2629
  $status = false;
2630
  $handle = fopen($backup_file, "rb");
2631
  fseek($handle, $fileSizeUploaded);
@@ -2662,7 +2584,7 @@ function ftp_backup($args)
2662
  catch (Exception $e)
2663
  {
2664
  echo "An error occurred: " . $e->getMessage();
2665
- return array("error" => $e->getMessage());
2666
  }
2667
 
2668
  /* if($del_host_file)
@@ -2670,10 +2592,9 @@ function ftp_backup($args)
2670
  unset($task_result['task_results'][$historyID]['server']);
2671
  @unlink($backup_file);
2672
  } */
2673
-
2674
- //$test_this_task = $this->get_this_tasks();
2675
 
2676
- //$tasksThere = unserialize($test_this_task['taskResults']);
2677
 
2678
  return $gDriveID;
2679
  }
@@ -2683,13 +2604,42 @@ function ftp_backup($args)
2683
  {
2684
  if ($this->iwp_mmb_function_exists('curl_init')) {
2685
  require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/amazon_s3/sdk.class.php');
2686
- extract($args);
 
 
 
 
 
 
 
 
2687
  if ($as3_site_folder == true)
2688
- $as3_directory .= '/' . $this->site_name;
 
 
 
 
 
 
 
 
 
2689
  try{
2690
  CFCredentials::set(array('development' => array('key' => trim($as3_access_key), 'secret' => trim(str_replace(' ', '+', $as3_secure_key)), 'default_cache_config' => '', 'certificate_authority' => true), '@default' => 'development'));
2691
  $s3 = new AmazonS3();
2692
- $s3->delete_object($as3_bucket, $as3_directory . '/' . $backup_file);
 
 
 
 
 
 
 
 
 
 
 
 
2693
  } catch (Exception $e){
2694
 
2695
  }
@@ -2705,7 +2655,24 @@ function ftp_backup($args)
2705
  CFCredentials::set(array('development' => array('key' => trim($as3_access_key), 'secret' => trim(str_replace(' ', '+', $as3_secure_key)), 'default_cache_config' => '', 'certificate_authority' => true), '@default' => 'development'));
2706
  $s3 = new AmazonS3();
2707
  if ($as3_site_folder == true)
2708
- $as3_directory .= '/' . $this->site_name;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2709
 
2710
  //$temp = ABSPATH . 'iwp_temp_backup.zip';
2711
  $temp = wp_tempnam('iwp_temp_backup.zip');
@@ -2744,18 +2711,18 @@ function ftp_backup($args)
2744
  catch(Exception $e)
2745
  {
2746
  echo 'google Error ', $e->getMessage(), "\n";
2747
- return array("error" => $e->getMessage());
2748
  }
2749
 
2750
  //downloading the file
2751
  $service = new IWP_google_Service_Drive($client);
2752
 
2753
- $file = $service->files->get($args['backup_file']);
2754
 
2755
  $downloadUrl = $file->getDownloadUrl();
2756
 
2757
  $temp = wp_tempnam('iwp_temp_backup.zip');
2758
-
2759
  try
2760
  {
2761
  if ($downloadUrl)
@@ -2770,18 +2737,18 @@ function ftp_backup($args)
2770
  return $temp;
2771
  } else {
2772
  // An error occurred.
2773
- return array("error" => "There is some error.");
2774
  }
2775
  }
2776
  else
2777
  {
2778
  // The file doesn't have any content stored on Drive.
2779
- return array("error" => "Google Drive file doesnt have nay content.");
2780
  }
2781
  }catch(Exception $e)
2782
  {
2783
  echo 'google Error ', $e->getMessage(), "\n";
2784
- return array("error" => $e->getMessage());
2785
  }
2786
 
2787
 
@@ -2789,8 +2756,6 @@ function ftp_backup($args)
2789
 
2790
  function remove_google_drive_backup($args)
2791
  {
2792
- /* require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/google-api/Google_Client.php');
2793
- require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/google-api/contrib/Google_DriveService.php'); */
2794
  require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php');
2795
  require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Service/Drive.php');
2796
 
@@ -2807,6 +2772,12 @@ function ftp_backup($args)
2807
 
2808
  $accessToken = $args['token'];
2809
  $refreshToken = $accessToken['refresh_token'];
 
 
 
 
 
 
2810
 
2811
  try
2812
  {
@@ -2815,22 +2786,23 @@ function ftp_backup($args)
2815
  catch(Exception $e)
2816
  {
2817
  echo 'google Error ', $e->getMessage(), "\n";
2818
- return array("error" => $e->getMessage());
2819
  }
2820
 
2821
  $service = new IWP_google_Service_Drive($client);
2822
 
2823
- try
2824
- {
2825
- echo "\n".'backup_file:'.$args['backup_file'];
2826
- $service->files->delete($args['backup_file']);
2827
- }
2828
- catch (Exception $e)
2829
  {
2830
- echo "\nAn error occurred: " . $e->getMessage();
2831
- return array("error" => $e->getMessage());
 
 
 
 
 
 
 
2832
  }
2833
-
2834
  }
2835
 
2836
  function schedule_next($type, $schedule)
@@ -2925,8 +2897,106 @@ function ftp_backup($args)
2925
 
2926
 
2927
  //Parse task arguments for info on IWP Admin Panel
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2928
  function get_backup_stats()
2929
- {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2930
  $stats = array();
2931
  $tasks = $this->tasks;
2932
  if (is_array($tasks) && !empty($tasks)) {
@@ -2945,87 +3015,88 @@ function ftp_backup($args)
2945
  }
2946
  }
2947
  return $stats;
2948
- }
 
 
2949
 
2950
-
2951
- function get_next_schedules()
2952
- {
2953
- $stats = array();
2954
- $tasks = $this->tasks;
2955
- if (is_array($tasks) && !empty($tasks)) {
2956
- foreach ($tasks as $task_name => $info) {
2957
- $stats[$task_name] = isset($info['task_args']['next']) ? $info['task_args']['next'] : array();
2958
- }
2959
- }
2960
- return $stats;
2961
- }
2962
-
2963
-
2964
  function remove_old_backups($task_name)
2965
  {
2966
- //Check for previous failed backups first
 
 
 
 
2967
  $this->cleanup();
2968
-
2969
  //Remove by limit
2970
- $backups = $this->tasks;
2971
- if ($task_name == 'Backup Now') {
2972
- $num = 0;
2973
- } else {
2974
- $num = 1;
2975
- }
2976
-
2977
-
2978
- if ((count($backups[$task_name]['task_results']) - $num) >= $backups[$task_name]['task_args']['limit']) {
2979
- //how many to remove ?
2980
- $remove_num = (count($backups[$task_name]['task_results']) - $num - $backups[$task_name]['task_args']['limit']) + 1;
2981
- for ($i = 0; $i < $remove_num; $i++) {
2982
- //Remove from the server
2983
- if (isset($backups[$task_name]['task_results'][$i]['server'])) {
2984
- @unlink($backups[$task_name]['task_results'][$i]['server']['file_path']);
2985
- }
2986
-
2987
- if (isset($backups[$task_name]['task_results'][$i]['ftp'])) {
2988
- $ftp_file = $backups[$task_name]['task_results'][$i]['ftp'];
2989
- $args = $backups[$task_name]['task_args']['account_info']['iwp_ftp'];
2990
- $args['backup_file'] = $ftp_file;
2991
- $this->remove_ftp_backup($args);
2992
- }
2993
-
2994
- if (isset($backups[$task_name]['task_results'][$i]['amazons3'])) {
2995
- $amazons3_file = $backups[$task_name]['task_results'][$i]['amazons3'];
2996
- $args = $backups[$task_name]['task_args']['account_info']['iwp_amazon_s3'];
2997
- $args['backup_file'] = $amazons3_file;
2998
- $this->remove_amazons3_backup($args);
2999
- }
3000
-
3001
- if (isset($backups[$task_name]['task_results'][$i]['dropbox']) && isset($backups[$task_name]['task_args']['account_info']['iwp_dropbox'])) {
3002
- //To do: dropbox remove
3003
- $dropbox_file = $backups[$task_name]['task_results'][$i]['dropbox'];
3004
- $args = $backups[$task_name]['task_args']['account_info']['iwp_dropbox'];
3005
- $args['backup_file'] = $dropbox_file;
3006
- $this->remove_dropbox_backup($args);
3007
- }
3008
 
3009
- if (isset($backups[$task_name]['task_results'][$i]['gDrive'])) {
3010
- $gdrive_file = $backups[$task_name]['task_results'][$i]['gDrive'];
3011
- $args = $backups[$task_name]['task_args']['account_info']['iwp_gdrive'];
3012
- $args['backup_file'] = $gdrive_file;
3013
- $this->remove_google_drive_backup($args);
 
 
 
 
 
 
 
 
3014
  }
3015
- //Remove database backup info
3016
- unset($backups[$task_name]['task_results'][$i]);
3017
-
3018
- } //end foreach
3019
-
3020
- if (is_array($backups[$task_name]['task_results']))
3021
- $backups[$task_name]['task_results'] = array_values($backups[$task_name]['task_results']);
3022
- else
3023
- $backups[$task_name]['task_results']=array();
3024
-
3025
- $this->update_tasks($backups);
3026
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3027
  return true;
3028
- }
3029
  }
3030
 
3031
  /**
@@ -3037,66 +3108,89 @@ function get_next_schedules()
3037
  {
3038
  if (empty($args))
3039
  return false;
 
 
 
 
3040
  extract($args);
3041
-
3042
- $tasks = $this->tasks;
3043
- $task = $tasks[$task_name];
3044
- $backups = $task['task_results'];
3045
- $backup = $backups[$result_id];
3046
-
 
 
 
3047
  if (isset($backup['server'])) {
3048
- @unlink($backup['server']['file_path']);
 
 
 
 
 
 
 
 
 
 
 
3049
  }
3050
 
3051
- /*
3052
- //IWP Remove starts here//IWP Remove ends here
3053
- */
3054
  //Remove from ftp
3055
  if (isset($backup['ftp'])) {
3056
  $ftp_file = $backup['ftp'];
3057
- $args = $tasks[$task_name]['task_args']['account_info']['iwp_ftp'];
3058
  $args['backup_file'] = $ftp_file;
3059
  $this->remove_ftp_backup($args);
3060
  }
3061
 
3062
  if (isset($backup['amazons3'])) {
3063
  $amazons3_file = $backup['amazons3'];
3064
- $args = $tasks[$task_name]['task_args']['account_info']['iwp_amazon_s3'];
3065
  $args['backup_file'] = $amazons3_file;
3066
  $this->remove_amazons3_backup($args);
3067
  }
3068
 
3069
  if (isset($backup['dropbox'])) {
3070
  $dropbox_file = $backup['dropbox'];
3071
- $args = $tasks[$task_name]['task_args']['account_info']['iwp_dropbox'];
3072
  $args['backup_file'] = $dropbox_file;
3073
  $this->remove_dropbox_backup($args);
3074
  }
3075
-
3076
  if (isset($backup['gDrive'])) {
3077
  $g_drive_file = $backup['gDrive'];
3078
- $args = $tasks[$task_name]['task_args']['account_info']['iwp_gdrive'];
3079
  $args['backup_file'] = $g_drive_file;
3080
  $this->remove_google_drive_backup($args);
3081
  }
3082
-
3083
- unset($backups[$result_id]);
3084
-
3085
- if (count($backups)) {
3086
- $tasks[$task_name]['task_results'] = $backups;
3087
- } else {
3088
- unset($tasks[$task_name]['task_results']);
3089
- }
3090
-
3091
- $this->update_tasks($tasks);
3092
- //update_option('iwp_client_backup_tasks', $tasks);
3093
  return true;
3094
 
3095
  }
3096
 
 
 
 
 
 
 
 
 
 
 
 
3097
  function cleanup()
3098
  {
3099
- $tasks = $this->tasks;
 
 
3100
  $backup_folder = WP_CONTENT_DIR . '/' . md5('iwp_mmb-client') . '/iwp_backups/';
3101
  $backup_folder_new = IWP_BACKUP_DIR . '/';
3102
  $files = glob($backup_folder . "*");
@@ -3134,10 +3228,23 @@ function get_next_schedules()
3134
  $results = array();
3135
  if (!empty($tasks)) {
3136
  foreach ((array) $tasks as $task) {
3137
- if (isset($task['task_results']) && count($task['task_results'])) {
 
 
3138
  foreach ($task['task_results'] as $backup) {
3139
  if (isset($backup['server'])) {
3140
- $results[] = $backup['server']['file_path'];
 
 
 
 
 
 
 
 
 
 
 
3141
  }
3142
  }
3143
  }
@@ -3153,77 +3260,110 @@ function get_next_schedules()
3153
  }
3154
  }
3155
  }
3156
-
3157
-
3158
 
3159
  return $deleted;
3160
  }
3161
 
 
3162
 
3163
- /*
3164
- */
3165
-
3166
- function validate_task($args, $url)
3167
- {
3168
- if (!class_exists('WP_Http')) {
3169
- include_once(ABSPATH . WPINC . '/class-http.php');
3170
- }
3171
- $params = array();
3172
- $params['body'] = $args;
3173
- $result = wp_remote_post($url, $params);
3174
- if (is_array($result) && $result['body'] == 'iwp_delete_task') {
3175
- //$tasks = $this->get_backup_settings();
3176
- $tasks = $this->tasks;
3177
- unset($tasks[$args['task_name']]);
3178
- $this->update_tasks($tasks);
3179
- $this->cleanup();
3180
- exit;
3181
- } elseif(is_array($result) && $result['body'] == 'iwp_pause_task'){
3182
- return 'paused';
3183
- }
3184
-
3185
- return 'ok';
3186
- }
3187
-
3188
- function update_status($task_name, $status, $completed = false)
3189
  {
3190
  /* Statuses:
3191
- 0 - Backup started
3192
- 1 - DB dump
3193
- 2 - DB ZIP
3194
- 3 - Files ZIP
3195
- 4 - Amazon S3
3196
- 5 - Dropbox
3197
- 6 - FTP
3198
- 7 - Email
3199
- 100 - Finished
3200
  */
3201
- //if ($task_name != 'Backup Now') {
3202
- $tasks = $this->tasks;
3203
- $index = count($tasks[$task_name]['task_results']) - 1;
3204
- //!is_array($tasks[$task_name]['task_results'][$index]['status']) &&
3205
- if (!is_array($tasks[$task_name]['task_results'][$index]['backhack_status'])) {
3206
- //$tasks[$task_name]['task_results'][$index]['status'] = array();
3207
- $tasks[$task_name]['task_results'][$index]['backhack_status'] = array();
3208
- }
3209
- $tasks[$task_name]['task_results'][$index]['backhack_status']['adminHistoryID'] = $GLOBALS['IWP_CLIENT_HISTORY_ID'];
3210
- if (!$completed) {
3211
- //$tasks[$task_name]['task_results'][$index]['status'][] = (int) $status * (-1);
3212
- $tasks[$task_name]['task_results'][$index]['backhack_status'][$status]['start'] = microtime(true);
3213
- } else {
3214
- $status_index = count($tasks[$task_name]['task_results'][$index]['status']) - 1;
3215
- //$tasks[$task_name]['task_results'][$index]['status'][$status_index] = abs($tasks[$task_name]['task_results'][$index]['status'][$status_index]);
3216
- $tasks[$task_name]['task_results'][$index]['backhack_status'][$status]['end'] = microtime(true);
3217
- }
3218
-
3219
- $this->update_tasks($tasks);
3220
- //update_option('iwp_client_backup_tasks',$tasks);
3221
- //}
 
 
 
 
 
 
 
 
3222
  }
3223
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3224
  function update_tasks($tasks)
3225
  {
3226
- $this->tasks = $tasks;
3227
  update_option('iwp_client_backup_tasks', $tasks);
3228
  }
3229
 
@@ -3254,15 +3394,7 @@ function get_next_schedules()
3254
  $wp_filesystem->put_contents($remote_abspath.'.htaccess', $file);
3255
  }
3256
  }
3257
-
3258
- function check_cron_remove(){
3259
- if(empty($this->tasks) || (count($this->tasks) == 1 && isset($this->tasks['Backup Now'])) ){
3260
- wp_clear_scheduled_hook('iwp_client_backup_tasks');
3261
- exit;
3262
- }
3263
- }
3264
-
3265
-
3266
  public function readd_tasks( $params = array() ){
3267
  global $iwp_mmb_core;
3268
 
@@ -3332,16 +3464,21 @@ if(!function_exists('get_all_files_from_dir')) {
3332
  * @return array List of all files in folder $path, exclude all files in $exclude array
3333
  */
3334
  function get_all_files_from_dir($path, $exclude = array()) {
 
3335
  if ($path[strlen($path) - 1] === "/") $path = substr($path, 0, -1);
3336
  global $directory_tree, $ignore_array;
3337
  $directory_tree = array();
3338
- foreach ($exclude as $file) {
3339
- if (!in_array($file, array('.', '..'))) {
3340
- if ($file[0] === "/") $path = substr($file, 1);
3341
- $ignore_array[] = "$path/$file";
 
 
 
3342
  }
3343
  }
3344
  get_all_files_from_dir_recursive($path);
 
3345
  return $directory_tree;
3346
  }
3347
  }
@@ -3355,19 +3492,23 @@ if (!function_exists('get_all_files_from_dir_recursive')) {
3355
  * @param string $path Relative or absolute path to folder
3356
  * @return void
3357
  */
3358
- function get_all_files_from_dir_recursive($path) {
3359
  if ($path[strlen($path) - 1] === "/") $path = substr($path, 0, -1);
3360
  global $directory_tree, $ignore_array;
 
 
 
 
3361
  $directory_tree_temp = array();
3362
  $dh = @opendir($path);
3363
 
3364
  while (false !== ($file = @readdir($dh))) {
3365
- if (!in_array($file, array('.', '..'))) {
3366
- if (!in_array("$path/$file", $ignore_array)) {
3367
- if (!is_dir("$path/$file")) {
3368
- $directory_tree[] = "$path/$file";
3369
- } else {
3370
- get_all_files_from_dir_recursive("$path/$file");
3371
  }
3372
  }
3373
  }
1
  <?php
2
+
3
  /************************************************************
4
  * This plugin was modified by Revmakx *
5
  * Copyright (c) 2012 Revmakx *
16
  * Copyright (c) 2011 Prelovac Media
17
  * www.prelovac.com
18
  **************************************************************/
19
+
20
+ if(!defined('IWP_BACKUP_DIR')){
21
  define('IWP_BACKUP_DIR', WP_CONTENT_DIR . '/infinitewp/backups');
22
+ }
23
+
24
+ if(!defined('IWP_DB_DIR')){
25
  define('IWP_DB_DIR', IWP_BACKUP_DIR . '/iwp_db');
26
+ }
27
+
28
+ if(!defined('PCLZIP_TEMPORARY_DIR')){
29
+ define('PCLZIP_TEMPORARY_DIR', WP_CONTENT_DIR . '/infinitewp/temp/');
30
+ }
31
 
32
  $zip_errors = array(
33
  'No error',
71
  );
72
 
73
 
74
+ class IWP_MMB_Backup_Singlecall extends IWP_MMB_Core
75
  {
76
  var $site_name;
77
  var $statuses;
97
  'files_zip' => 3,
98
  'finished' => 100
99
  );
100
+
101
+
102
+
103
  }
104
+ function set_resource_limit()
105
  {
106
  $changed = array('execution_time' => 0, 'memory_limit' => 0);
107
  @ignore_user_abort(true);
108
+
109
+ // $memory_limit = trim(ini_get('memory_limit'));
110
+ // $last = strtolower(substr($memory_limit, -1));
111
+ //
112
+ // if($last == 'g')
113
+ // $memory_limit = ((int) $memory_limit)*1024;
114
+ // elseif($last == 'm')
115
+ // $memory_limit = (int) $memory_limit;
116
+ // elseif($last == 'k')
117
+ // $memory_limit = ((int) $memory_limit)/1024;
118
+ //
119
+ // if ( $memory_limit < 384 ) {
120
+ // @ini_set('memory_limit', '384M');
121
+ // $changed['memory_limit'] = 1;
122
+ // }
123
+
124
+ @ini_set('memory_limit', -1);
125
+ $changed['memory_limit'] = 1;
126
 
127
  if ( (int) @ini_get('max_execution_time') < 1200 ) {
128
  @ini_set('max_execution_time', 1200);//twenty minutes
133
  return $changed;
134
 
135
  }
136
+
137
+ /*function get_backup_settings()
138
  {
139
  $backup_settings = get_option('iwp_client_backup_tasks');
140
  if (!empty($backup_settings))
141
  return $backup_settings;
142
  else
143
  return false;
144
+ }*/
145
 
146
+ function set_backup_task($params){
147
+ if (!empty($params)) {
 
 
148
 
149
+ $this->statusLog($historyID, array('stage' => 'verification', 'status' => 'processing', 'statusMsg' => 'verificationInitiated'), $params);
150
+
151
+ $this->set_resource_limit();
152
+
153
+ $this->tasks = $this->get_this_tasks('requestParams');
154
+
155
+ extract($params);
156
+
157
+ //if ($task_name == 'Backup Now') {
158
+
159
+ $result = $this->backup($args, $task_name);
160
+
161
+ $backup_settings = $this->get_this_tasks();
162
+
163
+ if (is_array($result) && array_key_exists('error', $result)) {
164
+ $return = $result;
165
+ } else {
166
+ $return = unserialize($backup_settings['taskResults']);
167
  }
168
+ //}
169
+
170
+ return $return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
171
  }
172
 
 
 
173
  return false;
174
  }
175
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  function delete_task_now($task_name){
178
+ global $wpdb;
179
+
180
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
181
+
182
  $tasks = $this->tasks;
183
+ //unset($tasks[$task_name]);
184
+
185
+
186
+ $delete_query = "DELETE FROM ".$table_name." WHERE taskName = '".$task_name."' ";
187
+ $deleteRes = $wpdb->query($delete_query);
188
+
189
  $this->update_tasks($tasks);
190
  $this->cleanup();
191
 
193
 
194
  }
195
 
 
196
  /*
197
  * If Task Name not set then it's manual backup
198
  * Backup args:
208
  return false;
209
 
210
  extract($args); //extract settings
211
+
 
 
 
 
 
 
212
  //Remove old backup(s)
213
  $removed = $this->remove_old_backups($task_name);
214
  if (is_array($removed) && isset($removed['error'])) {
221
  if (!file_exists($new_file_path)) {
222
  if (!mkdir($new_file_path, 0755, true))
223
  return array(
224
+ 'error' => 'Permission denied, make sure you have write permission to wp-content folder.', 'error_code' => 'permission_denied_wpcontent_folder'
225
  );
226
  }
227
 
228
  @file_put_contents($new_file_path . '/index.php', ''); //safe
229
+
230
+ //pclzip temp folder creation
231
+
232
+ if(!(file_exists(PCLZIP_TEMPORARY_DIR) && is_dir(PCLZIP_TEMPORARY_DIR)))
233
+ {
234
+ $mkdir = @mkdir(PCLZIP_TEMPORARY_DIR, 0755, true);
235
+ if(!$mkdir){
236
+ return array('error' => 'Error creating database backup folder (' . PCLZIP_TEMPORARY_DIR . '). Make sure you have corrrect write permissions.');
237
+ }
238
+ }
239
+ if(is_writable(PCLZIP_TEMPORARY_DIR))
240
+ {
241
+ @file_put_contents(PCLZIP_TEMPORARY_DIR . '/index.php', ''); //safe
242
+ }
243
+ else
244
+ {
245
+ $chmod = chmod(PCLZIP_TEMPORARY_DIR, 777);
246
+ if(!is_writable(PCLZIP_TEMPORARY_DIR)){
247
+ return array('error' => PCLZIP_TEMPORARY_DIR.' directory is not writable. Please set 755 or 777 file permission and try again.');
248
+ }
249
+ }
250
 
251
  //Prepare .zip file name
252
  $hash = md5(time());
253
  $label = $type ? $type : 'manual';
254
  $backup_file = $new_file_path . '/' . $this->site_name . '_' . $label . '_' . $what . '_' . date('Y-m-d') . '_' . $hash . '.zip';
255
+ $backup_url = content_url() . '/infinitewp/backups/' . $this->site_name . '_' . $label . '_' . $what . '_' . date('Y-m-d') . '_' . $hash . '.zip';
256
 
257
  //Optimize tables?
258
  if (isset($optimize_tables) && !empty($optimize_tables)) {
259
  $this->optimize_tables();
260
  }
261
 
262
+ $exclude_file_size = $this->tasks['args']['exclude_file_size'];
263
+ $exclude_extensions = $this->tasks['args']['exclude_extensions'];
264
+ $disable_comp = $this->tasks['args']['disable_comp'];
265
+ $comp_level = $disable_comp ? '-0' : '-1';
266
+
267
  //What to backup - db or full?
268
  if (trim($what) == 'db') {
269
+
270
+ $db_backup = $this->backup_db_alone($task_name, $backup_file, $comp_level);
271
+
272
+ if (is_array($db_backup) && array_key_exists('error', $db_backup)) {
273
+ return array(
274
+ 'error' => $db_backup['error'], 'error_code' => $db_backup['error_code']
275
+ );
276
+ }
277
 
278
+ }
279
+ elseif(trim($what) == 'files'){
280
+ $content_backup = $this->backup_files_alone($task_name, $backup_file, $exclude, $include, $comp_level, $exclude_file_size, $exclude_extensions);
281
+ if (is_array($content_backup) && array_key_exists('error', $content_backup)) {
282
  return array(
283
+ 'error' => $content_backup['error'], 'error_code' => $content_backup['error_code']
284
  );
285
+ }
286
+ }
287
+ elseif (trim($what) == 'full') {
288
+ $db_backup = $this->backup_db_alone($task_name, $backup_file, $comp_level);
289
+ if (is_array($db_backup) && array_key_exists('error', $db_backup)) {
290
  return array(
291
+ 'error' => $db_backup['error'], 'error_code' => $db_backup['error_code']
292
  );
293
+ }
294
+ $content_backup = $this->backup_files_alone($task_name, $backup_file, $exclude, $include, $comp_level, $exclude_file_size, $exclude_extensions);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295
  if (is_array($content_backup) && array_key_exists('error', $content_backup)) {
296
  return array(
297
+ 'error' => $content_backup['error'], 'error_code' => $content_backup['error_code']
298
  );
299
  }
300
  }
301
+
302
+
303
  //Update backup info
304
  if ($task_name) {
305
  //backup task (scheduled)
306
+
307
  $backup_settings = $this->tasks;
308
  $paths = array();
309
+ $size = round(iwp_mmb_get_file_size($backup_file) / 1024, 2);
310
 
311
  if ($size > 1000) {
312
  $paths['size'] = round($size / 1024, 2) . " MB";//Modified by IWP //Mb => MB
313
  } else {
314
  $paths['size'] = $size . 'KB';//Modified by IWP //Kb => KB
315
  }
316
+
317
+ $paths['backup_name'] = $backup_settings['args']['backup_name'];
318
+ $paths['mechanism'] = 'singleCall';
319
 
320
+ $paths['server'] = array(
 
 
 
 
 
 
 
 
 
 
321
  'file_path' => $backup_file,
322
+ 'file_url' => $backup_url);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
323
 
324
+ $paths['time'] = time();
325
+ $paths['adminHistoryID'] = $GLOBALS['IWP_CLIENT_HISTORY_ID']; //['adminHistoryID'] = $GLOBALS['IWP_CLIENT_HISTORY_ID'];
 
 
326
 
327
+
328
+ if (isset($backup_settings['account_info']['iwp_ftp'])) {
329
+
330
+ $this->update_status($task_name,'ftp');
331
+
332
+ $paths['ftp'] = basename($backup_url);
333
+
334
+ $backup_settings['account_info']['iwp_ftp']['backup_file'] = $backup_file;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
335
  iwp_mmb_print_flush('FTP upload: Start');
336
+ $ftp_result = $this->ftp_backup($backup_settings['account_info']['iwp_ftp']);
337
  iwp_mmb_print_flush('FTP upload: End');
338
  if ($ftp_result !== true && $del_host_file) {
339
  @unlink($backup_file);
342
  if (is_array($ftp_result) && isset($ftp_result['error'])) {
343
  return $ftp_result;
344
  }
345
+ $this->update_status($task_name,'ftp', true);
346
+
347
+ unset($paths['server']);
348
+ }
349
 
350
+ if (isset($backup_settings['account_info']['iwp_amazon_s3'])) {
351
+
352
+ $this->update_status($task_name,'amazon_s3');
353
+
354
+ $paths['amazons3'] = basename($backup_url);
355
+
356
+ $backup_settings['account_info']['iwp_amazon_s3']['backup_file'] = $backup_file;
357
  iwp_mmb_print_flush('Amazon S3 upload: Start');
358
+ $amazons3_result = $this->amazons3_backup($backup_settings['account_info']['iwp_amazon_s3']);
359
  iwp_mmb_print_flush('Amazon S3 upload: End');
360
  if ($amazons3_result !== true && $del_host_file) {
361
  @unlink($backup_file);
363
  if (is_array($amazons3_result) && isset($amazons3_result['error'])) {
364
  return $amazons3_result;
365
  }
366
+
367
+ $this->update_status($task_name,'amazon_s3', true);
368
+
369
+ unset($paths['server']);
370
  }
371
 
372
+ if (isset($backup_settings['account_info']['iwp_dropbox'])) {
373
+
374
+ $this->update_status($task_name,'dropbox');
375
+
376
+ $paths['dropbox'] = basename($backup_url);
377
+
378
+ $backup_settings['account_info']['iwp_dropbox']['backup_file'] = $backup_file;
379
  iwp_mmb_print_flush('Dropbox upload: Start');
380
+ $dropbox_result = $this->dropbox_backup($backup_settings['account_info']['iwp_dropbox']);
381
  iwp_mmb_print_flush('Dropbox upload: End');
382
  if ($dropbox_result !== true && $del_host_file) {
383
  @unlink($backup_file);
386
  if (is_array($dropbox_result) && isset($dropbox_result['error'])) {
387
  return $dropbox_result;
388
  }
389
+
390
+ $this->update_status($task_name,'dropbox', true);
391
+ unset($paths['server']);
392
  }
393
+
394
+ if (isset($backup_settings['account_info']['iwp_gdrive'])) {
395
 
396
  $this->update_status($task_name,'gDrive');
397
+
398
+ $paths['gDrive'] = basename($backup_url);
399
+
400
+
401
+ $backup_settings['account_info']['iwp_gdrive']['backup_file'] = $backup_file;
402
+ iwp_mmb_print_flush('google Drive upload: Start');
403
+ $gdrive_result = $this->google_drive_backup($backup_settings['account_info']['iwp_gdrive']);
404
  iwp_mmb_print_flush('google Drive upload: End');
405
 
406
  if ($gdrive_result == false && $del_host_file) {
417
  $this->update_status($task_name,'gDrive', true);
418
  unset($paths['server']);
419
  }
420
+
421
+ }
 
 
 
422
 
423
+ if ($del_host_file) {
424
+ @unlink($backup_file);
425
+ }
426
+
427
+ $this->update_status($task_name,'finished',true, $paths);
428
+
429
+ return $backup_url;
430
  }
431
 
432
+ function backup_db_alone($task_name, $backup_file, $comp_level){
433
+
434
+ //Take database backup
435
+ $this->update_status($task_name, 'db_dump');
436
+ //$this->statusLog();
437
+ $GLOBALS['fail_safe_db'] = $this->tasks['args']['fail_safe_db'];
438
+
439
+ $db_result = $this->backup_db();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
440
 
441
+ if ($db_result == false) {
442
+ return array(
443
+ 'error' => 'Failed to backup database.', 'error_code' => 'backup_database_failed'
444
+ );
445
+ } else if (is_array($db_result) && isset($db_result['error'])) {
446
+ return array(
447
+ 'error' => $db_result['error'], 'error_code' => $db_result['error_code']
448
+ );
449
+ } else {
450
+ $this->update_status($task_name, 'db_dump', true);
451
+ //$this->statusLog();
452
+
453
+ $this->update_status($task_name, 'db_zip');
454
+ //$this->statusLog();
455
+
456
+ /*zip_backup_db*/
457
+ $fail_safe_db = $this->tasks['args']['fail_safe_db'];
458
+ $disable_comp = $this->tasks['args']['disable_comp'];
459
+
460
+ if($fail_safe_db){
461
+ $pcl_result = $this->fail_safe_pcl_db($backup_file,$fail_safe_db,$disable_comp);
462
+ if(is_array($pcl_result) && isset($pcl_result['error'])){
463
+ return $pcl_result;
464
  }
465
+ }
466
+ else{
467
+ chdir(IWP_BACKUP_DIR);
468
+ $zip = $this->get_zip();
469
+ $command = "$zip -q -r $comp_level $backup_file 'iwp_db'";
470
+ iwp_mmb_print_flush('DB ZIP CMD: Start');
471
+ ob_start();
472
+ $result = $this->iwp_mmb_exec($command);
473
+ ob_get_clean();
474
+ iwp_mmb_print_flush('DB ZIP CMD Result: '.$result);
475
+ iwp_mmb_print_flush('DB ZIP CMD: End');
476
+ /*zip_backup_db */
477
+ if(!$result){
478
+ $zip_archive_db_result = false;
479
+ if (class_exists("ZipArchive")) {
480
+ $this->_log("DB zip, fallback to ZipArchive");
481
+ iwp_mmb_print_flush('DB ZIP Archive: Start');
482
+ $zip_archive_db_result = $this->zip_archive_backup_db($task_name, $db_result, $backup_file);
483
+ iwp_mmb_print_flush('DB ZIP Archive Result: '.$zip_archive_db_result);
484
+ iwp_mmb_print_flush('DB ZIP Archive: End');
485
  }
 
 
 
486
 
487
+ if (!$zip_archive_db_result) {
488
+ $pcl_result = $this->fail_safe_pcl_db($backup_file,$fail_safe_db,$disable_comp);
489
+ if(is_array($pcl_result) && isset($pcl_result['error'])){
490
+ return $pcl_result;
491
+ }
492
+ }
493
+ }
494
+ }
495
+
496
+ @unlink($db_result);
497
+ @unlink(IWP_BACKUP_DIR.'/iwp_db/index.php');
498
+ @rmdir(IWP_DB_DIR);
499
+
500
+ $this->update_status($task_name, 'db_zip', true);
501
+ //$this->statusLog();
502
+
503
+ return true;
504
+ }
505
+
506
+ }
507
+
508
+
509
+
510
+ function backup_files_alone($task_name, $backup_file, $exclude = array(), $include = array(), $comp_level = 0, $exclude_file_size = 0, $exclude_extensions = "")
511
+ {
512
 
513
+ global $zip_errors;
514
+ $sys = substr(PHP_OS, 0, 3);
515
 
516
+ if(empty($exclude_extensions))
517
+ {
518
+ $exclude_extensions = array();
519
+ }
520
+ else
521
+ {
522
+ $exclude_extensions_array = explode(",",$exclude_extensions);
523
+ $exclude_extensions = array();
524
+ $exclude_extensions = $exclude_extensions_array;
525
+ }
526
+
527
  //Always remove backup folders
528
  $remove = array(
529
  trim(basename(WP_CONTENT_DIR)) . "/infinitewp/backups",
531
  trim(basename(WP_CONTENT_DIR)) . "/cache",
532
  trim(basename(WP_CONTENT_DIR)) . "/w3tc"
533
  );
534
+
535
+ //removing files which are larger than the specified size
536
+ //Note: in multicall the exclude process is done on pclzip.
537
+ if((!empty($exclude_file_size))||(!empty($exclude_extensions)))
538
+ {
539
+ //removing files which are larger than the specified size
540
+ $total_files_array = get_all_files_from_dir(ABSPATH, $remove);
541
+ $files_excluded_by_size = array();
542
+ foreach($total_files_array as $key => $value)
543
+ {
544
+ $this_base_name = basename($value);
545
+ $skip_after_ext = false;
546
+ //file extension based exclude
547
+ if(is_array($exclude_extensions) && (!empty($exclude_extensions)))
548
+ {
549
+ foreach($exclude_extensions as $ext)
550
+ {
551
+ $this_pos = strrpos($this_base_name, $ext);
552
+ if($this_pos !== false)
553
+ {
554
+ if(substr($this_base_name, $this_pos) == $ext)
555
+ {
556
+ $files_excluded_by_size[] = substr($value, strlen(ABSPATH));
557
+ $skip_after_ext = true; //to skip the file exclude by size
558
+ break;
559
+ }
560
+ }
561
+ }
562
+ }
563
+ if($skip_after_ext)
564
+ {
565
+ continue;
566
+ }
567
+ //file size based exclude
568
+ if(!empty($exclude_file_size))
569
+ {
570
+ if(iwp_mmb_get_file_size($value) >= $exclude_file_size*1024*1024)
571
+ {
572
+ $files_excluded_by_size[] = substr($value, strlen(ABSPATH));
573
+ }
574
+ }
575
+ }
576
+ $remove = array_merge($remove, $files_excluded_by_size);
577
+ }
578
+
579
  $exclude = array_merge($exclude, $remove);
580
 
581
  //Exclude paths
612
  $exclude_file_data = "-x".$exclude_file_data;
613
  }
614
 
 
 
 
 
 
 
 
 
615
 
616
  //Include paths by default
617
  $add = array(
645
  $this->update_status($task_name, 'files_zip');
646
  chdir(ABSPATH);
647
 
648
+ $fail_safe_files = $this->tasks['args']['fail_safe_files'];
649
+
650
  if($fail_safe_files){
651
  $pcl_result = $this->fail_safe_pcl_files($task_name, $backup_file, $exclude, $include, $fail_safe_files, $disable_comp, $add, $remove);
652
  if(is_array($pcl_result) && isset($pcl_result['error'])){
653
  return $pcl_result;
654
  }
655
  }
656
+ else
657
+ {
658
+ $do_cmd_zip_alternative = false;
659
+ @copy($backup_file, $backup_file.'_2');
660
+
661
+ iwp_mmb_print_flush('Files ZIP CMD: Start');
662
+ $command = "$zip -q -j $comp_level $backup_file .* * $exclude_file_data";
663
+ ob_start();
664
+ $result_f = $this->iwp_mmb_exec($command, false, true);
665
+ ob_get_clean();
666
+ iwp_mmb_print_flush('Files ZIP CMD Result: '.$result_f);
667
+ iwp_mmb_print_flush('Files ZIP CMD: 1/2 over');
668
+ if (!$result_f || $result_f == 18) { // disregard permissions error, file can't be accessed
669
+ $command = "$zip -q -r $comp_level $backup_file $include_data $exclude_data";
670
+ ob_start();
671
+ $result_d = $this->iwp_mmb_exec($command, false, true);
672
+ ob_get_clean();
673
+ if ($result_d && $result_d != 18) {
674
+ @unlink($backup_file);
675
+ $do_cmd_zip_alternative = true;
676
+
677
+
678
+ if($result_d > 0 && $result_d < 18){
679
+ iwp_mmb_print_flush('Files ZIP CMD: Failed to archive files (' . $zip_errors[$result_d] . ') .');
680
+ }
681
+ else{
682
+ iwp_mmb_print_flush('Files ZIP CMD: Failed to archive files.');
683
+ }
 
 
 
684
  }
685
+ }
 
 
 
 
 
 
 
 
686
 
687
+ if(!$do_cmd_zip_alternative){//if FILE ZIP CMD successful
 
688
  @unlink($backup_file.'_2');
689
  }
690
 
691
+ iwp_mmb_print_flush('Files ZIP CMD: End');
692
+ if (($result_f && $result_f != 18) || ($do_cmd_zip_alternative)) {
693
+
694
+ if($do_cmd_zip_alternative){
695
+ @copy($backup_file.'_2', $backup_file);
696
+ @unlink($backup_file.'_2');
697
+ }
698
+
699
+ $zip_archive_result = false;
700
+ if (class_exists("ZipArchive")) {
701
+ iwp_mmb_print_flush('Files ZIP Archive: Start');
702
+ $this->_log("Files zip fallback to ZipArchive");
703
+ $zip_archive_result = $this->zip_archive_backup($task_name, $backup_file, $exclude, $include);
704
+ iwp_mmb_print_flush('Files ZIP Archive Result: '.$zip_archive_result);
705
+ iwp_mmb_print_flush('Files ZIP Archive: End');
706
+ }
707
+
708
+ if (!$zip_archive_result) {
709
+ $pcl_result = $this->fail_safe_pcl_files($task_name, $backup_file, $exclude, $include, $fail_safe_files, $disable_comp, $add, $remove);
710
+ if(is_array($pcl_result) && isset($pcl_result['error'])){
711
+ return $pcl_result;
712
+ }
713
  }
714
  }
715
+ }
 
716
 
717
  //Reconnect
718
  $this->wpdb_reconnect();
719
+
720
  $this->update_status($task_name, 'files_zip', true);
721
  return true;
722
  }
723
+
724
 
725
 
726
  function fail_safe_pcl_files($task_name, $backup_file, $exclude, $include, $fail_safe_files, $disable_comp, $add, $remove){ //Try pclZip
727
  //$this->back_hack($task_name, 'Files ZIP PCL: Start');
728
  iwp_mmb_print_flush('Files ZIP PCL: Start');
729
  if (!isset($archive)) {
730
+ //define('PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
731
  //require_once ABSPATH . '/wp-admin/includes/class-pclzip.php';
732
  require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
733
  $archive = new IWPPclZip($backup_file);
790
  if (!$result) {
791
  @unlink($backup_file);
792
  return array(
793
+ 'error' => 'Failed to zip files. pclZip error (' . $archive->error_code . '): .' . $archive->error_string, 'error_code' => 'failed_zip_files_pclZip_error'
794
  );
795
  }
796
  //}
799
  function fail_safe_pcl_db($backup_file,$fail_safe_files,$disable_comp){
800
  //$this->back_hack($task_name, 'DB ZIP PCL: Start');
801
  iwp_mmb_print_flush('DB ZIP PCL: Start');
802
+ //define('PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
803
  require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
804
  $archive = new IWPPclZip($backup_file);
805
 
824
 
825
  if (!$result_db) {
826
  return array(
827
+ 'error' => 'Failed to zip database. pclZip error (' . $archive->error_code . '): .' . $archive->error_string, 'error_code' => 'failed_to_zip_database_pclZip_error'
828
  );
829
  }
830
  }
837
  * @return bool is compress successful or not
838
  */
839
  function zip_archive_backup_db($task_name, $db_result, $backup_file) {
840
+ $disable_comp = $this->tasks['args']['disable_comp'];
841
  if (!$disable_comp) {
842
  $this->_log("Compression is not supported by ZipArchive");
843
  }
844
  $zip = new ZipArchive();
845
+
846
  $result = $zip->open($backup_file, ZIPARCHIVE::OVERWRITE); // Tries to open $backup_file for acrhiving
847
  if ($result === true) {
848
  $result = $result && $zip->addFile(IWP_BACKUP_DIR.'/iwp_db/index.php', "iwp_db/index.php"); // Tries to add iwp_db/index.php to $backup_file
866
  * @return array|bool true if successful or an array with error message if not
867
  */
868
  function zip_archive_backup($task_name, $backup_file, $exclude, $include, $overwrite = false) {
869
+
870
  $filelist = $this->get_backup_files($exclude, $include);
871
+
872
+ $disable_comp = $this->tasks['args']['disable_comp'];
873
  if (!$disable_comp) {
874
  $this->_log("Compression is not supported by ZipArchive");
875
  }
876
+
877
  $zip = new ZipArchive();
878
+
879
  if ($overwrite) {
880
  $result = $zip->open($backup_file, ZipArchive::OVERWRITE); // Tries to open $backup_file for acrhiving
881
  } else {
882
+ if(file_exists($backup_file)){
883
+ $result = $zip->open($backup_file); // Tries to open $backup_file for acrhiving
884
+ }else{
885
+ $result = $zip->open($backup_file, ZIPARCHIVE::CREATE);
886
+ }
887
  }
888
  if ($result === true) {
889
  foreach ($filelist as $file) {
926
  }
927
  closedir($handle);
928
  }
929
+
930
  $filelist = get_all_files_from_dir(ABSPATH, $exclude);
 
931
  return $filelist;
932
  }
933
 
938
  if (!file_exists($db_folder)) {
939
  if (!mkdir($db_folder, 0755, true))
940
  return array(
941
+ 'error' => 'Error creating database backup folder (' . $db_folder . '). Make sure you have corrrect write permissions.', 'error_code' => 'error_creating_db_folder_check_perm'
942
  );
943
  $db_index_file = '<?php
944
  global $old_url, $old_file_path;
964
  global $wpdb;
965
  $paths = $this->check_mysql_paths();
966
  $brace = (substr(PHP_OS, 0, 3) == 'WIN') ? '"' : '';
967
+ //$command = $brace . $paths['mysqldump'] . $brace . ' --force --host="' . DB_HOST . '" --user="' . DB_USER . '" --password="' . DB_PASSWORD . '" --add-drop-table --skip-lock-tables "' . DB_NAME . '" > ' . $brace . $file . $brace;
968
  $command0 = $wpdb->get_col('SHOW TABLES LIKE "'.$wpdb->base_prefix.'%"');
969
  $wp_tables = join("\" \"",$command0);
970
  $command = $brace . $paths['mysqldump'] . $brace . ' --force --host="' . DB_HOST . '" --user="' . DB_USER . '" --password="' . DB_PASSWORD . '" --add-drop-table --skip-lock-tables --extended-insert=FALSE "' . DB_NAME . '" "'.$wp_tables.'" > ' . $brace . $file . $brace;
979
  return $result;
980
  }
981
 
982
+ if (iwp_mmb_get_file_size($file) == 0 || !is_file($file) || !$result) {
983
  @unlink($file);
984
  return false;
985
  } else {
1000
  }
1001
  $_count = 0;
1002
  $insert_sql = '';
1003
+ //$result = mysql_query( 'SHOW TABLES' );
1004
  $result = mysql_query( 'SHOW TABLES LIKE "'.$wpdb->base_prefix.'%"' );
1005
  if(!$result)
1006
  {
1007
  return array(
1008
+ 'error' => 'MySQL '.mysql_error()." ", 'error_code' => 'MySQL '.str_replace(" ", "_", mysql_error())." "
1009
  );
1010
  }
1011
  while( $row = mysql_fetch_row( $result ) ) {
1080
  else{
1081
  iwp_mmb_print_flush('DB DUMP PHP Fail-safe: Start');
1082
  file_put_contents($file, '');//safe to reset any old data
1083
+ //$tables = $wpdb->get_results('SHOW TABLES', ARRAY_N);
1084
  $tables = $wpdb->get_results('SHOW TABLES LIKE "'.$wpdb->base_prefix.'%"', ARRAY_N);
1085
  foreach ($tables as $table) {
1086
 
1130
  iwp_mmb_print_flush('DB DUMP PHP Fail-safe: End');
1131
  }
1132
 
1133
+ if (iwp_mmb_get_file_size($file) == 0 || !is_file($file)) {
1134
  @unlink($file);
1135
  return array(
1136
+ 'error' => 'Database backup failed. Try to enable MySQL dump on your server.', 'error_code' => 'database_backup_failed_enable_MySQL_dump_server'
1137
  );
1138
  }
1139
 
1244
 
1245
  function restore($args)
1246
  {
1247
+ global $wpdb, $wp_filesystem;
 
1248
  if (empty($args)) {
1249
  return false;
1250
  }
1251
 
1252
  extract($args);
1253
+ $this->set_resource_limit();
1254
 
1255
  $unlink_file = true; //Delete file after restore
1256
 
1263
  $backup_file = download_url($backup_url);
1264
  if (is_wp_error($backup_file)) {
1265
  return array(
1266
+ 'error' => 'Unable to download backup file ('.$backup_file->get_error_message().')', 'error_code' => 'unable_to_download_backup_file'
1267
  );
1268
  }
1269
  $what = 'full';
1270
  } else {
1271
+ /*$tasks = $this->tasks;
1272
+ $task = $tasks[$task_name];*/
1273
+ $tasks = $this->get_requested_task($result_id);
1274
+ $backup = $tasks['taskResults'][$result_id];
1275
+
1276
+ $requestParams = unserialize($tasks['requestParams']);
1277
+ $args = $requestParams['secure']['account_info'];
1278
+
1279
+ if (isset($backup['server'])) {
1280
+ $backup_file = $backup['server']['file_path'];
1281
  $unlink_file = false; //Don't delete file if stored on server
1282
 
1283
+ }
1284
+ elseif (isset($backup['ftp'])) {
1285
+ $ftp_file = $backup['ftp'];
1286
+ $args = $args['iwp_ftp'];
1287
+
1288
  $args['backup_file'] = $ftp_file;
1289
+
1290
  iwp_mmb_print_flush('FTP download: Start');
1291
  $backup_file = $this->get_ftp_backup($args);
1292
  iwp_mmb_print_flush('FTP download: End');
1293
+
1294
  if ($backup_file == false) {
1295
  return array(
1296
+ 'error' => 'Failed to download file from FTP.', 'error_code' => 'download_failed_ftp'
1297
  );
1298
  }
1299
+ }
1300
+ elseif (isset($backup['amazons3'])) {
1301
+ $amazons3_file = $backup['amazons3'];
1302
+ $args = $args['iwp_amazon_s3'];
1303
  $args['backup_file'] = $amazons3_file;
1304
+
1305
  iwp_mmb_print_flush('Amazon S3 download: Start');
1306
  $backup_file = $this->get_amazons3_backup($args);
1307
  iwp_mmb_print_flush('Amazon S3 download: End');
1308
+
1309
  if ($backup_file == false) {
1310
  return array(
1311
+ 'error' => 'Failed to download file from Amazon S3.', 'error_code' => 'download_failed_s3'
1312
  );
1313
  }
1314
+ }
1315
+ elseif(isset($backup['dropbox'])){
1316
+ $dropbox_file = $backup['dropbox'];
1317
+ $args = $args['iwp_dropbox'];
1318
  $args['backup_file'] = $dropbox_file;
1319
  iwp_mmb_print_flush('Dropbox download: Start');
1320
  $backup_file = $this->get_dropbox_backup($args);
1322
 
1323
  if ($backup_file == false) {
1324
  return array(
1325
+ 'error' => 'Failed to download file from Dropbox.', 'error_code' => 'download_failed_dropbox'
1326
  );
1327
  }
1328
  }
1329
+ elseif(isset($backup['gDrive'])){
1330
+ $gdrive_file = $backup['gDrive'];
1331
+ $args = $args['iwp_gdrive'];
1332
  $args['backup_file'] = $gdrive_file;
1333
  iwp_mmb_print_flush('gDrive download: Start');
1334
  $backup_file = $this->get_google_drive_backup($args);
1335
  iwp_mmb_print_flush('gDrive download: End');
1336
+
1337
  if(is_array($backup_file) && array_key_exists('error', $backup_file))
1338
  {
1339
  return $backup_file;
1340
  }
1341
+
1342
  if ($backup_file == false) {
1343
  return array(
1344
  'error' => 'Failed to download file from gDrive.'
1345
  );
1346
  }
 
 
 
 
1347
  }
1348
 
1349
+ $what = $requestParams['args']['what'];
1350
+ }
1351
  $this->wpdb_reconnect();
1352
 
1353
  /////////////////// dev ////////////////////////
1355
 
1356
  if (!$this->is_server_writable()) {
1357
  return array(
1358
+ 'error' => 'Failed, please add FTP details', 'error_code' => 'failes_add_ftp_details'
1359
  );
1360
  }
1361
 
1363
  ob_start();
1364
  if (false === ($creds = request_filesystem_credentials($url, '', false, ABSPATH, null) ) ) {
1365
  return array(
1366
+ 'error' => 'Unable to get file system credentials', 'error_code' => 'unable_to_get_file_system_credentials'
1367
  ); // stop processing here
1368
  }
1369
  ob_end_clean();
1371
  if ( ! WP_Filesystem($creds, ABSPATH) ) {
1372
  //request_filesystem_credentials($url, '', true, false, null);
1373
  return array(
1374
+ 'error' => 'Unable to initiate file system. Please check you have entered valid FTP credentials.', 'error_code' => 'unable_to_initiate_file_system__check_FTP_credentials.'
1375
  ); // stop processing here
1376
  //return;
1377
  }
1389
  $is_dir_created = mkdir($new_temp_folder);// new folder should be empty
1390
  if(!$is_dir_created){
1391
  return array(
1392
+ 'error' => 'Unable to create a temporary directory.', 'error_code' => 'unable_to_create_a_temp_directory.'
1393
  );
1394
  }
1395
 
1400
  $remote_abspath = trailingslashit($remote_abspath);
1401
  }else{
1402
  return array(
1403
+ 'error' => 'Unable to locate WP root directory using file system.', 'error_code' => 'unable_to_locate_wp_root_directory_using_file_system.'
1404
  );
1405
  }
1406
 
1419
  if (!$wp_filesystem->copy($remote_abspath . 'wp-config.php', $remote_abspath . 'iwp-temp-wp-config.php', true)) {
1420
  if($unlink_file) @unlink($backup_file);
1421
  return array(
1422
+ 'error' => 'Error creating wp-config. Please check your write permissions.', 'error_code' => 'error_creating_wpconfig_check_permissions'
1423
  );
1424
  }
1425
 
1438
 
1439
  }
1440
 
1441
+ //$clone_options['iwp_client_backup_tasks'] = serialize(get_option('iwp_client_backup_tasks'));
1442
  $clone_options['iwp_client_notifications'] = serialize(get_option('iwp_client_notifications'));
1443
  $clone_options['iwp_client_pageview_alerts'] = serialize(get_option('iwp_client_pageview_alerts'));
1444
 
1445
+ $clone_options['iwp_client_backup_tasks'] = "selet * from iwp_backup_status";
1446
+
1447
 
1448
  } else {
1449
+
1450
  $restore_options = array();
1451
+ $restore_options['iwp_client_notifications'] = serialize(get_option('iwp_client_notifications'));
1452
+ $restore_options['iwp_client_pageview_alerts'] = serialize(get_option('iwp_client_pageview_alerts'));
1453
+ $restore_options['iwp_client_user_hit_count'] = serialize(get_option('iwp_client_user_hit_count'));
1454
+ //$restore_options['iwp_client_backup_tasks'] = serialize(get_option('iwp_client_backup_tasks'));
1455
+
1456
+ $restore_options['iwp_client_backup_tasks'] = "selet * from iwp_backup_status";
1457
  }
1458
 
1459
 
1476
  require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
1477
  iwp_mmb_print_flush('ZIP Extract PCL: Start');
1478
  $archive = new IWPPclZip($backup_file);
1479
+ $result = $archive->extract(PCLZIP_OPT_PATH, $new_temp_folder, PCLZIP_OPT_TEMP_FILE_THRESHOLD, 1); //actual
1480
+ //$result = $archive->extract(PCLZIP_OPT_PATH, $new_temp_folder, PCLZIP_OPT_REMOVE_PATH, $GLOBALS['iwp_mmb_plugin_dir'], PCLZIP_OPT_TEMP_FILE_THRESHOLD, 1);
1481
  iwp_mmb_print_flush('ZIP Extract PCL: End');
1482
  }
1483
  $this->wpdb_reconnect();
1488
 
1489
  if (!$result) {
1490
  return array(
1491
+ 'error' => 'Failed to unzip files. pclZip error (' . $archive->error_code . '): .' . $archive->error_string, 'error_code' => 'failed_to_unzip_files_pclZip_error'
1492
  );
1493
  }
1494
 
1496
 
1497
  if (!$db_result) {
1498
  return array(
1499
+ 'error' => 'Error restoring database.', 'error_code' => 'error_restoring_db'
1500
  );
1501
  } else if(is_array($db_result) && isset($db_result['error'])){
1502
  return array(
1506
 
1507
  } else {
1508
  return array(
1509
+ 'error' => 'Backup file not found.', 'error_code' => 'backup_file_not_found'
1510
  );
1511
  }
1512
 
1935
 
1936
  return $reqs;
1937
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1938
 
1939
  function ftp_backup($args)
1940
  {
1941
  extract($args);
1942
  //Args: $ftp_username, $ftp_password, $ftp_hostname, $backup_file, $ftp_remote_folder, $ftp_site_folder
 
1943
  if(isset($use_sftp) && $use_sftp==1) {
1944
  $port = $ftp_port ? $ftp_port : 22; //default port is 22
1945
  /*
1950
  set_include_path(get_include_path() . PATH_SEPARATOR . $path);
1951
  include_once('Net/SFTP.php');
1952
 
1953
+
1954
  $sftp = new Net_SFTP($ftp_hostname, $port);
1955
  if(!$sftp) {
1956
  return array(
1984
  }
1985
 
1986
  } else {
1987
+ $port = $ftp_port ? $ftp_port : 21; //default port is 21
1988
+ if ($ftp_ssl) {
1989
+ if (function_exists('ftp_ssl_connect')) {
1990
+ $conn_id = ftp_ssl_connect($ftp_hostname,$port);
1991
+ if ($conn_id === false) {
1992
+ return array(
1993
+ 'error' => 'Failed to connect to ' . $ftp_hostname,
1994
+ 'error_code' => 'failed_to_connect_ftp_if_ftp_ssl',
1995
+ 'partial' => 1
1996
+ );
 
 
 
 
 
1997
  }
1998
  } else {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1999
  return array(
2000
+ 'error' => 'Your server doesn\'t support FTP SSL',
2001
+ 'error_code' => 'no_ftp_ssl_support',
2002
  'partial' => 1
2003
  );
2004
  }
2005
+ } else {
2006
+ if (function_exists('ftp_connect')) {
2007
+ $conn_id = ftp_connect($ftp_hostname,$port);
2008
+ if ($conn_id === false) {
2009
+ return array(
2010
+ 'error' => 'Failed to connect to ' . $ftp_hostname,
2011
+ 'error_code' => 'failed_to_connect_ftp',
2012
+ 'partial' => 1
2013
+ );
2014
+ }
2015
+ } else {
 
 
 
 
 
 
 
 
2016
  return array(
2017
+ 'error' => 'Your server doesn\'t support FTP',
2018
+ 'error_code' => 'no_ftp_support',
2019
  'partial' => 1
2020
  );
2021
  }
2022
  }
2023
+ $login = @ftp_login($conn_id, $ftp_username, $ftp_password);
2024
+ if ($login === false) {
2025
+ return array(
2026
+ 'error' => 'FTP login failed for ' . $ftp_username . ', ' . $ftp_password,
2027
+ 'error_code' => 'ftp_login_failed',
2028
+ 'partial' => 1
2029
+ );
2030
+ }
2031
 
2032
+ if($ftp_passive){
2033
+ @ftp_pasv($conn_id,true);
2034
+ }
2035
+
2036
+ @ftp_mkdir($conn_id, $ftp_remote_folder);
2037
+ if ($ftp_site_folder) {
2038
+ $ftp_remote_folder .= '/' . $this->site_name;
2039
+ }
2040
+ @ftp_mkdir($conn_id, $ftp_remote_folder);
2041
+
2042
+ $upload = @ftp_put($conn_id, $ftp_remote_folder . '/' . basename($backup_file), $backup_file, FTP_BINARY);
2043
+
2044
+ if ($upload === false) { //Try ascii
2045
+ $upload = @ftp_put($conn_id, $ftp_remote_folder . '/' . basename($backup_file), $backup_file, FTP_ASCII);
2046
+ }
2047
+ @ftp_close($conn_id);
2048
+
2049
+ if ($upload === false) {
2050
+ return array(
2051
+ 'error' => 'Failed to upload file to FTP. Please check your specified path.',
2052
+ 'error_code' => 'failed_to_upload_file_check_path',
2053
+ 'partial' => 1
2054
+ );
2055
+ }
2056
+ }
2057
  return true;
2058
  }
2059
 
2061
  {
2062
  extract($args);
2063
  //Args: $ftp_username, $ftp_password, $ftp_hostname, $backup_file, $ftp_remote_folder
 
 
2064
  if(isset($use_sftp) && $use_sftp==1) {
2065
  $port = $ftp_port ? $ftp_port : 22; //default port is 22
2066
  /*
2098
  //SFTP library has automatic connection closed. So no need to call seperate connection close function
2099
 
2100
  } else {
2101
+ $port = $ftp_port ? $ftp_port : 21; //default port is 21
2102
+ if ($ftp_ssl && function_exists('ftp_ssl_connect')) {
2103
+ $conn_id = ftp_ssl_connect($ftp_hostname,$port);
2104
+ } else if (function_exists('ftp_connect')) {
2105
+ $conn_id = ftp_connect($ftp_hostname,$port);
2106
+ }
2107
+
2108
+ if ($conn_id) {
2109
+ $login = @ftp_login($conn_id, $ftp_username, $ftp_password);
2110
+ if ($ftp_site_folder)
2111
+ $ftp_remote_folder .= '/' . $this->site_name;
2112
+
2113
+ if($ftp_passive){
2114
+ @ftp_pasv($conn_id,true);
2115
+ }
2116
+
2117
+ if(!is_array($backup_file))
2118
+ {
2119
+ $temp_backup_file = $backup_file;
2120
+ $backup_file = array();
2121
+ $backup_file[] = $temp_backup_file;
2122
+ }
2123
+
2124
+ foreach($backup_file as $key => $value)
2125
+ {
2126
+ $delete = ftp_delete($conn_id, $ftp_remote_folder . '/' . $value);
2127
  }
2128
+ ftp_close($conn_id);
2129
  }
2130
+ }
2131
+
2132
  }
2133
 
2134
  function get_ftp_backup($args)
2135
  {
2136
  extract($args);
2137
  //Args: $ftp_username, $ftp_password, $ftp_hostname, $backup_file, $ftp_remote_folder
 
 
2138
  if(isset($use_sftp) && $use_sftp==1) {
2139
  $port = $ftp_port ? $ftp_port : 22; //default port is 22
2140
  /*
2180
  }
2181
 
2182
  } else {
2183
+ $port = $ftp_port ? $ftp_port : 21; //default port is 21
2184
+ if ($ftp_ssl && function_exists('ftp_ssl_connect')) {
2185
+ $conn_id = ftp_ssl_connect($ftp_hostname,$port);
2186
+
2187
+ } else if (function_exists('ftp_connect')) {
2188
+ $conn_id = ftp_connect($ftp_hostname,$port);
2189
+ if ($conn_id === false) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2190
  return false;
 
2191
  }
2192
+ }
2193
+ $login = @ftp_login($conn_id, $ftp_username, $ftp_password);
2194
+ if ($login === false) {
2195
+ return false;
2196
  }
2197
 
2198
+ if ($ftp_site_folder)
2199
+ $ftp_remote_folder .= '/' . $this->site_name;
2200
 
2201
+ if($ftp_passive){
2202
+ @ftp_pasv($conn_id,true);
2203
+ }
2204
+
2205
+ //$temp = ABSPATH . 'iwp_temp_backup.zip';
2206
+ $temp = wp_tempnam('iwp_temp_backup.zip');
2207
+
2208
+ $get = ftp_get($conn_id, $temp, $ftp_remote_folder . '/' . $backup_file, FTP_BINARY);
2209
+ if ($get === false) {
2210
+ return false;
2211
+ } else {
2212
+ }
2213
+ ftp_close($conn_id);
2214
+
2215
+ return $temp;
2216
+ }
2217
  }
2218
 
2219
 
2224
 
2225
  require_once $GLOBALS['iwp_mmb_plugin_dir'] . '/lib/dropbox.php';
2226
 
2227
+ $dropbox = new IWP_Dropbox($consumer_key, $consumer_secret);
 
 
2228
  $dropbox->setOAuthTokens($oauth_token, $oauth_token_secret);
2229
 
2230
  if ($dropbox_site_folder == true)
2246
 
2247
  } else {
2248
  return array(
2249
+ 'error' => 'Please connect your InfiniteWP panel with your Dropbox account.',
2250
+ 'error_code' => 'please_connect_dropbox_account_with_panel'
2251
  );
2252
  }
2253
 
2259
 
2260
  require_once $GLOBALS['iwp_mmb_plugin_dir'] . '/lib/dropbox.php';
2261
 
2262
+ $dropbox = new IWP_Dropbox($consumer_key, $consumer_secret);
 
 
 
2263
  $dropbox->setOAuthTokens($oauth_token, $oauth_token_secret);
2264
 
2265
  if ($dropbox_site_folder == true)
2266
  $dropbox_destination .= '/' . $this->site_name;
2267
 
2268
+ $temp_backup_file = $backup_file;
2269
+ if(!is_array($backup_file))
2270
+ {
2271
+ $backup_file = array();
2272
+ $backup_file[] = $temp_backup_file;
2273
+ }
2274
+ foreach($backup_file as $key => $value)
2275
+ {
2276
+ try {
2277
+ $dropbox->fileopsDelete($dropbox_destination . '/' . $value);
2278
+ } catch (Exception $e) {
2279
+ $this->_log($e->getMessage());
2280
+ /*return array(
2281
+ 'error' => $e->getMessage(),
2282
+ 'partial' => 1
2283
+ );*/
2284
+ }
2285
  }
 
2286
  //return true;
2287
  }
2288
 
2292
 
2293
  require_once $GLOBALS['iwp_mmb_plugin_dir'] . '/lib/dropbox.php';
2294
 
2295
+ $dropbox = new IWP_Dropbox($consumer_key, $consumer_secret);
 
 
 
2296
  $dropbox->setOAuthTokens($oauth_token, $oauth_token_secret);
2297
 
2298
  if ($dropbox_site_folder == true)
2316
  $this->_log($e->getMessage());
2317
  return array(
2318
  'error' => $e->getMessage(),
2319
+ 'erro_code' => 'download_error_s3',
2320
  'partial' => 1
2321
  );
2322
  }
2327
  {
2328
  if ($this->iwp_mmb_function_exists('curl_init')) {
2329
  require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/amazon_s3/sdk.class.php');
2330
+ extract($args);
 
2331
 
2332
  if ($as3_site_folder == true)
2333
+ {
2334
+ if(!empty($as3_directory))
2335
+ {
2336
+ $as3_directory .= '/' . $this->site_name;
2337
+ }
2338
+ else
2339
+ {
2340
+ $as3_directory = $this->site_name;
2341
+ }
2342
+ }
2343
+ if(empty($as3_directory))
2344
+ {
2345
+ $as3_file = basename($backup_file);
2346
+ }
2347
+ else
2348
+ {
2349
+ $as3_file = $as3_directory . '/' . basename($backup_file);
2350
+ }
2351
  try{
2352
 
2353
  CFCredentials::set(array('development' => array('key' => trim($as3_access_key), 'secret' => trim(str_replace(' ', '+', $as3_secure_key)), 'default_cache_config' => '', 'certificate_authority' => true, 'use_ssl'=>false, 'ssl_verification'=>false), '@default' => 'development'));
2354
  $s3 = new AmazonS3();
2355
+ $response = $s3->create_object($as3_bucket, $as3_file, array('fileUpload' => $backup_file));
2356
  $upload = $response->isOk();
2357
  if($upload) {
2358
  return true;
2359
  } else {
2360
  return array(
2361
  'error' => 'Failed to upload to Amazon S3. Please check your details and set upload/delete permissions on your bucket.',
2362
+ 'error_code' => 'upload_failed_to_S3_check_your_details_and_set_upload_delete_permissions_on_your_bucket',
2363
  'partial' => 1
2364
  );
2365
  }
2368
  $err = $e->getMessage();
2369
  if($err){
2370
  return array(
2371
+ 'error' => 'Failed to upload to AmazonS3 ('.$err.').',
2372
+ 'error_code' => 'failed_upload_s3_with_error'
2373
  );
2374
  } else {
2375
  return array(
2376
+ 'error' => 'Failed to upload to Amazon S3.',
2377
+ 'error_code' => 'failed_upload_s3'
2378
  );
2379
  }
2380
  }
2381
  } else {
2382
  return array(
2383
  'error' => 'You cannot use Amazon S3 on your server. Please enable curl first.',
2384
+ 'error_code' => 'you_cannot_use_S3_on_your_server_enable_curl',
2385
  'partial' => 1
2386
  );
2387
  }
2389
 
2390
  function google_drive_backup($args = '', $uploadid = null, $offset = 0)
2391
  {
 
2392
  require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php');
2393
  require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/MediaFileUpload.php');
2394
  require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Service/Drive.php');
2426
  catch(Exception $e)
2427
  {
2428
  echo 'google Error ', $e->getMessage(), "\n";
2429
+ return array("error" => $e->getMessage(), "error_code" => "google_error_refresh_token");
2430
  }
2431
 
2432
  $service = new IWP_google_Service_Drive($client);
2547
  $media = new IWP_google_Http_MediaFileUpload($client, $request, 'application/zip', null, true, $upload_file_block_size);
2548
  $media->setFileSize(filesize($backup_file));
2549
 
2550
+
2551
  $status = false;
2552
  $handle = fopen($backup_file, "rb");
2553
  fseek($handle, $fileSizeUploaded);
2584
  catch (Exception $e)
2585
  {
2586
  echo "An error occurred: " . $e->getMessage();
2587
+ return array("error" => "gDrive Error".$e->getMessage());
2588
  }
2589
 
2590
  /* if($del_host_file)
2592
  unset($task_result['task_results'][$historyID]['server']);
2593
  @unlink($backup_file);
2594
  } */
2595
+ $test_this_task = $this->get_this_tasks();
 
2596
 
2597
+ $tasksThere = unserialize($test_this_task['taskResults']);
2598
 
2599
  return $gDriveID;
2600
  }
2604
  {
2605
  if ($this->iwp_mmb_function_exists('curl_init')) {
2606
  require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/amazon_s3/sdk.class.php');
2607
+ extract($args);
2608
+
2609
+ if(!is_array($backup_file))
2610
+ {
2611
+ $temp_backup_file = $backup_file;
2612
+ $backup_file = array();
2613
+ $backup_file[] = $temp_backup_file;
2614
+ }
2615
+
2616
  if ($as3_site_folder == true)
2617
+ {
2618
+ if(!empty($as3_directory))
2619
+ {
2620
+ $as3_directory .= '/' . $this->site_name;
2621
+ }
2622
+ else
2623
+ {
2624
+ $as3_directory = $this->site_name;
2625
+ }
2626
+ }
2627
  try{
2628
  CFCredentials::set(array('development' => array('key' => trim($as3_access_key), 'secret' => trim(str_replace(' ', '+', $as3_secure_key)), 'default_cache_config' => '', 'certificate_authority' => true), '@default' => 'development'));
2629
  $s3 = new AmazonS3();
2630
+ foreach($backup_file as $single_backup_file)
2631
+ {
2632
+ if(empty($as3_directory))
2633
+ {
2634
+ $single_as3_file = $single_backup_file;
2635
+ }
2636
+ else
2637
+ {
2638
+ $single_as3_file = $as3_directory . '/' . $single_backup_file;
2639
+ }
2640
+ $s3->delete_object($as3_bucket, $single_as3_file);
2641
+ }
2642
+
2643
  } catch (Exception $e){
2644
 
2645
  }
2655
  CFCredentials::set(array('development' => array('key' => trim($as3_access_key), 'secret' => trim(str_replace(' ', '+', $as3_secure_key)), 'default_cache_config' => '', 'certificate_authority' => true), '@default' => 'development'));
2656
  $s3 = new AmazonS3();
2657
  if ($as3_site_folder == true)
2658
+ {
2659
+ if(!empty($as3_directory))
2660
+ {
2661
+ $as3_directory .= '/' . $this->site_name;
2662
+ }
2663
+ else
2664
+ {
2665
+ $as3_directory = $this->site_name;
2666
+ }
2667
+ }
2668
+ if(empty($as3_directory))
2669
+ {
2670
+ $single_as3_file = $backup_file;
2671
+ }
2672
+ else
2673
+ {
2674
+ $single_as3_file = $as3_directory . '/' . $backup_file;
2675
+ }
2676
 
2677
  //$temp = ABSPATH . 'iwp_temp_backup.zip';
2678
  $temp = wp_tempnam('iwp_temp_backup.zip');
2711
  catch(Exception $e)
2712
  {
2713
  echo 'google Error ', $e->getMessage(), "\n";
2714
+ return array("error" => $e->getMessage(), "error_code" => "google_error_get_backup_refresh_token");
2715
  }
2716
 
2717
  //downloading the file
2718
  $service = new IWP_google_Service_Drive($client);
2719
 
2720
+ $file = $service->files->get($fileId);
2721
 
2722
  $downloadUrl = $file->getDownloadUrl();
2723
 
2724
  $temp = wp_tempnam('iwp_temp_backup.zip');
2725
+
2726
  try
2727
  {
2728
  if ($downloadUrl)
2737
  return $temp;
2738
  } else {
2739
  // An error occurred.
2740
+ return array("error" => "There is some error.", "error_code" => "google_error_bad_response_code_single_call");
2741
  }
2742
  }
2743
  else
2744
  {
2745
  // The file doesn't have any content stored on Drive.
2746
+ return array("error" => "Google Drive file doesnt have any content.", "error_code" => "google_error_no_content_single_call");
2747
  }
2748
  }catch(Exception $e)
2749
  {
2750
  echo 'google Error ', $e->getMessage(), "\n";
2751
+ return array("error" => $e->getMessage(), "error_code" => "google_error_get_backup_single_call");
2752
  }
2753
 
2754
 
2756
 
2757
  function remove_google_drive_backup($args)
2758
  {
 
 
2759
  require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php');
2760
  require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Service/Drive.php');
2761
 
2772
 
2773
  $accessToken = $args['token'];
2774
  $refreshToken = $accessToken['refresh_token'];
2775
+ $backup_file = $args['backup_file'];
2776
+ if(!is_array($backup_file))
2777
+ {
2778
+ $backup_file = array();
2779
+ $backup_file[0] = $args['backup_file'];
2780
+ }
2781
 
2782
  try
2783
  {
2786
  catch(Exception $e)
2787
  {
2788
  echo 'google Error ', $e->getMessage(), "\n";
2789
+ return array("error" => $e->getMessage(), "error_code" => "google_error_remove_refresh_token");
2790
  }
2791
 
2792
  $service = new IWP_google_Service_Drive($client);
2793
 
2794
+ foreach($backup_file as $key => $value)
 
 
 
 
 
2795
  {
2796
+ try
2797
+ {
2798
+ $service->files->delete($value);
2799
+ }
2800
+ catch (Exception $e)
2801
+ {
2802
+ echo "An error occurred: " . $e->getMessage();
2803
+ return array("error" => "gDrive Remove Error".$e->getMessage(), "error_code" => "google_error_delete");
2804
+ }
2805
  }
 
2806
  }
2807
 
2808
  function schedule_next($type, $schedule)
2897
 
2898
 
2899
  //Parse task arguments for info on IWP Admin Panel
2900
+
2901
+ function get_all_tasks(){
2902
+ /*global $wpdb;
2903
+
2904
+ $stats = array();
2905
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
2906
+
2907
+ $rows = $wpdb->get_col("SELECT taskResults FROM ".$table_name);
2908
+ $task_res = array();
2909
+ foreach($rows as $key => $value){
2910
+ $task_results = unserialize($value);
2911
+ if(is_array($task_results['task_results'])){
2912
+
2913
+ foreach($task_results['task_results'] as $key => $data){
2914
+ $task_res['task_results'][$key] = $data;
2915
+ }
2916
+ }
2917
+ }*/
2918
+
2919
+ global $wpdb;
2920
+
2921
+ $stats = array();
2922
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
2923
+
2924
+ $rows = $wpdb->get_results("SELECT taskName,taskResults FROM ".$table_name, ARRAY_A);
2925
+
2926
+ $task_res = array();
2927
+ foreach($rows as $key => $value){
2928
+ $task_results = unserialize($value['taskResults']);
2929
+
2930
+ if(!empty($task_results['task_results']))
2931
+ foreach($task_results['task_results'] as $key => $data){
2932
+
2933
+ $task_res[$value['taskName']]['task_results'][$key] = $data;
2934
+ }
2935
+ }
2936
+
2937
+ return $task_res;
2938
+ }
2939
+
2940
+ function get_this_tasks($requestParams = ''){
2941
+ $this->wpdb_reconnect();
2942
+
2943
+ global $wpdb;
2944
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
2945
+
2946
+ $rows = $wpdb->get_row($wpdb->prepare("SELECT * FROM ".$table_name." WHERE historyID = %d", $GLOBALS['IWP_CLIENT_HISTORY_ID']), ARRAY_A);
2947
+
2948
+ if($requestParams == 'requestParams'){
2949
+ $rows = unserialize($rows['requestParams']);
2950
+ }
2951
+
2952
+ return $rows;
2953
+
2954
+ }
2955
+
2956
+ function get_this_tasks_params(){
2957
+ $this->wpdb_reconnect();
2958
+
2959
+ global $wpdb;
2960
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
2961
+
2962
+ $rows = $wpdb->get_row($wpdb->prepare("SELECT * FROM ".$table_name." WHERE historyID = %d", $GLOBALS['IWP_CLIENT_HISTORY_ID']), ARRAY_A);
2963
+
2964
+ return unserialize($rows['requestParams']);
2965
+ }
2966
+
2967
+ function get_requested_task($ID){
2968
+ global $wpdb;
2969
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
2970
+
2971
+ $rows = $wpdb->get_row($wpdb->prepare("SELECT * FROM ".$table_name." WHERE historyID = %d", $ID), ARRAY_A);
2972
+
2973
+ $return = unserialize($rows['taskResults']);
2974
+
2975
+ return $return;
2976
+
2977
+ }
2978
+
2979
  function get_backup_stats()
2980
+ {
2981
+ global $wpdb;
2982
+ $stats = array();
2983
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
2984
+ $rows = $wpdb->get_results("select * from ".$table_name);
2985
+ $task_res = array();
2986
+ foreach($rows as $key => $value){
2987
+ $task_results = unserialize($value->taskResults);
2988
+ $task_res[$value->taskName][$value->historyID] = $task_results['task_results'][$value->historyID];
2989
+ $task_res[$value->taskName][$value->historyID]['backhack_status'] = $task_results['backhack_status'];
2990
+ }
2991
+ $stats = $task_res;
2992
+ return $stats;
2993
+ /*foreach ($rows as $obj) {
2994
+
2995
+ echo $obj->name;
2996
+
2997
+ }*/
2998
+
2999
+ /*
3000
  $stats = array();
3001
  $tasks = $this->tasks;
3002
  if (is_array($tasks) && !empty($tasks)) {
3015
  }
3016
  }
3017
  return $stats;
3018
+ */
3019
+ }
3020
+
3021
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3022
  function remove_old_backups($task_name)
3023
  {
3024
+ global $wpdb;
3025
+
3026
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
3027
+
3028
+ //Check for previous failed backups first
3029
  $this->cleanup();
3030
+
3031
  //Remove by limit
3032
+ $backups = $this->get_all_tasks();
3033
+
3034
+ $requestParams = $this->get_this_tasks("requestParams");
3035
+
3036
+ $limit = $requestParams['args']['limit'];
3037
+
3038
+ $select_prev_backup = "SELECT historyID, taskResults FROM ".$table_name." WHERE taskName = '".$task_name."' ORDER BY ID DESC LIMIT ".$limit.",100 ";
3039
+
3040
+ $select_prev_backup_res = $wpdb->get_results($select_prev_backup, ARRAY_A);
3041
+
3042
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3043
 
3044
+ if(!empty($select_prev_backup_res))
3045
+ foreach ( $select_prev_backup_res as $backup_data )
3046
+ {
3047
+ $task_result = unserialize($backup_data['taskResults']);
3048
+ $thisRequestParams = $this->getRequiredData($backup_data['historyID'], "requestParams");
3049
+
3050
+ if (isset($task_result['task_results'][$backup_data['historyID']]['server'])) {
3051
+ $backup_file = $task_result['task_results'][$backup_data['historyID']]['server']['file_path'];
3052
+ if(!is_array($backup_file))
3053
+ {
3054
+ $temp_backup_file = $backup_file;
3055
+ $backup_file = array();
3056
+ $backup_file[0] = $temp_backup_file;
3057
  }
3058
+ foreach($backup_file as $value)
3059
+ {
3060
+ @unlink($value);
3061
+ }
3062
+ }
 
 
 
 
 
 
3063
 
3064
+ if (isset($task_result['task_results'][$backup_data['historyID']]['ftp'])) {
3065
+ $ftp_file = $task_result['task_results'][$backup_data['historyID']]['ftp'];
3066
+ $args = $thisRequestParams['account_info']['iwp_ftp'];
3067
+ $args['backup_file'] = $ftp_file;
3068
+ $this->remove_ftp_backup($args);
3069
+ }
3070
+
3071
+ if (isset($task_result['task_results'][$backup_data['historyID']]['amazons3'])) {
3072
+ $amazons3_file = $task_result['task_results'][$backup_data['historyID']]['amazons3'];
3073
+ $args = $thisRequestParams['account_info']['iwp_amazon_s3'];
3074
+ $args['backup_file'] = $amazons3_file;
3075
+ $this->remove_amazons3_backup($args);
3076
+ }
3077
+
3078
+ if (isset($task_result['task_results'][$backup_data['historyID']]['dropbox']) && isset($thisRequestParams['account_info']['iwp_dropbox'])) {
3079
+ //To do: dropbox remove
3080
+ $dropbox_file = $task_result['task_results'][$backup_data['historyID']]['dropbox'];
3081
+ $args = $thisRequestParams['account_info']['iwp_dropbox'];
3082
+ $args['backup_file'] = $dropbox_file;
3083
+ $this->remove_dropbox_backup($args);
3084
+ }
3085
+
3086
+ if (isset($task_result['task_results'][$backup_data['historyID']]['gDrive'])) {
3087
+ $gdrive_file = $task_result['task_results'][$backup_data['historyID']]['gDrive'];
3088
+ $args = $thisRequestParams['account_info']['iwp_gdrive'];
3089
+ $args['backup_file'] = $gdrive_file;
3090
+ $this->remove_google_drive_backup($args);
3091
+ }
3092
+
3093
+ $delete_query = "DELETE FROM ".$table_name." WHERE historyID = '".$backup_data['historyID']."'";
3094
+
3095
+ $deleteRes = $wpdb->query($delete_query);
3096
+ }
3097
+
3098
  return true;
3099
+
3100
  }
3101
 
3102
  /**
3108
  {
3109
  if (empty($args))
3110
  return false;
3111
+
3112
+ global $wpdb;
3113
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
3114
+
3115
  extract($args);
3116
+
3117
+ $tasks = $this->get_requested_task($result_id);
3118
+ $backup = $tasks['task_results'][$result_id];
3119
+
3120
+ //$requestParams = unserialize($tasks['requestParams']);
3121
+ $requestParams = $this->getRequiredData($result_id, 'requestParams');
3122
+
3123
+ $args = $requestParams['account_info'];
3124
+
3125
  if (isset($backup['server'])) {
3126
+ $backup_file = $backup['server']['file_path'];
3127
+ if(is_array($backup_file))
3128
+ {
3129
+ foreach($backup_file as $value)
3130
+ {
3131
+ @unlink($value);
3132
+ }
3133
+ }
3134
+ else
3135
+ {
3136
+ @unlink($backup_file);
3137
+ }
3138
  }
3139
 
3140
+
 
 
3141
  //Remove from ftp
3142
  if (isset($backup['ftp'])) {
3143
  $ftp_file = $backup['ftp'];
3144
+ $args = $args['iwp_ftp'];
3145
  $args['backup_file'] = $ftp_file;
3146
  $this->remove_ftp_backup($args);
3147
  }
3148
 
3149
  if (isset($backup['amazons3'])) {
3150
  $amazons3_file = $backup['amazons3'];
3151
+ $args = $args['iwp_amazon_s3'];
3152
  $args['backup_file'] = $amazons3_file;
3153
  $this->remove_amazons3_backup($args);
3154
  }
3155
 
3156
  if (isset($backup['dropbox'])) {
3157
  $dropbox_file = $backup['dropbox'];
3158
+ $args = $args['iwp_dropbox'];
3159
  $args['backup_file'] = $dropbox_file;
3160
  $this->remove_dropbox_backup($args);
3161
  }
3162
+
3163
  if (isset($backup['gDrive'])) {
3164
  $g_drive_file = $backup['gDrive'];
3165
+ $args = $args['iwp_gdrive'];
3166
  $args['backup_file'] = $g_drive_file;
3167
  $this->remove_google_drive_backup($args);
3168
  }
3169
+
3170
+ $delete_query = "DELETE FROM ".$table_name." WHERE historyID = '".$result_id."'";
3171
+
3172
+ $deleteRes = $wpdb->query($delete_query);
3173
+
 
 
 
 
 
 
3174
  return true;
3175
 
3176
  }
3177
 
3178
+ function getRequiredData($historyID, $field){
3179
+ global $wpdb;
3180
+
3181
+ $backupData = $wpdb->get_row("SELECT ".$field." FROM ".$wpdb->base_prefix."iwp_backup_status WHERE historyID = '".$historyID."'");
3182
+ if(($field == 'responseParams')||($field == 'requestParams')||($field == 'taskResults'))
3183
+ $fieldParams = unserialize($backupData->$field);
3184
+ else
3185
+ $fieldParams = $backupData->$field;
3186
+ return $fieldParams;
3187
+ }
3188
+
3189
  function cleanup()
3190
  {
3191
+ $tasks = $this->get_all_tasks(); //all backups task results array.
3192
+
3193
+
3194
  $backup_folder = WP_CONTENT_DIR . '/' . md5('iwp_mmb-client') . '/iwp_backups/';
3195
  $backup_folder_new = IWP_BACKUP_DIR . '/';
3196
  $files = glob($backup_folder . "*");
3228
  $results = array();
3229
  if (!empty($tasks)) {
3230
  foreach ((array) $tasks as $task) {
3231
+ //if (isset($task) && count($task)) {
3232
+ // foreach ($task as $backup) {
3233
+ if (isset($task['task_results']) && count($task['task_results'])) {
3234
  foreach ($task['task_results'] as $backup) {
3235
  if (isset($backup['server'])) {
3236
+ $this_backup_file = $backup['server']['file_path'];
3237
+ if(is_array($this_backup_file))
3238
+ {
3239
+ foreach($this_backup_file as $single_backup_file)
3240
+ {
3241
+ $results[] = $single_backup_file;
3242
+ }
3243
+ }
3244
+ else
3245
+ {
3246
+ $results[] = $this_backup_file;
3247
+ }
3248
  }
3249
  }
3250
  }
3260
  }
3261
  }
3262
  }
3263
+
 
3264
 
3265
  return $deleted;
3266
  }
3267
 
3268
+
3269
 
3270
+ function update_status($task_name, $status, $completed = false, $task_result='')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3271
  {
3272
  /* Statuses:
3273
+ 0 - Backup started 1 - DB dump 2 - DB ZIP 3 - Files ZIP 4 - Amazon S3 5 - Dropbox 6 - FTP 7 - Email 100 - Finished
 
 
 
 
 
 
 
 
3274
  */
3275
+
3276
+ //$tasks = $this->tasks;
3277
+
3278
+ $test_this_task = $this->get_this_tasks();
3279
+
3280
+ $tasks = unserialize($test_this_task['taskResults']);
3281
+
3282
+ $tasks['backhack_status']['adminHistoryID'] = $GLOBALS['IWP_CLIENT_HISTORY_ID'];
3283
+
3284
+ if (!$completed) {
3285
+
3286
+ $tasks['backhack_status'][$status]['start'] = microtime(true);
3287
+
3288
+ $test = $this->statusLog($GLOBALS['IWP_CLIENT_HISTORY_ID'], array('stage' => $status, 'status' => 'processing', 'statusMsg' => 'processing', 'task_result' => $tasks));
3289
+
3290
+ }
3291
+ else {
3292
+
3293
+ $tasks['backhack_status'][$status]['end'] = microtime(true);
3294
+
3295
+ if(!empty($task_result)){
3296
+ $tasks['task_results'][$GLOBALS['IWP_CLIENT_HISTORY_ID']] = $task_result;
3297
+ }
3298
+
3299
+ $test2 = $this->statusLog($GLOBALS['IWP_CLIENT_HISTORY_ID'], array('stage' => $status, 'status' => 'completed', 'statusMsg' => 'completed', 'task_result' => $tasks));
3300
+
3301
+ }
3302
+
3303
+ $this->update_tasks($tasks);
3304
  }
3305
 
3306
+ function statusLog($historyID = '', $statusArray = array(), $params=array())
3307
+ {
3308
+ global $wpdb,$insertID;
3309
+
3310
+ if(empty($historyID))
3311
+ {
3312
+
3313
+ $insert = $wpdb->insert($wpdb->base_prefix.'iwp_backup_status',array( 'stage' => $statusArray['stage'], 'status' => $statusArray['status'], 'action' => $params['args']['action'], 'type' => $params['args']['type'],'category' => $params['args']['what'],'historyID' => $GLOBALS['IWP_CLIENT_HISTORY_ID'],'finalStatus' => 'pending','startTime' => microtime(true),'endTime' => '','statusMsg' => $statusArray['statusMsg'],'requestParams' => serialize($params),'taskName' => $params['task_name']), array( '%s', '%s','%s', '%s', '%s', '%s', '%d', '%s', '%d', '%d', '%s', '%s', '%s' ) );
3314
+ if($insert)
3315
+ {
3316
+ $insertID = $wpdb->insert_id;
3317
+ }
3318
+ }
3319
+ else if(isset($statusArray['responseParams']))
3320
+ {
3321
+
3322
+ $update = $wpdb->update($wpdb->base_prefix.'iwp_backup_status',array( 'responseParams' => serialize($statusArray['responseParams']),'stage' => $statusArray['stage'], 'status' => $statusArray['status'],'statusMsg' => $statusArray['statusMsg'], 'taskResults' => serialize($statusArray['task_result'])),array( 'historyID' => $historyID),array('%s','%s', '%s', '%s', '%s'),array('%d'));
3323
+
3324
+
3325
+ }
3326
+ else
3327
+ {
3328
+ $update = $wpdb->update($wpdb->base_prefix.'iwp_backup_status',array( 'stage' => $statusArray['stage'], 'status' => $statusArray['status'],'statusMsg' => $statusArray['statusMsg'], 'taskResults' => serialize($statusArray['task_result']) ),array( 'historyID' => $historyID),array('%s', '%s', '%s', '%s'),array('%d'));
3329
+
3330
+ }
3331
+
3332
+ if( (isset($update)&&(!$update)) || (isset($insert)&&(!$insert)) )
3333
+ {
3334
+ //return array('error'=> $statusArray['statusMsg']);
3335
+ iwp_mmb_response(array('error' => 'MySQL Error: '.$wpdb -> last_error, 'error_code' => 'status_log_my_sql_error'), false);
3336
+ }
3337
+
3338
+ if((isset($statusArray['sendResponse']) && $statusArray['sendResponse'] == true) || $statusArray['status'] == 'completed')
3339
+ {
3340
+ $returnParams = array();
3341
+ $returnParams['parentHID'] = $historyID;
3342
+ $returnParams['backupID'] = $insertID;
3343
+ $returnParams['stage'] = $statusArray['stage'] ;
3344
+ $returnParams['status'] = $statusArray['status'];
3345
+ $returnParams['nextFunc'] = $statusArray['nextFunc'];
3346
+ return array('success' => $returnParams);
3347
+ }
3348
+ else
3349
+ {
3350
+ if($statusArray['status'] == 'error')
3351
+ {
3352
+ $returnParams = array();
3353
+ $returnParams['parentHID'] = $historyID;
3354
+ $returnParams['backupID'] = $insertID;
3355
+ $returnParams['stage'] = $statusArray['stage'] ;
3356
+ $returnParams['status'] = $statusArray['status'];
3357
+ $returnParams['statusMsg'] = $statusArray['statusMsg'];
3358
+
3359
+ return array('error'=> $returnParams);
3360
+ }
3361
+ }
3362
+ }
3363
+
3364
  function update_tasks($tasks)
3365
  {
3366
+ //$this->tasks = $tasks;
3367
  update_option('iwp_client_backup_tasks', $tasks);
3368
  }
3369
 
3394
  $wp_filesystem->put_contents($remote_abspath.'.htaccess', $file);
3395
  }
3396
  }
3397
+
 
 
 
 
 
 
 
 
3398
  public function readd_tasks( $params = array() ){
3399
  global $iwp_mmb_core;
3400
 
3464
  * @return array List of all files in folder $path, exclude all files in $exclude array
3465
  */
3466
  function get_all_files_from_dir($path, $exclude = array()) {
3467
+
3468
  if ($path[strlen($path) - 1] === "/") $path = substr($path, 0, -1);
3469
  global $directory_tree, $ignore_array;
3470
  $directory_tree = array();
3471
+ if(!empty($exclude))
3472
+ {
3473
+ foreach ($exclude as $file) {
3474
+ if (!in_array($file, array('.', '..'))) {
3475
+ if ($file[0] === "/") $path = substr($file, 1);
3476
+ $ignore_array[] = "$path/$file";
3477
+ }
3478
  }
3479
  }
3480
  get_all_files_from_dir_recursive($path);
3481
+
3482
  return $directory_tree;
3483
  }
3484
  }
3492
  * @param string $path Relative or absolute path to folder
3493
  * @return void
3494
  */
3495
+ function get_all_files_from_dir_recursive($path,$ignore_array=array()) {
3496
  if ($path[strlen($path) - 1] === "/") $path = substr($path, 0, -1);
3497
  global $directory_tree, $ignore_array;
3498
+ if(empty($ignore_array))
3499
+ {
3500
+ $ignore_array = array();
3501
+ }
3502
  $directory_tree_temp = array();
3503
  $dh = @opendir($path);
3504
 
3505
  while (false !== ($file = @readdir($dh))) {
3506
+ if (!in_array($file, array('.', '..'))) {
3507
+ if (!in_array("$path/$file", $ignore_array)) {
3508
+ if (!is_dir("$path/$file")) {
3509
+ $directory_tree[] = "$path/$file";
3510
+ } else {
3511
+ get_all_files_from_dir_recursive("$path/$file");
3512
  }
3513
  }
3514
  }
core.class.php CHANGED
@@ -164,8 +164,8 @@ class IWP_MMB_Core extends IWP_MMB_Helper
164
  'wp_optimize' => 'iwp_mmb_wp_optimize',
165
 
166
  'backup_repository' => 'iwp_mmb_backup_repository',
167
-
168
- 'get_all_links' => 'iwp_mmb_get_all_links',
169
  'update_broken_link' => 'iwp_mmb_update_broken_link',
170
  'unlink_broken_link' => 'iwp_mmb_unlink_broken_link',
171
  'markasnot_broken_link' => 'iwp_mmb_markasnot_broken_link',
@@ -328,7 +328,7 @@ class IWP_MMB_Core extends IWP_MMB_Helper
328
 
329
  return $this->optimize_instance;
330
  }
331
-
332
 
333
  /**
334
  * Gets an instance of the WP_BrokenLinks class
@@ -498,15 +498,25 @@ class IWP_MMB_Core extends IWP_MMB_Helper
498
  * Gets an instance of stats class
499
  *
500
  */
501
- function get_backup_instance()
502
  {
 
503
  if (!isset($this->backup_instance)) {
504
- $this->backup_instance = new IWP_MMB_Backup();
 
 
 
 
 
 
 
 
 
505
  }
506
 
507
  return $this->backup_instance;
508
  }
509
-
510
  function get_backup_repository_instance()
511
  {
512
  if (!isset($this->backup_repository_instance)) {
@@ -529,7 +539,7 @@ class IWP_MMB_Core extends IWP_MMB_Helper
529
  return $this->link_instance;
530
  }
531
 
532
- function get_installer_instance()
533
  {
534
  if (!isset($this->installer_instance)) {
535
  $this->installer_instance = new IWP_MMB_Installer();
@@ -681,9 +691,11 @@ class IWP_MMB_Core extends IWP_MMB_Helper
681
  */
682
  function update_client_plugin($params)
683
  {
 
684
  extract($params);
685
  if ($download_url) {
686
  @include_once ABSPATH . 'wp-admin/includes/file.php';
 
687
  @include_once ABSPATH . 'wp-admin/includes/misc.php';
688
  @include_once ABSPATH . 'wp-admin/includes/template.php';
689
  @include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
@@ -691,7 +703,7 @@ class IWP_MMB_Core extends IWP_MMB_Helper
691
 
692
  if (!$this->is_server_writable()) {
693
  return array(
694
- 'error' => 'Failed. please add FTP details for automatic upgrades.'
695
  );
696
  }
697
 
@@ -710,18 +722,59 @@ class IWP_MMB_Core extends IWP_MMB_Helper
710
  ob_end_clean();
711
  @wp_update_plugins();
712
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
713
  if (is_wp_error($result) || !$result) {
714
  return array(
715
- 'error' => 'InfiniteWP Client plugin could not be updated.'
716
  );
717
- } else {
718
  return array(
719
  'success' => 'InfiniteWP Client plugin successfully updated.'
720
  );
721
  }
722
  }
723
  return array(
724
- 'error' => 'Bad download path for client installation file.'
725
  );
726
  }
727
 
164
  'wp_optimize' => 'iwp_mmb_wp_optimize',
165
 
166
  'backup_repository' => 'iwp_mmb_backup_repository',
167
+ 'trigger_backup_multi' => 'iwp_mmb_trigger_check',
168
+ 'get_all_links' => 'iwp_mmb_get_all_links',
169
  'update_broken_link' => 'iwp_mmb_update_broken_link',
170
  'unlink_broken_link' => 'iwp_mmb_unlink_broken_link',
171
  'markasnot_broken_link' => 'iwp_mmb_markasnot_broken_link',
328
 
329
  return $this->optimize_instance;
330
  }
331
+
332
 
333
  /**
334
  * Gets an instance of the WP_BrokenLinks class
498
  * Gets an instance of stats class
499
  *
500
  */
501
+ function get_backup_instance($mechanism='')
502
  {
503
+ //$mechanism = 'multiCall';
504
  if (!isset($this->backup_instance)) {
505
+ if($mechanism == 'singleCall' || $mechanism == ''){
506
+ $this->backup_instance = new IWP_MMB_Backup_Singlecall();
507
+ }
508
+ elseif($mechanism == 'multiCall'){
509
+ $this->backup_instance = new IWP_MMB_Backup_Multicall();
510
+ }
511
+ else{
512
+ iwp_mmb_response(array('error' => 'mechanism not found'), true);
513
+ //return false;
514
+ }
515
  }
516
 
517
  return $this->backup_instance;
518
  }
519
+
520
  function get_backup_repository_instance()
521
  {
522
  if (!isset($this->backup_repository_instance)) {
539
  return $this->link_instance;
540
  }
541
 
542
+ function get_installer_instance()
543
  {
544
  if (!isset($this->installer_instance)) {
545
  $this->installer_instance = new IWP_MMB_Installer();
691
  */
692
  function update_client_plugin($params)
693
  {
694
+
695
  extract($params);
696
  if ($download_url) {
697
  @include_once ABSPATH . 'wp-admin/includes/file.php';
698
+ @include_once ABSPATH . 'wp-admin/includes/plugin.php';
699
  @include_once ABSPATH . 'wp-admin/includes/misc.php';
700
  @include_once ABSPATH . 'wp-admin/includes/template.php';
701
  @include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
703
 
704
  if (!$this->is_server_writable()) {
705
  return array(
706
+ 'error' => 'Failed. please add FTP details for automatic upgrades.', 'error_code' => 'automatic_upgrade_failed_add_ftp_details'
707
  );
708
  }
709
 
722
  ob_end_clean();
723
  @wp_update_plugins();
724
 
725
+ //iwp_mmb_create_backup_table();
726
+
727
+ //add_action( 'plugins_loaded', 'iwp_mmb_create_backup_table' );
728
+
729
+ /*global $wpdb;
730
+
731
+
732
+ $IWP_MMB_BACKUP_TABLE_VERSION = '1.0';
733
+ if (get_site_option( 'iwp_backup_table_version' ) != $IWP_MMB_BACKUP_TABLE_VERSION) {
734
+
735
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
736
+
737
+ $sql = "
738
+ CREATE TABLE IF NOT EXISTS $table_name (
739
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
740
+ `historyID` int(11) NOT NULL,
741
+ `taskName` varchar(255) NOT NULL,
742
+ `action` varchar(50) NOT NULL,
743
+ `type` varchar(50) NOT NULL,
744
+ `category` varchar(50) NOT NULL,
745
+ `stage` varchar(255) NOT NULL,
746
+ `status` varchar(255) NOT NULL,
747
+ `finalStatus` varchar(50) DEFAULT NULL,
748
+ `statusMsg` varchar(255) NOT NULL,
749
+ `requestParams` text NOT NULL,
750
+ `responseParams` longtext,
751
+ `taskResults` text,
752
+ `startTime` int(11) DEFAULT NULL,
753
+ `endTime` int(11) NOT NULL,
754
+ PRIMARY KEY (`ID`)
755
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
756
+ ";
757
+
758
+ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
759
+ dbDelta( $sql );
760
+
761
+ add_option( "iwp_backup_table_version", $IWP_MMB_BACKUP_TABLE_VERSION);
762
+ }*/
763
+ // import iwp_client_backup_tasks option table array to row data.
764
+
765
+
766
  if (is_wp_error($result) || !$result) {
767
  return array(
768
+ 'error' => 'InfiniteWP Client plugin could not be updated.', 'error_code' => 'client_plugin_could_not_be_updated'
769
  );
770
+ } else {
771
  return array(
772
  'success' => 'InfiniteWP Client plugin successfully updated.'
773
  );
774
  }
775
  }
776
  return array(
777
+ 'error' => 'Bad download path for client installation file.', 'error_code' => 'client_plugin_bad_download_path'
778
  );
779
  }
780
 
helper.class.php CHANGED
@@ -342,7 +342,7 @@ class IWP_MMB_Helper
342
  {
343
  if (!$data && !$signature) {
344
  return array(
345
- 'error' => 'Authentication failed.'
346
  );
347
  }
348
 
@@ -351,14 +351,14 @@ class IWP_MMB_Helper
351
  if(isset($_GET['auto_login'])){//temp fix for stopping reuse of open admin url
352
  if ((int) $current_message >= (int) $message_id)
353
  return array(
354
- 'error' => 'Invalid message recieved.'
355
  );
356
  }
357
 
358
  $pl_key = $this->get_admin_panel_public_key();
359
  if (!$pl_key) {
360
  return array(
361
- 'error' => 'Authentication failed. Deactivate and activate the InfiniteWP Client plugin on this site, then remove the website from your InfiniteWP Admin Panel and add it again.'
362
  );
363
  }
364
 
@@ -369,11 +369,11 @@ class IWP_MMB_Helper
369
  return true;
370
  } else if ($verify == 0) {
371
  return array(
372
- 'error' => 'Invalid message signature. Deactivate and activate the InfiniteWP Client plugin on this site, then remove the website from your InfiniteWP Admin Panel and add it again.'
373
  );
374
  } else {
375
  return array(
376
- 'error' => 'Command not successful! Please try again.'
377
  );
378
  }
379
  } else if ($this->get_random_signature()) {
@@ -383,13 +383,13 @@ class IWP_MMB_Helper
383
  return true;
384
  }
385
  return array(
386
- 'error' => 'Invalid message signature. Deactivate and activate the InfiniteWP Client plugin on this site, then remove the website from your InfiniteWP Admin Panel and add it again.'
387
  );
388
  }
389
  // no rand key - deleted in get_stat maybe
390
  else
391
  return array(
392
- 'error' => 'Invalid message signature. Deactivate and activate the InfiniteWP Client plugin on this site, then remove the website from your InfiniteWP Admin Panel and add it again.'
393
  );
394
  }
395
 
@@ -488,19 +488,19 @@ class IWP_MMB_Helper
488
 
489
  function iwp_mmb_download_url($url, $file_name)
490
  {
491
- if (function_exists('fopen') && function_exists('ini_get') && ini_get('allow_url_fopen') == true && ($destination = @fopen($file_name, 'wb')) && ($source = @fopen($url, "r")) ) {
492
-
493
-
494
- while ($a = @fread($source, 1024* 1024)) {
495
- @fwrite($destination, $a);
496
- }
497
-
498
- fclose($source);
499
- fclose($destination);
500
- } else
501
- if (!fsockopen_download($url, $file_name))
502
- die('Error downloading file ' . $url);
503
- return $file_name;
504
- }
505
  }
506
  ?>
342
  {
343
  if (!$data && !$signature) {
344
  return array(
345
+ 'error' => 'Authentication failed.', 'error_code' => 'authentication_failed'
346
  );
347
  }
348
 
351
  if(isset($_GET['auto_login'])){//temp fix for stopping reuse of open admin url
352
  if ((int) $current_message >= (int) $message_id)
353
  return array(
354
+ 'error' => 'Invalid message recieved.', 'error_code' => 'invalid_message_received'
355
  );
356
  }
357
 
358
  $pl_key = $this->get_admin_panel_public_key();
359
  if (!$pl_key) {
360
  return array(
361
+ 'error' => 'Authentication failed. Deactivate and activate the InfiniteWP Client plugin on this site, then remove the website from your InfiniteWP Admin Panel and add it again.', 'error_code' => 'authentication_failed_reactive_and_readd_the_site'
362
  );
363
  }
364
 
369
  return true;
370
  } else if ($verify == 0) {
371
  return array(
372
+ 'error' => 'Invalid message signature. Deactivate and activate the InfiniteWP Client plugin on this site, then remove the website from your InfiniteWP Admin Panel and add it again.', 'error_code' => 'invalid_message_signature_openssl'
373
  );
374
  } else {
375
  return array(
376
+ 'error' => 'Command not successful! Please try again.', 'error_code' => 'command_not_successful'
377
  );
378
  }
379
  } else if ($this->get_random_signature()) {
383
  return true;
384
  }
385
  return array(
386
+ 'error' => 'Invalid message signature. Deactivate and activate the InfiniteWP Client plugin on this site, then remove the website from your InfiniteWP Admin Panel and add it again.', 'error_code' => 'invalid_message_signature_random_signature'
387
  );
388
  }
389
  // no rand key - deleted in get_stat maybe
390
  else
391
  return array(
392
+ 'error' => 'Invalid message signature. Deactivate and activate the InfiniteWP Client plugin on this site, then remove the website from your InfiniteWP Admin Panel and add it again.', 'error_code' => 'invalid_message_signature'
393
  );
394
  }
395
 
488
 
489
  function iwp_mmb_download_url($url, $file_name)
490
  {
491
+ if (function_exists('fopen') && function_exists('ini_get') && ini_get('allow_url_fopen') == true && ($destination = @fopen($file_name, 'wb')) && ($source = @fopen($url, "r")) ) {
492
+
493
+
494
+ while ($a = @fread($source, 1024* 1024)) {
495
+ @fwrite($destination, $a);
496
+ }
497
+
498
+ fclose($source);
499
+ fclose($destination);
500
+ } else
501
+ if (!fsockopen_download($url, $file_name))
502
+ die('Error downloading file ' . $url);
503
+ return $file_name;
504
+ }
505
  }
506
  ?>
init.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: InfiniteWP - Client
4
  Plugin URI: http://infinitewp.com/
5
  Description: This is the client plugin of InfiniteWP that communicates with the InfiniteWP Admin panel.
6
  Author: Revmakx
7
- Version: 1.2.15
8
  Author URI: http://www.revmakx.com
9
  */
10
  /************************************************************
@@ -26,7 +26,8 @@ Author URI: http://www.revmakx.com
26
  **************************************************************/
27
 
28
  if(!defined('IWP_MMB_CLIENT_VERSION'))
29
- define('IWP_MMB_CLIENT_VERSION', '1.2.15');
 
30
 
31
 
32
  if ( !defined('IWP_MMB_XFRAME_COOKIE')){
@@ -45,7 +46,9 @@ $iwp_mmb_plugin_url = WP_PLUGIN_URL . '/' . basename(dirname(__FILE__));
45
  require_once("$iwp_mmb_plugin_dir/helper.class.php");
46
  require_once("$iwp_mmb_plugin_dir/core.class.php");
47
  require_once("$iwp_mmb_plugin_dir/stats.class.php");
48
- require_once("$iwp_mmb_plugin_dir/backup.class.php");
 
 
49
  require_once("$iwp_mmb_plugin_dir/installer.class.php");
50
 
51
  require_once("$iwp_mmb_plugin_dir/addons/manage_users/user.class.php");
@@ -54,6 +57,7 @@ require_once("$iwp_mmb_plugin_dir/addons/comments/comments.class.php");
54
 
55
  require_once("$iwp_mmb_plugin_dir/addons/post_links/link.class.php");
56
  require_once("$iwp_mmb_plugin_dir/addons/post_links/post.class.php");
 
57
  require_once("$iwp_mmb_plugin_dir/addons/wp_optimize/optimize.class.php");
58
 
59
  require_once("$iwp_mmb_plugin_dir/api.php");
@@ -115,20 +119,23 @@ if( !function_exists ('iwp_mmb_parse_request')) {
115
  error_reporting(E_ALL ^ E_NOTICE);
116
  @ini_set("display_errors", 1);
117
 
 
 
118
  $action = $iwp_action;
119
  $_wp_using_ext_object_cache = false;
120
  @set_time_limit(600);
121
 
122
  if (!$iwp_mmb_core->check_if_user_exists($params['username']))
123
- iwp_mmb_response('Username <b>' . $params['username'] . '</b> does not have administrative access. Enter the correct username in the site options.', false);
124
 
125
  if ($action == 'add_site') {
126
  iwp_mmb_add_site($params);
127
- iwp_mmb_response('You should never see this.', false);
128
  }
129
 
130
  $auth = $iwp_mmb_core->authenticate_message($action . $id, $signature, $id);
131
  if ($auth === true) {
 
132
  $GLOBALS['IWP_CLIENT_HISTORY_ID'] = $id;
133
 
134
  if(isset($params['username']) && !is_user_logged_in()){
@@ -180,10 +187,10 @@ if( !function_exists ('iwp_mmb_parse_request')) {
180
  }
181
 
182
  } else {
183
- iwp_mmb_response($auth['error'], false);
184
  }
185
  } else {
186
- IWP_MMB_Stats::set_hit_count();
187
  }
188
  ob_end_clean();
189
  }
@@ -195,12 +202,17 @@ if( !function_exists ( 'iwp_mmb_response' )) {
195
  {
196
  $return = array();
197
 
198
- if ((is_array($response) && empty($response)) || (!is_array($response) && strlen($response) == 0))
199
  $return['error'] = 'Empty response.';
200
- else if ($success)
 
 
201
  $return['success'] = $response;
202
- else
203
- $return['error'] = $response;
 
 
 
204
 
205
  if( !headers_sent() ){
206
  header('HTTP/1.0 200 OK');
@@ -225,7 +237,7 @@ if( !function_exists ( 'iwp_mmb_add_site' )) {
225
 
226
 
227
  if(trim($activation_key) != get_option('iwp_client_activate_key')){ //iwp
228
- iwp_mmb_response('Invalid activation key', false);
229
  return;
230
  }
231
 
@@ -245,9 +257,9 @@ if( !function_exists ( 'iwp_mmb_add_site' )) {
245
  iwp_mmb_response($iwp_mmb_core->stats_instance->get_initial_stats(), true);
246
  delete_option('iwp_client_activate_key');//iwp
247
  } else if ($verify == 0) {
248
- iwp_mmb_response('Invalid message signature. Please contact us if you see this message often.', false);
249
  } else {
250
- iwp_mmb_response('Command not successful. Please try again.', false);
251
  }
252
  } else {
253
  if (!get_option('iwp_client_nossl_key')) {
@@ -270,13 +282,13 @@ if( !function_exists ( 'iwp_mmb_add_site' )) {
270
  iwp_mmb_response($iwp_mmb_core->stats_instance->get_initial_stats(), true);
271
  delete_option('iwp_client_activate_key');//IWP
272
  } else
273
- iwp_mmb_response('Please deactivate & activate InfiniteWP Client plugin on your site, then add the site again.', false);
274
  }
275
  } else {
276
- iwp_mmb_response('Please deactivate &amp; activate InfiniteWP Client plugin on your site, then add the site again.', false);
277
  }
278
  } else {
279
- iwp_mmb_response('Invalid parameters received. Please try again.', false);
280
  }
281
  }
282
  }
@@ -340,6 +352,23 @@ if( !function_exists ( 'iwp_mmb_pre_init_stats' )) {
340
  }
341
  }
342
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
  if( !function_exists ( 'iwp_mmb_backup_now' )) {
344
  //backup
345
  function iwp_mmb_backup_now($params)
@@ -350,7 +379,7 @@ if( !function_exists ( 'iwp_mmb_backup_now' )) {
350
  $return = $iwp_mmb_core->backup_instance->backup($params);
351
 
352
  if (is_array($return) && array_key_exists('error', $return))
353
- iwp_mmb_response($return['error'], false);
354
  else {
355
  iwp_mmb_response($return, true);
356
  }
@@ -361,10 +390,11 @@ if( !function_exists ( 'iwp_mmb_run_task_now' )) {
361
  function iwp_mmb_run_task_now($params)
362
  {
363
  global $iwp_mmb_core;
364
- $iwp_mmb_core->get_backup_instance();
365
- $return = $iwp_mmb_core->backup_instance->task_now($params['task_name']);
 
366
  if (is_array($return) && array_key_exists('error', $return))
367
- iwp_mmb_response($return['error'], false);
368
  else {
369
  iwp_mmb_response($return, true);
370
  }
@@ -378,7 +408,7 @@ if( !function_exists ( 'iwp_mmb_delete_task_now' )) {
378
  $iwp_mmb_core->get_backup_instance();
379
  $return = $iwp_mmb_core->backup_instance->delete_task_now($params['task_name']);
380
  if (is_array($return) && array_key_exists('error', $return))
381
- iwp_mmb_response($return['error'], false);
382
  else {
383
  iwp_mmb_response($return, true);
384
  }
@@ -392,7 +422,7 @@ if( !function_exists ( 'iwp_mmb_check_backup_compat' )) {
392
  $return = $iwp_mmb_core->backup_instance->check_backup_compat($params);
393
 
394
  if (is_array($return) && array_key_exists('error', $return))
395
- iwp_mmb_response($return['error'], false);
396
  else {
397
  iwp_mmb_response($return, true);
398
  }
@@ -407,7 +437,7 @@ if( !function_exists ( 'iwp_mmb_get_backup_req' )) {
407
  $return = $iwp_mmb_core->stats_instance->get_backup_req($params);
408
 
409
  if (is_array($return) && array_key_exists('error', $return))
410
- iwp_mmb_response($return['error'], false);
411
  else {
412
  iwp_mmb_response($return, true);
413
  }
@@ -419,7 +449,8 @@ if( !function_exists ( 'iwp_mmb_scheduled_backup' )) {
419
  function iwp_mmb_scheduled_backup($params)
420
  {
421
  global $iwp_mmb_core;
422
- $iwp_mmb_core->get_backup_instance();
 
423
  $return = $iwp_mmb_core->backup_instance->set_backup_task($params);
424
  iwp_mmb_response($return, $return);
425
  }
@@ -452,10 +483,11 @@ if( !function_exists ( 'iwp_mmb_restore_now' )) {
452
  function iwp_mmb_restore_now($params)
453
  {
454
  global $iwp_mmb_core;
455
- $iwp_mmb_core->get_backup_instance();
456
  $return = $iwp_mmb_core->backup_instance->restore($params);
 
457
  if (is_array($return) && array_key_exists('error', $return))
458
- iwp_mmb_response($return['error'], false);
459
  else
460
  iwp_mmb_response($return, true);
461
 
@@ -470,7 +502,7 @@ if( !function_exists ( 'iwp_mmb_backup_repository' )) {
470
  $iwp_mmb_core->get_backup_repository_instance();
471
  $return = $iwp_mmb_core->backup_repository_instance->backup_repository($params);
472
  if (is_array($return) && array_key_exists('error', $return))
473
- iwp_mmb_response($return['error'], false);
474
  else
475
  iwp_mmb_response($return, true);
476
  }
@@ -594,9 +626,9 @@ if( !function_exists ( 'iwp_mmb_add_user' )) {
594
  global $iwp_mmb_core;
595
  $iwp_mmb_core->get_user_instance();
596
  $return = $iwp_mmb_core->user_instance->add_user($params);
597
- if (is_array($return) && array_key_exists('error', $return))
598
-
599
- iwp_mmb_response($return['error'], false);
600
  else {
601
  iwp_mmb_response($return, true);
602
  }
@@ -611,7 +643,7 @@ if( !function_exists ('iwp_mmb_get_users')) {
611
  $iwp_mmb_core->get_user_instance();
612
  $return = $iwp_mmb_core->user_instance->get_users($params);
613
  if (is_array($return) && array_key_exists('error', $return))
614
- iwp_mmb_response($return['error'], false);
615
  else {
616
  iwp_mmb_response($return, true);
617
  }
@@ -648,7 +680,7 @@ if( !function_exists ( 'iwp_mmb_set_notifications' )) {
648
  $iwp_mmb_core->get_stats_instance();
649
  $return = $iwp_mmb_core->stats_instance->set_notifications($params);
650
  if (is_array($return) && array_key_exists('error', $return))
651
- iwp_mmb_response($return['error'], false);
652
  else {
653
  iwp_mmb_response($return, true);
654
  }
@@ -733,7 +765,7 @@ if( !function_exists ( 'iwp_mmb_post_create' )) {
733
  iwp_mmb_response($return, true);
734
  else{
735
  if(isset($return['error'])){
736
- iwp_mmb_response($return['error'], false);
737
  } else {
738
  iwp_mmb_response($return, false);
739
  }
@@ -760,7 +792,7 @@ if( !function_exists ('iwp_mmb_get_posts')) {
760
 
761
  $return = $iwp_mmb_core->post_instance->get_posts($params);
762
  if (is_array($return) && array_key_exists('error', $return))
763
- iwp_mmb_response($return['error'], false);
764
  else {
765
  iwp_mmb_response($return, true);
766
  }
@@ -775,7 +807,7 @@ if( !function_exists ('iwp_mmb_delete_post')) {
775
 
776
  $return = $iwp_mmb_core->post_instance->delete_post($params);
777
  if (is_array($return) && array_key_exists('error', $return))
778
- iwp_mmb_response($return['error'], false);
779
  else {
780
  iwp_mmb_response($return, true);
781
  }
@@ -790,7 +822,7 @@ if( !function_exists ('iwp_mmb_delete_posts')) {
790
 
791
  $return = $iwp_mmb_core->post_instance->delete_posts($params);
792
  if (is_array($return) && array_key_exists('error', $return))
793
- iwp_mmb_response($return['error'], false);
794
  else {
795
  iwp_mmb_response($return, true);
796
  }
@@ -815,7 +847,7 @@ if( !function_exists ('iwp_mmb_get_pages')) {
815
 
816
  $return = $iwp_mmb_core->post_instance->get_pages($params);
817
  if (is_array($return) && array_key_exists('error', $return))
818
- iwp_mmb_response($return['error'], false);
819
  else {
820
  iwp_mmb_response($return, true);
821
  }
@@ -830,7 +862,7 @@ if( !function_exists ('iwp_mmb_delete_page')) {
830
 
831
  $return = $iwp_mmb_core->post_instance->delete_page($params);
832
  if (is_array($return) && array_key_exists('error', $return))
833
- iwp_mmb_response($return['error'], false);
834
  else {
835
  iwp_mmb_response($return, true);
836
  }
@@ -846,7 +878,7 @@ if( !function_exists ('iwp_mmb_get_links')) {
846
  $iwp_mmb_core->get_link_instance();
847
  $return = $iwp_mmb_core->link_instance->get_links($params);
848
  if (is_array($return) && array_key_exists('error', $return))
849
- iwp_mmb_response($return['error'], false);
850
  else {
851
  iwp_mmb_response($return, true);
852
  }
@@ -859,9 +891,9 @@ if( !function_exists ( 'iwp_mmb_add_link' )) {
859
  global $iwp_mmb_core;
860
  $iwp_mmb_core->get_link_instance();
861
  $return = $iwp_mmb_core->link_instance->add_link($params);
862
- if (is_array($return) && array_key_exists('error', $return))
863
-
864
- iwp_mmb_response($return['error'], false);
865
  else {
866
  iwp_mmb_response($return, true);
867
  }
@@ -876,8 +908,9 @@ if( !function_exists ('iwp_mmb_delete_link')) {
876
  $iwp_mmb_core->get_link_instance();
877
 
878
  $return = $iwp_mmb_core->link_instance->delete_link($params);
879
- if (is_array($return) && array_key_exists('error', $return))
880
- iwp_mmb_response($return['error'], false);
 
881
  else {
882
  iwp_mmb_response($return, true);
883
  }
@@ -891,8 +924,9 @@ if( !function_exists ('iwp_mmb_delete_links')) {
891
  $iwp_mmb_core->get_link_instance();
892
 
893
  $return = $iwp_mmb_core->link_instance->delete_links($params);
894
- if (is_array($return) && array_key_exists('error', $return))
895
- iwp_mmb_response($return['error'], false);
 
896
  else {
897
  iwp_mmb_response($return, true);
898
  }
@@ -912,7 +946,7 @@ if( !function_exists ( 'iwp_mmb_change_comment_status' )) {
912
  $iwp_mmb_core->get_stats_instance();
913
  iwp_mmb_response($iwp_mmb_core->stats_instance->get_comments_stats($params), true);
914
  }else
915
- iwp_mmb_response('Comment not updated', false);
916
  }
917
 
918
  }
@@ -932,7 +966,7 @@ if( !function_exists ('iwp_mmb_get_comments')) {
932
  $iwp_mmb_core->get_comment_instance();
933
  $return = $iwp_mmb_core->comment_instance->get_comments($params);
934
  if (is_array($return) && array_key_exists('error', $return))
935
- iwp_mmb_response($return['error'], false);
936
  else {
937
  iwp_mmb_response($return, true);
938
  }
@@ -947,7 +981,7 @@ if( !function_exists ('iwp_mmb_action_comment')) {
947
 
948
  $return = $iwp_mmb_core->comment_instance->action_comment($params);
949
  if (is_array($return) && array_key_exists('error', $return))
950
- iwp_mmb_response($return['error'], false);
951
  else {
952
  iwp_mmb_response($return, true);
953
  }
@@ -962,7 +996,7 @@ if( !function_exists ('iwp_mmb_bulk_action_comments')) {
962
 
963
  $return = $iwp_mmb_core->comment_instance->bulk_action_comments($params);
964
  if (is_array($return) && array_key_exists('error', $return))
965
- iwp_mmb_response($return['error'], false);
966
  else {
967
  iwp_mmb_response($return, true);
968
  }
@@ -977,7 +1011,7 @@ if( !function_exists ('iwp_mmb_reply_comment')) {
977
 
978
  $return = $iwp_mmb_core->comment_instance->reply_comment($params);
979
  if (is_array($return) && array_key_exists('error', $return))
980
- iwp_mmb_response($return['error'], false);
981
  else {
982
  iwp_mmb_response($return, true);
983
  }
@@ -995,7 +1029,7 @@ if( !function_exists('iwp_mmb_wp_optimize')){
995
 
996
  $return = $iwp_mmb_core->optimize_instance->cleanup_system($params);
997
  if (is_array($return) && array_key_exists('error', $return))
998
- iwp_mmb_response($return['error'], false);
999
  else {
1000
  iwp_mmb_response($return, true);
1001
  }
@@ -1016,7 +1050,7 @@ if( !function_exists('iwp_mmb_wordfence_scan')){
1016
 
1017
  $return = $iwp_mmb_core->wordfence_instance->scan($params);
1018
  if (is_array($return) && array_key_exists('error', $return))
1019
- iwp_mmb_response($return['error'], false);
1020
  else {
1021
  iwp_mmb_response($return, true);
1022
  }
@@ -1031,7 +1065,7 @@ if( !function_exists('iwp_mmb_wordfence_load')){
1031
 
1032
  $return = $iwp_mmb_core->wordfence_instance->load($params);
1033
  if (is_array($return) && array_key_exists('error', $return))
1034
- iwp_mmb_response($return['error'], false);
1035
  else {
1036
  iwp_mmb_response($return, true);
1037
  }
@@ -1050,7 +1084,7 @@ if( !function_exists('iwp_mmb_get_all_links')){
1050
  $iwp_mmb_core->wp_blc_get_blinks();
1051
  $return = $iwp_mmb_core->blc_get_blinks->blc_get_all_links($params);
1052
  if (is_array($return) && array_key_exists('error', $return))
1053
- iwp_mmb_response($return['error'], false);
1054
  else {
1055
  iwp_mmb_response($return, true);
1056
  }
@@ -1063,7 +1097,7 @@ if( !function_exists('iwp_mmb_update_broken_link')){
1063
  $iwp_mmb_core->wp_blc_get_blinks();
1064
  $return = $iwp_mmb_core->blc_get_blinks->blc_update_link($params);
1065
  if (is_array($return) && array_key_exists('error', $return))
1066
- iwp_mmb_response($return['error'], false);
1067
  else {
1068
  iwp_mmb_response($return, true);
1069
  }
@@ -1076,7 +1110,7 @@ if( !function_exists('iwp_mmb_unlink_broken_link')){
1076
  $iwp_mmb_core->wp_blc_get_blinks();
1077
  $return = $iwp_mmb_core->blc_get_blinks->blc_unlink($params);
1078
  if (is_array($return) && array_key_exists('error', $return))
1079
- iwp_mmb_response($return['error'], false);
1080
  else {
1081
  iwp_mmb_response($return, true);
1082
  }
@@ -1089,7 +1123,7 @@ if( !function_exists('iwp_mmb_markasnot_broken_link')){
1089
  $iwp_mmb_core->wp_blc_get_blinks();
1090
  $return = $iwp_mmb_core->blc_get_blinks->blc_mark_as_not_broken($params);
1091
  if (is_array($return) && array_key_exists('error', $return))
1092
- iwp_mmb_response($return['error'], false);
1093
  else {
1094
  iwp_mmb_response($return, true);
1095
  }
@@ -1102,7 +1136,7 @@ if( !function_exists('iwp_mmb_dismiss_broken_link')){
1102
  $iwp_mmb_core->wp_blc_get_blinks();
1103
  $return = $iwp_mmb_core->blc_get_blinks->blc_dismiss_link($params);
1104
  if (is_array($return) && array_key_exists('error', $return))
1105
- iwp_mmb_response($return['error'], false);
1106
  else {
1107
  iwp_mmb_response($return, true);
1108
  }
@@ -1115,7 +1149,7 @@ if( !function_exists('iwp_mmb_undismiss_broken_link')){
1115
  $iwp_mmb_core->wp_blc_get_blinks();
1116
  $return = $iwp_mmb_core->blc_get_blinks->blc_undismiss_link($params);
1117
  if (is_array($return) && array_key_exists('error', $return))
1118
- iwp_mmb_response($return['error'], false);
1119
  else {
1120
  iwp_mmb_response($return, true);
1121
  }
@@ -1128,7 +1162,7 @@ if( !function_exists('iwp_mmb_bulk_actions_processor')){
1128
  $iwp_mmb_core->wp_blc_get_blinks();
1129
  $return = $iwp_mmb_core->blc_get_blinks->blc_bulk_actions($params);
1130
  if (is_array($return) && array_key_exists('error', $return))
1131
- iwp_mmb_response($return['error'], false);
1132
  else {
1133
  iwp_mmb_response($return, true);
1134
  }
@@ -1145,7 +1179,7 @@ if( !function_exists('iwp_mmb_gwmt_redirect_url')){
1145
  $iwp_mmb_core->wp_google_webmasters_crawls();
1146
  $return = $iwp_mmb_core->get_google_webmasters_crawls->google_webmasters_redirect($params);
1147
  if (is_array($return) && array_key_exists('error', $return))
1148
- iwp_mmb_response($return['error'], false);
1149
  else {
1150
  iwp_mmb_response($return, true);
1151
  }
@@ -1158,7 +1192,7 @@ if( !function_exists('iwp_mmb_gwmt_redirect_url_again')){
1158
  $iwp_mmb_core->wp_google_webmasters_crawls();
1159
  $return = $iwp_mmb_core->get_google_webmasters_crawls->google_webmasters_redirect_again($params);
1160
  if (is_array($return) && array_key_exists('error', $return))
1161
- iwp_mmb_response($return['error'], false);
1162
  else {
1163
  iwp_mmb_response($return, true);
1164
  }
@@ -1176,7 +1210,7 @@ if( !function_exists('iwp_mmb_file_editor_upload')){
1176
  $iwp_mmb_core->wp_get_file_editor();
1177
  $return = $iwp_mmb_core->get_file_editor->file_editor_upload($params);
1178
  if (is_array($return) && array_key_exists('error', $return))
1179
- iwp_mmb_response($return['error'], false);
1180
  else {
1181
  iwp_mmb_response($return, true);
1182
  }
@@ -1217,7 +1251,7 @@ if( !function_exists('iwp_mmb_plugin_actions') ){
1217
  if(!empty($failed)){
1218
  $f = implode(', ', $failed);
1219
  $s = count($f) > 1 ? 'Actions "' . $f . '" do' : 'Action "' . $f . '" does';
1220
- iwp_mmb_response($s.' not exist. Please update your IWP Client plugin.', false);
1221
  }
1222
 
1223
  }
@@ -1314,7 +1348,7 @@ if(!function_exists('iwp_mmb_shutdown')){
1314
  $response .= '<br>Try <a href="http://infinitewp.com/knowledge-base/increase-memory-limit/?utm_source=application&utm_medium=userapp&utm_campaign=kb" target="_blank">increasing the PHP memory limit</a> for this WP site.';
1315
  }
1316
  if(!$GLOBALS['IWP_RESPONSE_SENT']){
1317
- iwp_mmb_response($response, false);
1318
  }
1319
 
1320
  }
@@ -1334,7 +1368,7 @@ if(!function_exists('iwp_mmb_print_flush')){
1334
 
1335
  if(!function_exists('iwp_mmb_auto_print')){
1336
  function iwp_mmb_auto_print($unique_task){// this will help responding web server, will keep alive the script execution
1337
- $print_every_x_secs = 20;
1338
 
1339
  $current_time = microtime(1);
1340
  if(!$GLOBALS['IWP_MMB_PROFILING']['TASKS'][$unique_task]['START']){
@@ -1368,7 +1402,156 @@ if(!function_exists('iwp_mmb_check_redirects')){
1368
  }
1369
  }
1370
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1371
 
 
1372
 
1373
  $iwp_mmb_core = new IWP_MMB_Core();
1374
  $mmb_core = 1;
4
  Plugin URI: http://infinitewp.com/
5
  Description: This is the client plugin of InfiniteWP that communicates with the InfiniteWP Admin panel.
6
  Author: Revmakx
7
+ Version: 1.3.2
8
  Author URI: http://www.revmakx.com
9
  */
10
  /************************************************************
26
  **************************************************************/
27
 
28
  if(!defined('IWP_MMB_CLIENT_VERSION'))
29
+ define('IWP_MMB_CLIENT_VERSION', '1.3.2');
30
+
31
 
32
 
33
  if ( !defined('IWP_MMB_XFRAME_COOKIE')){
46
  require_once("$iwp_mmb_plugin_dir/helper.class.php");
47
  require_once("$iwp_mmb_plugin_dir/core.class.php");
48
  require_once("$iwp_mmb_plugin_dir/stats.class.php");
49
+ //require_once("$iwp_mmb_plugin_dir/backup.class.php");
50
+ require_once("$iwp_mmb_plugin_dir/backup.class.singlecall.php");
51
+ require_once("$iwp_mmb_plugin_dir/backup.class.multicall.php");
52
  require_once("$iwp_mmb_plugin_dir/installer.class.php");
53
 
54
  require_once("$iwp_mmb_plugin_dir/addons/manage_users/user.class.php");
57
 
58
  require_once("$iwp_mmb_plugin_dir/addons/post_links/link.class.php");
59
  require_once("$iwp_mmb_plugin_dir/addons/post_links/post.class.php");
60
+
61
  require_once("$iwp_mmb_plugin_dir/addons/wp_optimize/optimize.class.php");
62
 
63
  require_once("$iwp_mmb_plugin_dir/api.php");
119
  error_reporting(E_ALL ^ E_NOTICE);
120
  @ini_set("display_errors", 1);
121
 
122
+ iwp_mmb_create_backup_table();
123
+
124
  $action = $iwp_action;
125
  $_wp_using_ext_object_cache = false;
126
  @set_time_limit(600);
127
 
128
  if (!$iwp_mmb_core->check_if_user_exists($params['username']))
129
+ iwp_mmb_response(array('error' => 'Username <b>' . $params['username'] . '</b> does not have administrative access. Enter the correct username in the site options.', 'error_code' => 'username_does_not_have_administrative_access'), false);
130
 
131
  if ($action == 'add_site') {
132
  iwp_mmb_add_site($params);
133
+ iwp_mmb_response(array('error' => 'You should never see this.', 'error_code' => 'you_should_never_see_this'), false);
134
  }
135
 
136
  $auth = $iwp_mmb_core->authenticate_message($action . $id, $signature, $id);
137
  if ($auth === true) {
138
+ @ignore_user_abort(true);
139
  $GLOBALS['IWP_CLIENT_HISTORY_ID'] = $id;
140
 
141
  if(isset($params['username']) && !is_user_logged_in()){
187
  }
188
 
189
  } else {
190
+ iwp_mmb_response($auth, false);
191
  }
192
  } else {
193
+ //IWP_MMB_Stats::set_hit_count();
194
  }
195
  ob_end_clean();
196
  }
202
  {
203
  $return = array();
204
 
205
+ if ((is_array($response) && empty($response)) || (!is_array($response) && strlen($response) == 0)){
206
  $return['error'] = 'Empty response.';
207
+ $return['error_code'] = 'empty_response';
208
+ }
209
+ else if ($success){
210
  $return['success'] = $response;
211
+ }
212
+ else{
213
+ $return['error'] = $response['error'];
214
+ $return['error_code'] = $response['error_code'];
215
+ }
216
 
217
  if( !headers_sent() ){
218
  header('HTTP/1.0 200 OK');
237
 
238
 
239
  if(trim($activation_key) != get_option('iwp_client_activate_key')){ //iwp
240
+ iwp_mmb_response(array('error' => 'Invalid activation key', 'error_code' => 'iwp_mmb_add_site_invalid_activation_key'), false);
241
  return;
242
  }
243
 
257
  iwp_mmb_response($iwp_mmb_core->stats_instance->get_initial_stats(), true);
258
  delete_option('iwp_client_activate_key');//iwp
259
  } else if ($verify == 0) {
260
+ iwp_mmb_response(array('error' => 'Invalid message signature. Please contact us if you see this message often.', 'error_code' => 'iwp_mmb_add_site_invalid_message_signature'), false);
261
  } else {
262
+ iwp_mmb_response(array('error' => 'Command not successful. Please try again.', 'error_code' => 'iwp_mmb_add_site_command_not_successful'), false);
263
  }
264
  } else {
265
  if (!get_option('iwp_client_nossl_key')) {
282
  iwp_mmb_response($iwp_mmb_core->stats_instance->get_initial_stats(), true);
283
  delete_option('iwp_client_activate_key');//IWP
284
  } else
285
+ iwp_mmb_response(array('error' => 'Please deactivate & activate InfiniteWP Client plugin on your site, then add the site again.', 'error_code' => 'deactivate_ctivate_InfiniteWP_Client_plugin_add_site_again_not_iwp_client_nossl_key'), false);
286
  }
287
  } else {
288
+ iwp_mmb_response(array('error' => 'Please deactivate &amp; activate InfiniteWP Client plugin on your site, then add the site again.', 'error_code' => 'deactivate_ctivate_InfiniteWP_Client_plugin_add_site_again_not_iwp_client_nossl_key'), false);
289
  }
290
  } else {
291
+ iwp_mmb_response(array('error' => 'Invalid parameters received. Please try again.', 'error_code' => 'iwp_mmb_add_site_invalid_parameters_received'), false);
292
  }
293
  }
294
  }
352
  }
353
  }
354
 
355
+ if( !function_exists ( 'iwp_mmb_trigger_check' )) {
356
+ //backup multi call trigger and status check.
357
+ function iwp_mmb_trigger_check($params)
358
+ {
359
+ global $iwp_mmb_core;
360
+ $iwp_mmb_core->get_backup_instance($params['mechanism']);
361
+ $return = $iwp_mmb_core->backup_instance->trigger_check($params);
362
+
363
+ if (is_array($return) && array_key_exists('error', $return))
364
+ iwp_mmb_response($return, false);
365
+ else {
366
+ iwp_mmb_response($return, true);
367
+ }
368
+ }
369
+ }
370
+
371
+
372
  if( !function_exists ( 'iwp_mmb_backup_now' )) {
373
  //backup
374
  function iwp_mmb_backup_now($params)
379
  $return = $iwp_mmb_core->backup_instance->backup($params);
380
 
381
  if (is_array($return) && array_key_exists('error', $return))
382
+ iwp_mmb_response($return, false);
383
  else {
384
  iwp_mmb_response($return, true);
385
  }
390
  function iwp_mmb_run_task_now($params)
391
  {
392
  global $iwp_mmb_core;
393
+ $iwp_mmb_core->get_backup_instance($params['mechanism']);
394
+ //$return = $iwp_mmb_core->backup_instance->task_now(); //set_backup_task($params)
395
+ $return = $iwp_mmb_core->backup_instance->set_backup_task($params);
396
  if (is_array($return) && array_key_exists('error', $return))
397
+ iwp_mmb_response($return, false);
398
  else {
399
  iwp_mmb_response($return, true);
400
  }
408
  $iwp_mmb_core->get_backup_instance();
409
  $return = $iwp_mmb_core->backup_instance->delete_task_now($params['task_name']);
410
  if (is_array($return) && array_key_exists('error', $return))
411
+ iwp_mmb_response($return, false);
412
  else {
413
  iwp_mmb_response($return, true);
414
  }
422
  $return = $iwp_mmb_core->backup_instance->check_backup_compat($params);
423
 
424
  if (is_array($return) && array_key_exists('error', $return))
425
+ iwp_mmb_response($return, false);
426
  else {
427
  iwp_mmb_response($return, true);
428
  }
437
  $return = $iwp_mmb_core->stats_instance->get_backup_req($params);
438
 
439
  if (is_array($return) && array_key_exists('error', $return))
440
+ iwp_mmb_response($return, false);
441
  else {
442
  iwp_mmb_response($return, true);
443
  }
449
  function iwp_mmb_scheduled_backup($params)
450
  {
451
  global $iwp_mmb_core;
452
+
453
+ $iwp_mmb_core->get_backup_instance($params['mechanism']);
454
  $return = $iwp_mmb_core->backup_instance->set_backup_task($params);
455
  iwp_mmb_response($return, $return);
456
  }
483
  function iwp_mmb_restore_now($params)
484
  {
485
  global $iwp_mmb_core;
486
+ $iwp_mmb_core->get_backup_instance('multiCall');
487
  $return = $iwp_mmb_core->backup_instance->restore($params);
488
+
489
  if (is_array($return) && array_key_exists('error', $return))
490
+ iwp_mmb_response($return, false);
491
  else
492
  iwp_mmb_response($return, true);
493
 
502
  $iwp_mmb_core->get_backup_repository_instance();
503
  $return = $iwp_mmb_core->backup_repository_instance->backup_repository($params);
504
  if (is_array($return) && array_key_exists('error', $return))
505
+ iwp_mmb_response($return, false);
506
  else
507
  iwp_mmb_response($return, true);
508
  }
626
  global $iwp_mmb_core;
627
  $iwp_mmb_core->get_user_instance();
628
  $return = $iwp_mmb_core->user_instance->add_user($params);
629
+ if (is_array($return) && array_key_exists('error', $return)){
630
+ iwp_mmb_response($return, false);
631
+ }
632
  else {
633
  iwp_mmb_response($return, true);
634
  }
643
  $iwp_mmb_core->get_user_instance();
644
  $return = $iwp_mmb_core->user_instance->get_users($params);
645
  if (is_array($return) && array_key_exists('error', $return))
646
+ iwp_mmb_response($return, false);
647
  else {
648
  iwp_mmb_response($return, true);
649
  }
680
  $iwp_mmb_core->get_stats_instance();
681
  $return = $iwp_mmb_core->stats_instance->set_notifications($params);
682
  if (is_array($return) && array_key_exists('error', $return))
683
+ iwp_mmb_response($return, false);
684
  else {
685
  iwp_mmb_response($return, true);
686
  }
765
  iwp_mmb_response($return, true);
766
  else{
767
  if(isset($return['error'])){
768
+ iwp_mmb_response($return, false);
769
  } else {
770
  iwp_mmb_response($return, false);
771
  }
792
 
793
  $return = $iwp_mmb_core->post_instance->get_posts($params);
794
  if (is_array($return) && array_key_exists('error', $return))
795
+ iwp_mmb_response($return, false);
796
  else {
797
  iwp_mmb_response($return, true);
798
  }
807
 
808
  $return = $iwp_mmb_core->post_instance->delete_post($params);
809
  if (is_array($return) && array_key_exists('error', $return))
810
+ iwp_mmb_response($return, false);
811
  else {
812
  iwp_mmb_response($return, true);
813
  }
822
 
823
  $return = $iwp_mmb_core->post_instance->delete_posts($params);
824
  if (is_array($return) && array_key_exists('error', $return))
825
+ iwp_mmb_response($return, false);
826
  else {
827
  iwp_mmb_response($return, true);
828
  }
847
 
848
  $return = $iwp_mmb_core->post_instance->get_pages($params);
849
  if (is_array($return) && array_key_exists('error', $return))
850
+ iwp_mmb_response($return, false);
851
  else {
852
  iwp_mmb_response($return, true);
853
  }
862
 
863
  $return = $iwp_mmb_core->post_instance->delete_page($params);
864
  if (is_array($return) && array_key_exists('error', $return))
865
+ iwp_mmb_response($return, false);
866
  else {
867
  iwp_mmb_response($return, true);
868
  }
878
  $iwp_mmb_core->get_link_instance();
879
  $return = $iwp_mmb_core->link_instance->get_links($params);
880
  if (is_array($return) && array_key_exists('error', $return))
881
+ iwp_mmb_response($return, false);
882
  else {
883
  iwp_mmb_response($return, true);
884
  }
891
  global $iwp_mmb_core;
892
  $iwp_mmb_core->get_link_instance();
893
  $return = $iwp_mmb_core->link_instance->add_link($params);
894
+ if (is_array($return) && array_key_exists('error', $return)){
895
+ iwp_mmb_response($return, false);
896
+ }
897
  else {
898
  iwp_mmb_response($return, true);
899
  }
908
  $iwp_mmb_core->get_link_instance();
909
 
910
  $return = $iwp_mmb_core->link_instance->delete_link($params);
911
+ if (is_array($return) && array_key_exists('error', $return)){
912
+ iwp_mmb_response($return, false);
913
+ }
914
  else {
915
  iwp_mmb_response($return, true);
916
  }
924
  $iwp_mmb_core->get_link_instance();
925
 
926
  $return = $iwp_mmb_core->link_instance->delete_links($params);
927
+ if (is_array($return) && array_key_exists('error', $return)){
928
+ iwp_mmb_response($return, false);
929
+ }
930
  else {
931
  iwp_mmb_response($return, true);
932
  }
946
  $iwp_mmb_core->get_stats_instance();
947
  iwp_mmb_response($iwp_mmb_core->stats_instance->get_comments_stats($params), true);
948
  }else
949
+ iwp_mmb_response(array('error' => 'Comment not updated', 'error_code' => 'comment_not_updated'), false);
950
  }
951
 
952
  }
966
  $iwp_mmb_core->get_comment_instance();
967
  $return = $iwp_mmb_core->comment_instance->get_comments($params);
968
  if (is_array($return) && array_key_exists('error', $return))
969
+ iwp_mmb_response($return, false);
970
  else {
971
  iwp_mmb_response($return, true);
972
  }
981
 
982
  $return = $iwp_mmb_core->comment_instance->action_comment($params);
983
  if (is_array($return) && array_key_exists('error', $return))
984
+ iwp_mmb_response($return, false);
985
  else {
986
  iwp_mmb_response($return, true);
987
  }
996
 
997
  $return = $iwp_mmb_core->comment_instance->bulk_action_comments($params);
998
  if (is_array($return) && array_key_exists('error', $return))
999
+ iwp_mmb_response($return, false);
1000
  else {
1001
  iwp_mmb_response($return, true);
1002
  }
1011
 
1012
  $return = $iwp_mmb_core->comment_instance->reply_comment($params);
1013
  if (is_array($return) && array_key_exists('error', $return))
1014
+ iwp_mmb_response($return, false);
1015
  else {
1016
  iwp_mmb_response($return, true);
1017
  }
1029
 
1030
  $return = $iwp_mmb_core->optimize_instance->cleanup_system($params);
1031
  if (is_array($return) && array_key_exists('error', $return))
1032
+ iwp_mmb_response($return, false);
1033
  else {
1034
  iwp_mmb_response($return, true);
1035
  }
1050
 
1051
  $return = $iwp_mmb_core->wordfence_instance->scan($params);
1052
  if (is_array($return) && array_key_exists('error', $return))
1053
+ iwp_mmb_response($return, false);
1054
  else {
1055
  iwp_mmb_response($return, true);
1056
  }
1065
 
1066
  $return = $iwp_mmb_core->wordfence_instance->load($params);
1067
  if (is_array($return) && array_key_exists('error', $return))
1068
+ iwp_mmb_response($return, false);
1069
  else {
1070
  iwp_mmb_response($return, true);
1071
  }
1084
  $iwp_mmb_core->wp_blc_get_blinks();
1085
  $return = $iwp_mmb_core->blc_get_blinks->blc_get_all_links($params);
1086
  if (is_array($return) && array_key_exists('error', $return))
1087
+ iwp_mmb_response($return, false);
1088
  else {
1089
  iwp_mmb_response($return, true);
1090
  }
1097
  $iwp_mmb_core->wp_blc_get_blinks();
1098
  $return = $iwp_mmb_core->blc_get_blinks->blc_update_link($params);
1099
  if (is_array($return) && array_key_exists('error', $return))
1100
+ iwp_mmb_response($return, false);
1101
  else {
1102
  iwp_mmb_response($return, true);
1103
  }
1110
  $iwp_mmb_core->wp_blc_get_blinks();
1111
  $return = $iwp_mmb_core->blc_get_blinks->blc_unlink($params);
1112
  if (is_array($return) && array_key_exists('error', $return))
1113
+ iwp_mmb_response($return, false);
1114
  else {
1115
  iwp_mmb_response($return, true);
1116
  }
1123
  $iwp_mmb_core->wp_blc_get_blinks();
1124
  $return = $iwp_mmb_core->blc_get_blinks->blc_mark_as_not_broken($params);
1125
  if (is_array($return) && array_key_exists('error', $return))
1126
+ iwp_mmb_response($return, false);
1127
  else {
1128
  iwp_mmb_response($return, true);
1129
  }
1136
  $iwp_mmb_core->wp_blc_get_blinks();
1137
  $return = $iwp_mmb_core->blc_get_blinks->blc_dismiss_link($params);
1138
  if (is_array($return) && array_key_exists('error', $return))
1139
+ iwp_mmb_response($return, false);
1140
  else {
1141
  iwp_mmb_response($return, true);
1142
  }
1149
  $iwp_mmb_core->wp_blc_get_blinks();
1150
  $return = $iwp_mmb_core->blc_get_blinks->blc_undismiss_link($params);
1151
  if (is_array($return) && array_key_exists('error', $return))
1152
+ iwp_mmb_response($return, false);
1153
  else {
1154
  iwp_mmb_response($return, true);
1155
  }
1162
  $iwp_mmb_core->wp_blc_get_blinks();
1163
  $return = $iwp_mmb_core->blc_get_blinks->blc_bulk_actions($params);
1164
  if (is_array($return) && array_key_exists('error', $return))
1165
+ iwp_mmb_response($return, false);
1166
  else {
1167
  iwp_mmb_response($return, true);
1168
  }
1179
  $iwp_mmb_core->wp_google_webmasters_crawls();
1180
  $return = $iwp_mmb_core->get_google_webmasters_crawls->google_webmasters_redirect($params);
1181
  if (is_array($return) && array_key_exists('error', $return))
1182
+ iwp_mmb_response($return, false);
1183
  else {
1184
  iwp_mmb_response($return, true);
1185
  }
1192
  $iwp_mmb_core->wp_google_webmasters_crawls();
1193
  $return = $iwp_mmb_core->get_google_webmasters_crawls->google_webmasters_redirect_again($params);
1194
  if (is_array($return) && array_key_exists('error', $return))
1195
+ iwp_mmb_response($return, false);
1196
  else {
1197
  iwp_mmb_response($return, true);
1198
  }
1210
  $iwp_mmb_core->wp_get_file_editor();
1211
  $return = $iwp_mmb_core->get_file_editor->file_editor_upload($params);
1212
  if (is_array($return) && array_key_exists('error', $return))
1213
+ iwp_mmb_response($return, false);
1214
  else {
1215
  iwp_mmb_response($return, true);
1216
  }
1251
  if(!empty($failed)){
1252
  $f = implode(', ', $failed);
1253
  $s = count($f) > 1 ? 'Actions "' . $f . '" do' : 'Action "' . $f . '" does';
1254
+ iwp_mmb_response(array('error' => $s.' not exist. Please update your IWP Client plugin.', 'error_code' => 'update_your_client_plugin'), false);
1255
  }
1256
 
1257
  }
1348
  $response .= '<br>Try <a href="http://infinitewp.com/knowledge-base/increase-memory-limit/?utm_source=application&utm_medium=userapp&utm_campaign=kb" target="_blank">increasing the PHP memory limit</a> for this WP site.';
1349
  }
1350
  if(!$GLOBALS['IWP_RESPONSE_SENT']){
1351
+ iwp_mmb_response(array('error' => $response, 'error_code' => 'iwp_mmb_shutdown'), false);
1352
  }
1353
 
1354
  }
1368
 
1369
  if(!function_exists('iwp_mmb_auto_print')){
1370
  function iwp_mmb_auto_print($unique_task){// this will help responding web server, will keep alive the script execution
1371
+ $print_every_x_secs = 5;
1372
 
1373
  $current_time = microtime(1);
1374
  if(!$GLOBALS['IWP_MMB_PROFILING']['TASKS'][$unique_task]['START']){
1402
  }
1403
  }
1404
 
1405
+ if(!function_exists('iwp_mmb_convert_data')){
1406
+ function iwp_mmb_convert_data(){
1407
+
1408
+ //Schedule backup key need to save .
1409
+ global $wpdb;
1410
+
1411
+ $client_backup_tasks = get_option('iwp_client_backup_tasks');
1412
+
1413
+ $type = $action = $category = '';
1414
+
1415
+ if(!empty($client_backup_tasks) && is_array($client_backup_tasks)){
1416
+ foreach($client_backup_tasks as $key){
1417
+ if(!is_array($key) || !is_array($key['task_args'])){
1418
+ continue;
1419
+ }
1420
+ $task_name = $key['task_args']['task_name'];
1421
+
1422
+ if($task_name == 'Backup Now'){
1423
+ $type = 'backup';
1424
+ $action = 'now';
1425
+ $category = $key['task_args']['what'];
1426
+ }
1427
+ else{
1428
+ $type = 'scheduleBackup';
1429
+ $action = 'runTask';
1430
+ $category = $key['task_args']['what'];
1431
+ }
1432
+ if(is_array($key['task_results'])){
1433
+ $taskResultData = array();
1434
+ foreach($key['task_results'] as $keys => $task_results){
1435
+
1436
+ $historyID = $task_results['backhack_status']['adminHistoryID'];
1437
+
1438
+ $taskResultData = array('task_results' => array($historyID => $task_results));
1439
+ $taskResultData['task_results'][$historyID]['adminHistoryID'] = $historyID;
1440
+
1441
+ $insert = $wpdb->insert($wpdb->base_prefix.'iwp_backup_status',array( 'stage' => 'finished', 'status' => 'completed', 'action' => $action, 'type' => $type,'category' => $category ,'historyID' => $task_results['backhack_status']['adminHistoryID'],'finalStatus' => 'completed','startTime' => $task_results['time'],'endTime' => $task_results['time'],'statusMsg' => $statusArray['statusMsg'],'requestParams' => serialize($key),'taskName' => $task_name, 'responseParams' => '', 'taskResults' => serialize($taskResultData)), array( '%s', '%s','%s', '%s', '%s', '%s', '%d', '%s', '%d', '%d', '%s', '%s', '%s', '%s', '%s') );
1442
+
1443
+ }
1444
+ }
1445
+ }
1446
+ }
1447
+ }
1448
+ }
1449
+
1450
+
1451
+
1452
+ if(!function_exists('iwp_mmb_create_backup_table')){
1453
+ function iwp_mmb_create_backup_table(){
1454
+ global $wpdb;
1455
+
1456
+ $IWP_MMB_BACKUP_TABLE_VERSION = get_site_option( 'iwp_backup_table_version' );
1457
+ $table_name = $wpdb->base_prefix . "iwp_backup_status";
1458
+
1459
+ if(version_compare($IWP_MMB_BACKUP_TABLE_VERSION, '1.1') == -1){
1460
+ if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
1461
+
1462
+ $sql = "
1463
+ CREATE TABLE IF NOT EXISTS $table_name (
1464
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
1465
+ `historyID` int(11) NOT NULL,
1466
+ `taskName` varchar(255) NOT NULL,
1467
+ `action` varchar(50) NOT NULL,
1468
+ `type` varchar(50) NOT NULL,
1469
+ `category` varchar(50) NOT NULL,
1470
+ `stage` varchar(255) NOT NULL,
1471
+ `status` varchar(255) NOT NULL,
1472
+ `finalStatus` varchar(50) DEFAULT NULL,
1473
+ `statusMsg` varchar(255) NOT NULL,
1474
+ `requestParams` text NOT NULL,
1475
+ `responseParams` longtext,
1476
+ `taskResults` text,
1477
+ `startTime` int(11) DEFAULT NULL,
1478
+ `endTime` int(11) NOT NULL,
1479
+ PRIMARY KEY (`ID`)
1480
+ ) ENGINE=InnoDB;
1481
+ ";
1482
+
1483
+ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
1484
+ dbDelta( $sql );
1485
+
1486
+ if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
1487
+ //echo "table creation failed";
1488
+ $table_created = false;
1489
+ }
1490
+ else{
1491
+
1492
+ iwp_mmb_convert_data();
1493
+ $_NEW_IWP_MMB_BACKUP_TABLE_VERSION = '1.1';
1494
+ }
1495
+
1496
+ }else{
1497
+ $table_created = true;
1498
+ $_NEW_IWP_MMB_BACKUP_TABLE_VERSION = '1.1';
1499
+ }
1500
+ }
1501
+
1502
+ if(!empty($_NEW_IWP_MMB_BACKUP_TABLE_VERSION)){
1503
+ add_option( "iwp_backup_table_version", $_NEW_IWP_MMB_BACKUP_TABLE_VERSION);
1504
+ }
1505
+ }
1506
+ }
1507
+
1508
+ //-------------------------------------------------------------------
1509
+
1510
+ //-Function name - iwp_mmb_get_file_size()
1511
+ //-This is the alternate function to calculate file size
1512
+ //-This function is introduced to support the filesize calculation for the files which are larger than 2048MB
1513
+
1514
+ //----------------------------------------------------------------------
1515
+
1516
+ if(!function_exists('iwp_mmb_get_file_size')){
1517
+ function iwp_mmb_get_file_size($file)
1518
+ {
1519
+ clearstatcache();
1520
+ $normal_file_size = filesize($file);
1521
+ if(($normal_file_size !== false)&&($normal_file_size >= 0))
1522
+ {
1523
+ return $normal_file_size;
1524
+ }
1525
+ else
1526
+ {
1527
+ $file = realPath($file);
1528
+ if(!$file)
1529
+ {
1530
+ echo 'iwp_mmb_get_file_size_error : realPath error';
1531
+ }
1532
+ $ch = curl_init("file://" . $file);
1533
+ curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_FILE);
1534
+ curl_setopt($ch, CURLOPT_NOBODY, true);
1535
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
1536
+ curl_setopt($ch, CURLOPT_HEADER, true);
1537
+ $data = curl_exec($ch);
1538
+ $curl_error = curl_error($ch);
1539
+ curl_close($ch);
1540
+ if ($data !== false && preg_match('/Content-Length: (\d+)/', $data, $matches)) {
1541
+ return (string) $matches[1];
1542
+ }
1543
+ else
1544
+ {
1545
+ echo 'iwp_mmb_get_file_size_error : '.$curl_error;
1546
+ return $normal_file_size;
1547
+ }
1548
+ }
1549
+ }
1550
+ }
1551
+
1552
+ //add_action( 'plugins_loaded', 'iwp_mmb_create_backup_table' );
1553
 
1554
+ //register_activation_hook( __FILE__, 'iwp_mmb_create_backup_table' );
1555
 
1556
  $iwp_mmb_core = new IWP_MMB_Core();
1557
  $mmb_core = 1;
installer.class.php CHANGED
@@ -57,18 +57,18 @@ class IWP_MMB_Installer extends IWP_MMB_Core
57
 
58
  if (!isset($package) || empty($package))
59
  return array(
60
- 'error' => '<p>No files received. Internal error.</p>'
61
  );
62
 
63
  if (!$this->is_server_writable()) {
64
  return array(
65
- 'error' => 'Failed, please add FTP details'
66
  );
67
  }
68
 
69
  if (defined('WP_INSTALLING') && file_exists(ABSPATH . '.maintenance'))
70
  return array(
71
- 'error' => '<p>Site under maintanace.</p>'
72
  );
73
 
74
  if (!class_exists('WP_Upgrader'))
@@ -151,12 +151,12 @@ class IWP_MMB_Installer extends IWP_MMB_Core
151
  {
152
  if ($params == null || empty($params))
153
  return array(
154
- 'error' => 'No upgrades passed.'
155
  );
156
 
157
  if (!$this->is_server_writable()) {
158
  return array(
159
- 'error' => 'Failed. please add FTP details.'
160
  );
161
  }
162
 
@@ -246,7 +246,7 @@ class IWP_MMB_Installer extends IWP_MMB_Core
246
 
247
  if ($updated->response == "development" && $current->response == "upgrade") {
248
  return array(
249
- 'error' => '<font color="#900">Unexpected error. Please upgrade manually.</font>'
250
  );
251
  } else if ($updated->response == $current->response || ($updated->response == "upgrade" && $current->response == "development")) {
252
  if ($updated->locale != $current->locale) {
@@ -258,18 +258,18 @@ class IWP_MMB_Installer extends IWP_MMB_Core
258
  }
259
  if ($current_update == false)
260
  return array(
261
- 'error' => ' Localization mismatch. Try again.'
262
  );
263
  } else {
264
  $current_update = $updated;
265
  }
266
  } else
267
  return array(
268
- 'error' => ' Transient mismatch. Try again.'
269
  );
270
  } else
271
  return array(
272
- 'error' => ' Refresh transient failed. Try again.'
273
  );
274
  if ($current_update != false) {
275
  global $iwp_mmb_wp_version, $wp_filesystem, $wp_version;
@@ -283,7 +283,7 @@ class IWP_MMB_Installer extends IWP_MMB_Core
283
  $this->iwp_mmb_maintenance_mode(false);
284
  if (is_wp_error($result)) {
285
  return array(
286
- 'error' => $this->iwp_mmb_get_error($result)
287
  );
288
  } else
289
  return array(
@@ -297,7 +297,7 @@ class IWP_MMB_Installer extends IWP_MMB_Core
297
  $result = wp_update_core($current_update);
298
  if (is_wp_error($result)) {
299
  return array(
300
- 'error' => $this->iwp_mmb_get_error($result)
301
  );
302
  } else
303
  return array(
@@ -324,7 +324,7 @@ class IWP_MMB_Installer extends IWP_MMB_Core
324
  ));
325
  if (is_wp_error($res))
326
  return array(
327
- 'error' => $this->iwp_mmb_get_error($res)
328
  );
329
 
330
  $wp_dir = trailingslashit($wp_filesystem->abspath());
@@ -338,19 +338,19 @@ class IWP_MMB_Installer extends IWP_MMB_Core
338
  $download = $upgrader->download_package($core_package);
339
  if (is_wp_error($download))
340
  return array(
341
- 'error' => $this->iwp_mmb_get_error($download)
342
  );
343
 
344
  $working_dir = $upgrader->unpack_package($download);
345
  if (is_wp_error($working_dir))
346
  return array(
347
- 'error' => $this->iwp_mmb_get_error($working_dir)
348
  );
349
 
350
  if (!$wp_filesystem->copy($working_dir . '/wordpress/wp-admin/includes/update-core.php', $wp_dir . 'wp-admin/includes/update-core.php', true)) {
351
  $wp_filesystem->delete($working_dir, true);
352
  return array(
353
- 'error' => 'Unable to move update files.'
354
  );
355
  }
356
 
@@ -365,7 +365,7 @@ class IWP_MMB_Installer extends IWP_MMB_Core
365
  $this->iwp_mmb_maintenance_mode(false);
366
  if (is_wp_error($update_core))
367
  return array(
368
- 'error' => $this->iwp_mmb_get_error($update_core)
369
  );
370
  ob_end_flush();
371
  return array(
@@ -373,13 +373,13 @@ class IWP_MMB_Installer extends IWP_MMB_Core
373
  );
374
  } else {
375
  return array(
376
- 'error' => 'failed'
377
  );
378
  }
379
  }
380
  } else {
381
  return array(
382
- 'error' => 'failed'
383
  );
384
  }
385
  }
@@ -388,7 +388,7 @@ class IWP_MMB_Installer extends IWP_MMB_Core
388
  {
389
  if (!$plugins || empty($plugins))
390
  return array(
391
- 'error' => 'No plugin files for upgrade.'
392
  );
393
 
394
  $current = $this->iwp_mmb_get_transient('update_plugins');
@@ -412,13 +412,13 @@ class IWP_MMB_Installer extends IWP_MMB_Core
412
  if (!empty($result)) {
413
  foreach ($result as $plugin_slug => $plugin_info) {
414
  if (!$plugin_info || is_wp_error($plugin_info)) {
415
- $return[$plugin_slug] = $this->iwp_mmb_get_error($plugin_info);
416
  } else {
417
  if(!empty($result[$plugin_slug]) || (isset($current->checked[$plugin_slug]) && version_compare(array_search($plugin_slug, $versions), $current->checked[$plugin_slug], '<') == true)){
418
  $return[$plugin_slug] = 1;
419
  } else {
420
  update_option('iwp_client_forcerefresh', true);
421
- $return[$plugin_slug] = 'Could not refresh upgrade transients, please reload website data';
422
  }
423
  }
424
  }
@@ -428,12 +428,12 @@ class IWP_MMB_Installer extends IWP_MMB_Core
428
  );
429
  } else
430
  return array(
431
- 'error' => 'Upgrade failed.'
432
  );
433
  } else {
434
  ob_end_clean();
435
  return array(
436
- 'error' => 'WordPress update required first.'
437
  );
438
  }
439
  }
@@ -442,7 +442,7 @@ class IWP_MMB_Installer extends IWP_MMB_Core
442
  {
443
  if (!$themes || empty($themes))
444
  return array(
445
- 'error' => 'No theme files for upgrade.'
446
  );
447
 
448
  $current = $this->iwp_mmb_get_transient('update_themes');
@@ -467,13 +467,13 @@ class IWP_MMB_Installer extends IWP_MMB_Core
467
  if (!empty($result)) {
468
  foreach ($result as $theme_tmp => $theme_info) {
469
  if (is_wp_error($theme_info) || empty($theme_info)) {
470
- $return[$theme_tmp] = $this->iwp_mmb_get_error($theme_info);
471
  } else {
472
  if(!empty($result[$theme_tmp]) || (isset($current->checked[$theme_tmp]) && version_compare(array_search($theme_tmp, $versions), $current->checked[$theme_tmp], '<') == true)){
473
  $return[$theme_tmp] = 1;
474
  } else {
475
  update_option('iwp_client_forcerefresh', true);
476
- $return[$theme_tmp] = 'Could not refresh upgrade transients, please reload website data';
477
  }
478
  }
479
  }
@@ -482,12 +482,12 @@ class IWP_MMB_Installer extends IWP_MMB_Core
482
  );
483
  } else
484
  return array(
485
- 'error' => 'Upgrade failed.'
486
  );
487
  } else {
488
  ob_end_clean();
489
  return array(
490
- 'error' => 'WordPress update required first'
491
  );
492
  }
493
  }
@@ -501,7 +501,7 @@ class IWP_MMB_Installer extends IWP_MMB_Core
501
 
502
  if (!$premium || empty($premium))
503
  return array(
504
- 'error' => 'No premium files for upgrade.'
505
  );
506
 
507
  $upgrader = false;
@@ -599,12 +599,12 @@ class IWP_MMB_Installer extends IWP_MMB_Core
599
  } else if (is_string($update['callback'])) {
600
  $update_result = call_user_func($update['callback']);
601
  } else {
602
- $update_result = 'Upgrade function "' . $update['callback'] . '" does not exists.';
603
  }
604
 
605
- $update_result = $update_result !== true ? $this->iwp_mmb_get_error($update_result) : 1;
606
  } else
607
- $update_result = 'Bad update params.';
608
 
609
  $pr_update[$update['type'] . 's']['upgraded'][md5($update['name'])] = $update_result;
610
  }
@@ -612,7 +612,7 @@ class IWP_MMB_Installer extends IWP_MMB_Core
612
  return $pr_update;
613
  } else {
614
  foreach ($premium as $pr) {
615
- $result[$pr['type'] . 's']['upgraded'][md5($pr['name'])] = 'This premium update is not registered.';
616
  }
617
  return $result;
618
  }
@@ -926,11 +926,11 @@ class IWP_MMB_Installer extends IWP_MMB_Core
926
 
927
  if (is_wp_error($result)) {
928
  $result = array(
929
- 'error' => $result->get_error_message()
930
  );
931
  } elseif ($result === false) {
932
  $result = array(
933
- 'error' => "Failed to perform action."
934
  );
935
  } else {
936
  $result = "OK";
@@ -959,11 +959,11 @@ class IWP_MMB_Installer extends IWP_MMB_Core
959
 
960
  if (is_wp_error($result)) {
961
  $result = array(
962
- 'error' => $result->get_error_message()
963
  );
964
  } elseif ($result === false) {
965
  $result = array(
966
- 'error' => "Failed to perform action."
967
  );
968
  } else {
969
  $result = "OK";
57
 
58
  if (!isset($package) || empty($package))
59
  return array(
60
+ 'error' => '<p>No files received. Internal error.</p>', 'error_code' => 'no_files_receive_internal_error'
61
  );
62
 
63
  if (!$this->is_server_writable()) {
64
  return array(
65
+ 'error' => 'Failed, please add FTP details', 'error_code' => 'failed_please_add_ftp_install_remote_file'
66
  );
67
  }
68
 
69
  if (defined('WP_INSTALLING') && file_exists(ABSPATH . '.maintenance'))
70
  return array(
71
+ 'error' => '<p>Site under maintanace.</p>','error_code' => 'site_under_maintanace'
72
  );
73
 
74
  if (!class_exists('WP_Upgrader'))
151
  {
152
  if ($params == null || empty($params))
153
  return array(
154
+ 'error' => 'No upgrades passed.', 'error_code' => 'no_upgrades_passed'
155
  );
156
 
157
  if (!$this->is_server_writable()) {
158
  return array(
159
+ 'error' => 'Failed. please add FTP details.', 'error_code' => 'failed_please_add_ftp_do_upgrade'
160
  );
161
  }
162
 
246
 
247
  if ($updated->response == "development" && $current->response == "upgrade") {
248
  return array(
249
+ 'error' => '<font color="#900">Unexpected error. Please upgrade manually.</font>', 'error_code' => 'unexpected_error_please_upgrade_manually'
250
  );
251
  } else if ($updated->response == $current->response || ($updated->response == "upgrade" && $current->response == "development")) {
252
  if ($updated->locale != $current->locale) {
258
  }
259
  if ($current_update == false)
260
  return array(
261
+ 'error' => ' Localization mismatch. Try again.', 'error_code' => 'localization_mismatch'
262
  );
263
  } else {
264
  $current_update = $updated;
265
  }
266
  } else
267
  return array(
268
+ 'error' => ' Transient mismatch. Try again.', 'error_code' => 'transient_mismatch'
269
  );
270
  } else
271
  return array(
272
+ 'error' => ' Refresh transient failed. Try again.', 'error_code' => 'refresh_transient_failed'
273
  );
274
  if ($current_update != false) {
275
  global $iwp_mmb_wp_version, $wp_filesystem, $wp_version;
283
  $this->iwp_mmb_maintenance_mode(false);
284
  if (is_wp_error($result)) {
285
  return array(
286
+ 'error' => $this->iwp_mmb_get_error($result), 'error_code' => 'maintenance_mode_upgrade_core'
287
  );
288
  } else
289
  return array(
297
  $result = wp_update_core($current_update);
298
  if (is_wp_error($result)) {
299
  return array(
300
+ 'error' => $this->iwp_mmb_get_error($result), 'error_code' => 'wp_update_core_upgrade_core'
301
  );
302
  } else
303
  return array(
324
  ));
325
  if (is_wp_error($res))
326
  return array(
327
+ 'error' => $this->iwp_mmb_get_error($res), 'error_code' => 'upgrade_core_wp_error_res'
328
  );
329
 
330
  $wp_dir = trailingslashit($wp_filesystem->abspath());
338
  $download = $upgrader->download_package($core_package);
339
  if (is_wp_error($download))
340
  return array(
341
+ 'error' => $this->iwp_mmb_get_error($download), 'error_code' => 'download_upgrade_core'
342
  );
343
 
344
  $working_dir = $upgrader->unpack_package($download);
345
  if (is_wp_error($working_dir))
346
  return array(
347
+ 'error' => $this->iwp_mmb_get_error($working_dir), 'error_code' => 'working_dir_upgrade_core'
348
  );
349
 
350
  if (!$wp_filesystem->copy($working_dir . '/wordpress/wp-admin/includes/update-core.php', $wp_dir . 'wp-admin/includes/update-core.php', true)) {
351
  $wp_filesystem->delete($working_dir, true);
352
  return array(
353
+ 'error' => 'Unable to move update files.', 'error_code' => 'unable_to_move_update_files'
354
  );
355
  }
356
 
365
  $this->iwp_mmb_maintenance_mode(false);
366
  if (is_wp_error($update_core))
367
  return array(
368
+ 'error' => $this->iwp_mmb_get_error($update_core), 'error_code' => 'upgrade_core_wp_error'
369
  );
370
  ob_end_flush();
371
  return array(
373
  );
374
  } else {
375
  return array(
376
+ 'error' => 'failed', 'error_code' => 'failed_WP_Upgrader_class_not_exists'
377
  );
378
  }
379
  }
380
  } else {
381
  return array(
382
+ 'error' => 'failed', 'error_code' => 'failed_current_update_false'
383
  );
384
  }
385
  }
388
  {
389
  if (!$plugins || empty($plugins))
390
  return array(
391
+ 'error' => 'No plugin files for upgrade.', 'error_code' => 'no_plugin_files_for_upgrade'
392
  );
393
 
394
  $current = $this->iwp_mmb_get_transient('update_plugins');
412
  if (!empty($result)) {
413
  foreach ($result as $plugin_slug => $plugin_info) {
414
  if (!$plugin_info || is_wp_error($plugin_info)) {
415
+ $return[$plugin_slug] = array('error' => $this->iwp_mmb_get_error($plugin_info), 'error_code' => 'upgrade_plugins_wp_error');
416
  } else {
417
  if(!empty($result[$plugin_slug]) || (isset($current->checked[$plugin_slug]) && version_compare(array_search($plugin_slug, $versions), $current->checked[$plugin_slug], '<') == true)){
418
  $return[$plugin_slug] = 1;
419
  } else {
420
  update_option('iwp_client_forcerefresh', true);
421
+ $return[$plugin_slug] = array('error' => 'Could not refresh upgrade transients, please reload website data', 'error_code' => 'upgrade_plugins_could_not_refresh_upgrade_transients_please_reload_website_data');
422
  }
423
  }
424
  }
428
  );
429
  } else
430
  return array(
431
+ 'error' => 'Upgrade failed.', 'error_code' => 'upgrade_failed_upgrade_plugins'
432
  );
433
  } else {
434
  ob_end_clean();
435
  return array(
436
+ 'error' => 'WordPress update required first.', 'error_code' => 'upgrade_plugins_wordPress_update_required_first'
437
  );
438
  }
439
  }
442
  {
443
  if (!$themes || empty($themes))
444
  return array(
445
+ 'error' => 'No theme files for upgrade.', 'error_code' => 'no_theme_files_for_upgrade'
446
  );
447
 
448
  $current = $this->iwp_mmb_get_transient('update_themes');
467
  if (!empty($result)) {
468
  foreach ($result as $theme_tmp => $theme_info) {
469
  if (is_wp_error($theme_info) || empty($theme_info)) {
470
+ $return[$theme_tmp] = array('error' => $this->iwp_mmb_get_error($theme_info), 'error_code' => 'upgrade_themes_wp_error');
471
  } else {
472
  if(!empty($result[$theme_tmp]) || (isset($current->checked[$theme_tmp]) && version_compare(array_search($theme_tmp, $versions), $current->checked[$theme_tmp], '<') == true)){
473
  $return[$theme_tmp] = 1;
474
  } else {
475
  update_option('iwp_client_forcerefresh', true);
476
+ $return[$theme_tmp] = array('error' => 'Could not refresh upgrade transients, please reload website data', 'error_code' => 'upgrade_themes_could_not_refresh_upgrade_transients_reload_website');
477
  }
478
  }
479
  }
482
  );
483
  } else
484
  return array(
485
+ 'error' => 'Upgrade failed.', 'error_code' => 'upgrade_failed_upgrade_themes'
486
  );
487
  } else {
488
  ob_end_clean();
489
  return array(
490
+ 'error' => 'WordPress update required first', 'error_code' => 'wordPress_update_required_first_upgrade_themes'
491
  );
492
  }
493
  }
501
 
502
  if (!$premium || empty($premium))
503
  return array(
504
+ 'error' => 'No premium files for upgrade.', 'error_code' => 'no_premium_files_for_upgrade'
505
  );
506
 
507
  $upgrader = false;
599
  } else if (is_string($update['callback'])) {
600
  $update_result = call_user_func($update['callback']);
601
  } else {
602
+ $update_result = array('error' => 'Upgrade function "' . $update['callback'] . '" does not exists.', 'error_code' => 'upgrade_func_callback_does_not_exists');
603
  }
604
 
605
+ $update_result = $update_result !== true ? array('error' => $this->iwp_mmb_get_error($update_result), 'error_code' => 'upgrade_premium_wp_error') : 1;
606
  } else
607
+ $update_result = array('error' => 'Bad update params.', 'error_code' => 'bad_update_params');
608
 
609
  $pr_update[$update['type'] . 's']['upgraded'][md5($update['name'])] = $update_result;
610
  }
612
  return $pr_update;
613
  } else {
614
  foreach ($premium as $pr) {
615
+ $result[$pr['type'] . 's']['upgraded'][md5($pr['name'])] = array('error' => 'This premium update is not registered.', 'error_code' => 'premium_update_not_registered');
616
  }
617
  return $result;
618
  }
926
 
927
  if (is_wp_error($result)) {
928
  $result = array(
929
+ 'error' => $result->get_error_message(), 'error_code' => 'wp_error_edit_plugins'
930
  );
931
  } elseif ($result === false) {
932
  $result = array(
933
+ 'error' => "Failed to perform action.", 'error_code' => 'failed_to_perform_action_edit_plugins'
934
  );
935
  } else {
936
  $result = "OK";
959
 
960
  if (is_wp_error($result)) {
961
  $result = array(
962
+ 'error' => $result->get_error_message(), 'error_code' => 'wp_error_edit_themes'
963
  );
964
  } elseif ($result === false) {
965
  $result = array(
966
+ 'error' => "Failed to perform action.", 'error_code' => 'failed_to_perform_action_edit_themes'
967
  );
968
  } else {
969
  $result = "OK";
lib/Google/Auth/Abstract.php CHANGED
@@ -1,41 +1,41 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Http/Request.php";
18
-
19
- /**
20
- * Abstract class for the Authentication in the API client
21
- * @author Chris Chabot <chabotc@google.com>
22
- *
23
- */
24
- abstract class IWP_google_Auth_Abstract
25
- {
26
- /**
27
- * An utility function that first calls $this->auth->sign($request) and then
28
- * executes makeRequest() on that signed request. Used for when a request
29
- * should be authenticated
30
- * @param IWP_google_Http_Request $request
31
- * @return IWP_google_Http_Request $request
32
- */
33
- abstract public function authenticatedRequest(IWP_google_Http_Request $request);
34
-
35
- abstract public function authenticate($code);
36
- abstract public function sign(IWP_google_Http_Request $request);
37
- abstract public function createAuthUrl($scope);
38
-
39
- abstract public function refreshToken($refreshToken);
40
- abstract public function revokeToken();
41
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2010 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Http/Request.php";
18
+
19
+ /**
20
+ * Abstract class for the Authentication in the API client
21
+ * @author Chris Chabot <chabotc@google.com>
22
+ *
23
+ */
24
+ abstract class IWP_google_Auth_Abstract
25
+ {
26
+ /**
27
+ * An utility function that first calls $this->auth->sign($request) and then
28
+ * executes makeRequest() on that signed request. Used for when a request
29
+ * should be authenticated
30
+ * @param IWP_google_Http_Request $request
31
+ * @return IWP_google_Http_Request $request
32
+ */
33
+ abstract public function authenticatedRequest(IWP_google_Http_Request $request);
34
+
35
+ abstract public function authenticate($code);
36
+ abstract public function sign(IWP_google_Http_Request $request);
37
+ abstract public function createAuthUrl($scope);
38
+
39
+ abstract public function refreshToken($refreshToken);
40
+ abstract public function revokeToken();
41
+ }
lib/Google/Auth/AssertionCredentials.php CHANGED
@@ -1,133 +1,133 @@
1
- <?php
2
- /*
3
- * Copyright 2012 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Auth/OAuth2.php";
19
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Signer/P12.php";
20
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Utils.php";
21
-
22
- /**
23
- * Credentials object used for OAuth 2.0 Signed JWT assertion grants.
24
- *
25
- * @author Chirag Shah <chirags@google.com>
26
- */
27
- class IWP_google_Auth_AssertionCredentials
28
- {
29
- const MAX_TOKEN_LIFETIME_SECS = 3600;
30
-
31
- public $serviceAccountName;
32
- public $scopes;
33
- public $privateKey;
34
- public $privateKeyPassword;
35
- public $assertionType;
36
- public $sub;
37
- /**
38
- * @deprecated
39
- * @link http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06
40
- */
41
- public $prn;
42
- private $useCache;
43
-
44
- /**
45
- * @param $serviceAccountName
46
- * @param $scopes array List of scopes
47
- * @param $privateKey
48
- * @param string $privateKeyPassword
49
- * @param string $assertionType
50
- * @param bool|string $sub The email address of the user for which the
51
- * application is requesting delegated access.
52
- * @param bool useCache Whether to generate a cache key and allow
53
- * automatic caching of the generated token.
54
- */
55
- public function __construct(
56
- $serviceAccountName,
57
- $scopes,
58
- $privateKey,
59
- $privateKeyPassword = 'notasecret',
60
- $assertionType = 'http://oauth.net/grant_type/jwt/1.0/bearer',
61
- $sub = false,
62
- $useCache = true
63
- ) {
64
- $this->serviceAccountName = $serviceAccountName;
65
- $this->scopes = is_string($scopes) ? $scopes : implode(' ', $scopes);
66
- $this->privateKey = $privateKey;
67
- $this->privateKeyPassword = $privateKeyPassword;
68
- $this->assertionType = $assertionType;
69
- $this->sub = $sub;
70
- $this->prn = $sub;
71
- $this->useCache = $useCache;
72
- }
73
-
74
- /**
75
- * Generate a unique key to represent this credential.
76
- * @return string
77
- */
78
- public function getCacheKey()
79
- {
80
- if (!$this->useCache) {
81
- return false;
82
- }
83
- $h = $this->sub;
84
- $h .= $this->assertionType;
85
- $h .= $this->privateKey;
86
- $h .= $this->scopes;
87
- $h .= $this->serviceAccountName;
88
- return md5($h);
89
- }
90
-
91
- public function generateAssertion()
92
- {
93
- $now = time();
94
-
95
- $jwtParams = array(
96
- 'aud' => IWP_google_Auth_OAuth2::OAUTH2_TOKEN_URI,
97
- 'scope' => $this->scopes,
98
- 'iat' => $now,
99
- 'exp' => $now + self::MAX_TOKEN_LIFETIME_SECS,
100
- 'iss' => $this->serviceAccountName,
101
- );
102
-
103
- if ($this->sub !== false) {
104
- $jwtParams['sub'] = $this->sub;
105
- } else if ($this->prn !== false) {
106
- $jwtParams['prn'] = $this->prn;
107
- }
108
-
109
- return $this->makeSignedJwt($jwtParams);
110
- }
111
-
112
- /**
113
- * Creates a signed JWT.
114
- * @param array $payload
115
- * @return string The signed JWT.
116
- */
117
- private function makeSignedJwt($payload)
118
- {
119
- $header = array('typ' => 'JWT', 'alg' => 'RS256');
120
-
121
- $segments = array(
122
- IWP_google_Utils::urlSafeB64Encode(json_encode($header)),
123
- IWP_google_Utils::urlSafeB64Encode(json_encode($payload))
124
- );
125
-
126
- $signingInput = implode('.', $segments);
127
- $signer = new IWP_google_Signer_P12($this->privateKey, $this->privateKeyPassword);
128
- $signature = $signer->sign($signingInput);
129
- $segments[] = IWP_google_Utils::urlSafeB64Encode($signature);
130
-
131
- return implode(".", $segments);
132
- }
133
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2012 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Auth/OAuth2.php";
19
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Signer/P12.php";
20
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Utils.php";
21
+
22
+ /**
23
+ * Credentials object used for OAuth 2.0 Signed JWT assertion grants.
24
+ *
25
+ * @author Chirag Shah <chirags@google.com>
26
+ */
27
+ class IWP_google_Auth_AssertionCredentials
28
+ {
29
+ const MAX_TOKEN_LIFETIME_SECS = 3600;
30
+
31
+ public $serviceAccountName;
32
+ public $scopes;
33
+ public $privateKey;
34
+ public $privateKeyPassword;
35
+ public $assertionType;
36
+ public $sub;
37
+ /**
38
+ * @deprecated
39
+ * @link http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06
40
+ */
41
+ public $prn;
42
+ private $useCache;
43
+
44
+ /**
45
+ * @param $serviceAccountName
46
+ * @param $scopes array List of scopes
47
+ * @param $privateKey
48
+ * @param string $privateKeyPassword
49
+ * @param string $assertionType
50
+ * @param bool|string $sub The email address of the user for which the
51
+ * application is requesting delegated access.
52
+ * @param bool useCache Whether to generate a cache key and allow
53
+ * automatic caching of the generated token.
54
+ */
55
+ public function __construct(
56
+ $serviceAccountName,
57
+ $scopes,
58
+ $privateKey,
59
+ $privateKeyPassword = 'notasecret',
60
+ $assertionType = 'http://oauth.net/grant_type/jwt/1.0/bearer',
61
+ $sub = false,
62
+ $useCache = true
63
+ ) {
64
+ $this->serviceAccountName = $serviceAccountName;
65
+ $this->scopes = is_string($scopes) ? $scopes : implode(' ', $scopes);
66
+ $this->privateKey = $privateKey;
67
+ $this->privateKeyPassword = $privateKeyPassword;
68
+ $this->assertionType = $assertionType;
69
+ $this->sub = $sub;
70
+ $this->prn = $sub;
71
+ $this->useCache = $useCache;
72
+ }
73
+
74
+ /**
75
+ * Generate a unique key to represent this credential.
76
+ * @return string
77
+ */
78
+ public function getCacheKey()
79
+ {
80
+ if (!$this->useCache) {
81
+ return false;
82
+ }
83
+ $h = $this->sub;
84
+ $h .= $this->assertionType;
85
+ $h .= $this->privateKey;
86
+ $h .= $this->scopes;
87
+ $h .= $this->serviceAccountName;
88
+ return md5($h);
89
+ }
90
+
91
+ public function generateAssertion()
92
+ {
93
+ $now = time();
94
+
95
+ $jwtParams = array(
96
+ 'aud' => IWP_google_Auth_OAuth2::OAUTH2_TOKEN_URI,
97
+ 'scope' => $this->scopes,
98
+ 'iat' => $now,
99
+ 'exp' => $now + self::MAX_TOKEN_LIFETIME_SECS,
100
+ 'iss' => $this->serviceAccountName,
101
+ );
102
+
103
+ if ($this->sub !== false) {
104
+ $jwtParams['sub'] = $this->sub;
105
+ } else if ($this->prn !== false) {
106
+ $jwtParams['prn'] = $this->prn;
107
+ }
108
+
109
+ return $this->makeSignedJwt($jwtParams);
110
+ }
111
+
112
+ /**
113
+ * Creates a signed JWT.
114
+ * @param array $payload
115
+ * @return string The signed JWT.
116
+ */
117
+ private function makeSignedJwt($payload)
118
+ {
119
+ $header = array('typ' => 'JWT', 'alg' => 'RS256');
120
+
121
+ $segments = array(
122
+ IWP_google_Utils::urlSafeB64Encode(json_encode($header)),
123
+ IWP_google_Utils::urlSafeB64Encode(json_encode($payload))
124
+ );
125
+
126
+ $signingInput = implode('.', $segments);
127
+ $signer = new IWP_google_Signer_P12($this->privateKey, $this->privateKeyPassword);
128
+ $signature = $signer->sign($signingInput);
129
+ $segments[] = IWP_google_Utils::urlSafeB64Encode($signature);
130
+
131
+ return implode(".", $segments);
132
+ }
133
+ }
lib/Google/Auth/Exception.php CHANGED
@@ -1,22 +1,22 @@
1
- <?php
2
- /*
3
- * Copyright 2013 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Exception.php";
19
-
20
- class IWP_google_Auth_Exception extends IWP_google_Exception
21
- {
22
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2013 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Exception.php";
19
+
20
+ class IWP_google_Auth_Exception extends IWP_google_Exception
21
+ {
22
+ }
lib/Google/Auth/LoginTicket.php CHANGED
@@ -1,69 +1,69 @@
1
- <?php
2
- /*
3
- * Copyright 2011 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Auth/Exception.php";
19
-
20
- /**
21
- * Class to hold information about an authenticated login.
22
- *
23
- * @author Brian Eaton <beaton@google.com>
24
- */
25
- class IWP_google_Auth_LoginTicket
26
- {
27
- const USER_ATTR = "sub";
28
-
29
- // Information from id token envelope.
30
- private $envelope;
31
-
32
- // Information from id token payload.
33
- private $payload;
34
-
35
- /**
36
- * Creates a user based on the supplied token.
37
- *
38
- * @param string $envelope Header from a verified authentication token.
39
- * @param string $payload Information from a verified authentication token.
40
- */
41
- public function __construct($envelope, $payload)
42
- {
43
- $this->envelope = $envelope;
44
- $this->payload = $payload;
45
- }
46
-
47
- /**
48
- * Returns the numeric identifier for the user.
49
- * @throws IWP_google_Auth_Exception
50
- * @return
51
- */
52
- public function getUserId()
53
- {
54
- if (array_key_exists(self::USER_ATTR, $this->payload)) {
55
- return $this->payload[self::USER_ATTR];
56
- }
57
- throw new IWP_google_Auth_Exception("No user_id in token");
58
- }
59
-
60
- /**
61
- * Returns attributes from the login ticket. This can contain
62
- * various information about the user session.
63
- * @return array
64
- */
65
- public function getAttributes()
66
- {
67
- return array("envelope" => $this->envelope, "payload" => $this->payload);
68
- }
69
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2011 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Auth/Exception.php";
19
+
20
+ /**
21
+ * Class to hold information about an authenticated login.
22
+ *
23
+ * @author Brian Eaton <beaton@google.com>
24
+ */
25
+ class IWP_google_Auth_LoginTicket
26
+ {
27
+ const USER_ATTR = "sub";
28
+
29
+ // Information from id token envelope.
30
+ private $envelope;
31
+
32
+ // Information from id token payload.
33
+ private $payload;
34
+
35
+ /**
36
+ * Creates a user based on the supplied token.
37
+ *
38
+ * @param string $envelope Header from a verified authentication token.
39
+ * @param string $payload Information from a verified authentication token.
40
+ */
41
+ public function __construct($envelope, $payload)
42
+ {
43
+ $this->envelope = $envelope;
44
+ $this->payload = $payload;
45
+ }
46
+
47
+ /**
48
+ * Returns the numeric identifier for the user.
49
+ * @throws IWP_google_Auth_Exception
50
+ * @return
51
+ */
52
+ public function getUserId()
53
+ {
54
+ if (array_key_exists(self::USER_ATTR, $this->payload)) {
55
+ return $this->payload[self::USER_ATTR];
56
+ }
57
+ throw new IWP_google_Auth_Exception("No user_id in token");
58
+ }
59
+
60
+ /**
61
+ * Returns attributes from the login ticket. This can contain
62
+ * various information about the user session.
63
+ * @return array
64
+ */
65
+ public function getAttributes()
66
+ {
67
+ return array("envelope" => $this->envelope, "payload" => $this->payload);
68
+ }
69
+ }
lib/Google/Auth/OAuth2.php CHANGED
@@ -1,587 +1,587 @@
1
- <?php
2
- /*
3
- * Copyright 2008 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Auth/Abstract.php";
19
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Auth/AssertionCredentials.php";
20
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Auth/Exception.php";
21
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Auth/LoginTicket.php";
22
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Client.php";
23
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Http/Request.php";
24
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Utils.php";
25
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Verifier/Pem.php";
26
-
27
- /**
28
- * Authentication class that deals with the OAuth 2 web-server authentication flow
29
- *
30
- * @author Chris Chabot <chabotc@google.com>
31
- * @author Chirag Shah <chirags@google.com>
32
- *
33
- */
34
- class IWP_google_Auth_OAuth2 extends IWP_google_Auth_Abstract
35
- {
36
- const OAUTH2_REVOKE_URI = 'https://accounts.google.com/o/oauth2/revoke';
37
- const OAUTH2_TOKEN_URI = 'https://accounts.google.com/o/oauth2/token';
38
- const OAUTH2_AUTH_URL = 'https://accounts.google.com/o/oauth2/auth';
39
- const CLOCK_SKEW_SECS = 300; // five minutes in seconds
40
- const AUTH_TOKEN_LIFETIME_SECS = 300; // five minutes in seconds
41
- const MAX_TOKEN_LIFETIME_SECS = 86400; // one day in seconds
42
- const OAUTH2_ISSUER = 'accounts.google.com';
43
-
44
- /** @var IWP_google_Auth_AssertionCredentials $assertionCredentials */
45
- private $assertionCredentials;
46
-
47
- /**
48
- * @var string The state parameters for CSRF and other forgery protection.
49
- */
50
- private $state;
51
-
52
- /**
53
- * @var array The token bundle.
54
- */
55
- private $token = array();
56
-
57
- /**
58
- * @var IWP_google_Client the base client
59
- */
60
- private $client;
61
-
62
- /**
63
- * Instantiates the class, but does not initiate the login flow, leaving it
64
- * to the discretion of the caller.
65
- */
66
- public function __construct(IWP_google_Client $client)
67
- {
68
- $this->client = $client;
69
- }
70
-
71
- /**
72
- * Perform an authenticated / signed apiHttpRequest.
73
- * This function takes the apiHttpRequest, calls apiAuth->sign on it
74
- * (which can modify the request in what ever way fits the auth mechanism)
75
- * and then calls apiCurlIO::makeRequest on the signed request
76
- *
77
- * @param IWP_google_Http_Request $request
78
- * @return IWP_google_Http_Request The resulting HTTP response including the
79
- * responseHttpCode, responseHeaders and responseBody.
80
- */
81
- public function authenticatedRequest(IWP_google_Http_Request $request)
82
- {
83
- $request = $this->sign($request);
84
- return $this->client->getIo()->makeRequest($request);
85
- }
86
-
87
- /**
88
- * @param string $code
89
- * @throws IWP_google_Auth_Exception
90
- * @return string
91
- */
92
- public function authenticate($code)
93
- {
94
- if (strlen($code) == 0) {
95
- throw new IWP_google_Auth_Exception("Invalid code");
96
- }
97
-
98
- // We got here from the redirect from a successful authorization grant,
99
- // fetch the access token
100
- $request = new IWP_google_Http_Request(
101
- self::OAUTH2_TOKEN_URI,
102
- 'POST',
103
- array(),
104
- array(
105
- 'code' => $code,
106
- 'grant_type' => 'authorization_code',
107
- 'redirect_uri' => $this->client->getClassConfig($this, 'redirect_uri'),
108
- 'client_id' => $this->client->getClassConfig($this, 'client_id'),
109
- 'client_secret' => $this->client->getClassConfig($this, 'client_secret')
110
- )
111
- );
112
- $request->disableGzip();
113
- $response = $this->client->getIo()->makeRequest($request);
114
-
115
- if ($response->getResponseHttpCode() == 200) {
116
- $this->setAccessToken($response->getResponseBody());
117
- $this->token['created'] = time();
118
- return $this->getAccessToken();
119
- } else {
120
- $decodedResponse = json_decode($response->getResponseBody(), true);
121
- if ($decodedResponse != null && $decodedResponse['error']) {
122
- $decodedResponse = $decodedResponse['error'];
123
- }
124
- throw new IWP_google_Auth_Exception(
125
- sprintf(
126
- "Error fetching OAuth2 access token, message: '%s'",
127
- $decodedResponse
128
- ),
129
- $response->getResponseHttpCode()
130
- );
131
- }
132
- }
133
-
134
- /**
135
- * Create a URL to obtain user authorization.
136
- * The authorization endpoint allows the user to first
137
- * authenticate, and then grant/deny the access request.
138
- * @param string $scope The scope is expressed as a list of space-delimited strings.
139
- * @return string
140
- */
141
- public function createAuthUrl($scope)
142
- {
143
- $params = array(
144
- 'response_type' => 'code',
145
- 'redirect_uri' => $this->client->getClassConfig($this, 'redirect_uri'),
146
- 'client_id' => $this->client->getClassConfig($this, 'client_id'),
147
- 'scope' => $scope,
148
- 'access_type' => $this->client->getClassConfig($this, 'access_type'),
149
- 'approval_prompt' => $this->client->getClassConfig($this, 'approval_prompt'),
150
- );
151
-
152
- // If the list of scopes contains plus.login, add request_visible_actions
153
- // to auth URL.
154
- $rva = $this->client->getClassConfig($this, 'request_visible_actions');
155
- if (strpos($scope, 'plus.login') && strlen($rva) > 0) {
156
- $params['request_visible_actions'] = $rva;
157
- }
158
-
159
- if (isset($this->state)) {
160
- $params['state'] = $this->state;
161
- }
162
-
163
- return self::OAUTH2_AUTH_URL . "?" . http_build_query($params, '', '&');
164
- }
165
-
166
- /**
167
- * @param string $token
168
- * @throws IWP_google_Auth_Exception
169
- */
170
- public function setAccessToken($token)
171
- {
172
- $token = json_decode($token, true);
173
- if ($token == null) {
174
- throw new IWP_google_Auth_Exception('Could not json decode the token');
175
- }
176
- if (! isset($token['access_token'])) {
177
- throw new IWP_google_Auth_Exception("Invalid token format");
178
- }
179
- $this->token = $token;
180
- }
181
-
182
- public function getAccessToken()
183
- {
184
- return json_encode($this->token);
185
- }
186
-
187
- public function setState($state)
188
- {
189
- $this->state = $state;
190
- }
191
-
192
- public function setAssertionCredentials(IWP_google_Auth_AssertionCredentials $creds)
193
- {
194
- $this->assertionCredentials = $creds;
195
- }
196
-
197
- /**
198
- * Include an accessToken in a given apiHttpRequest.
199
- * @param IWP_google_Http_Request $request
200
- * @return IWP_google_Http_Request
201
- * @throws IWP_google_Auth_Exception
202
- */
203
- public function sign(IWP_google_Http_Request $request)
204
- {
205
- // add the developer key to the request before signing it
206
- if ($this->client->getClassConfig($this, 'developer_key')) {
207
- $request->setQueryParam('key', $this->client->getClassConfig($this, 'developer_key'));
208
- }
209
-
210
- // Cannot sign the request without an OAuth access token.
211
- if (null == $this->token && null == $this->assertionCredentials) {
212
- return $request;
213
- }
214
-
215
- // Check if the token is set to expire in the next 30 seconds
216
- // (or has already expired).
217
- if ($this->isAccessTokenExpired()) {
218
- if ($this->assertionCredentials) {
219
- $this->refreshTokenWithAssertion();
220
- } else {
221
- if (! array_key_exists('refresh_token', $this->token)) {
222
- throw new IWP_google_Auth_Exception(
223
- "The OAuth 2.0 access token has expired,"
224
- ." and a refresh token is not available. Refresh tokens"
225
- ." are not returned for responses that were auto-approved."
226
- );
227
- }
228
- $this->refreshToken($this->token['refresh_token']);
229
- }
230
- }
231
-
232
- // Add the OAuth2 header to the request
233
- $request->setRequestHeaders(
234
- array('Authorization' => 'Bearer ' . $this->token['access_token'])
235
- );
236
-
237
- return $request;
238
- }
239
-
240
- /**
241
- * Fetches a fresh access token with the given refresh token.
242
- * @param string $refreshToken
243
- * @return void
244
- */
245
- public function refreshToken($refreshToken)
246
- {
247
- $this->refreshTokenRequest(
248
- array(
249
- 'client_id' => $this->client->getClassConfig($this, 'client_id'),
250
- 'client_secret' => $this->client->getClassConfig($this, 'client_secret'),
251
- 'refresh_token' => $refreshToken,
252
- 'grant_type' => 'refresh_token'
253
- )
254
- );
255
- }
256
-
257
- /**
258
- * Fetches a fresh access token with a given assertion token.
259
- * @param IWP_google_Auth_AssertionCredentials $assertionCredentials optional.
260
- * @return void
261
- */
262
- public function refreshTokenWithAssertion($assertionCredentials = null)
263
- {
264
- if (!$assertionCredentials) {
265
- $assertionCredentials = $this->assertionCredentials;
266
- }
267
-
268
- $cacheKey = $assertionCredentials->getCacheKey();
269
-
270
- if ($cacheKey) {
271
- // We can check whether we have a token available in the
272
- // cache. If it is expired, we can retrieve a new one from
273
- // the assertion.
274
- $token = $this->client->getCache()->get($cacheKey);
275
- if ($token) {
276
- $this->setAccessToken($token);
277
- }
278
- if (!$this->isAccessTokenExpired()) {
279
- return;
280
- }
281
- }
282
-
283
- $this->refreshTokenRequest(
284
- array(
285
- 'grant_type' => 'assertion',
286
- 'assertion_type' => $assertionCredentials->assertionType,
287
- 'assertion' => $assertionCredentials->generateAssertion(),
288
- )
289
- );
290
-
291
- if ($cacheKey) {
292
- // Attempt to cache the token.
293
- $this->client->getCache()->set(
294
- $cacheKey,
295
- $this->getAccessToken()
296
- );
297
- }
298
- }
299
-
300
- private function refreshTokenRequest($params)
301
- {
302
- $http = new IWP_google_Http_Request(
303
- self::OAUTH2_TOKEN_URI,
304
- 'POST',
305
- array(),
306
- $params
307
- );
308
- $http->disableGzip();
309
- $request = $this->client->getIo()->makeRequest($http);
310
-
311
- $code = $request->getResponseHttpCode();
312
- $body = $request->getResponseBody();
313
- if (200 == $code) {
314
- $token = json_decode($body, true);
315
- if ($token == null) {
316
- throw new IWP_google_Auth_Exception("Could not json decode the access token");
317
- }
318
-
319
- if (! isset($token['access_token']) || ! isset($token['expires_in'])) {
320
- throw new IWP_google_Auth_Exception("Invalid token format");
321
- }
322
-
323
- $this->token['access_token'] = $token['access_token'];
324
- $this->token['expires_in'] = $token['expires_in'];
325
- $this->token['created'] = time();
326
- } else {
327
- throw new IWP_google_Auth_Exception("Error refreshing the OAuth2 token, message: '$body'", $code);
328
- }
329
- }
330
-
331
- /**
332
- * Revoke an OAuth2 access token or refresh token. This method will revoke the current access
333
- * token, if a token isn't provided.
334
- * @throws IWP_google_Auth_Exception
335
- * @param string|null $token The token (access token or a refresh token) that should be revoked.
336
- * @return boolean Returns True if the revocation was successful, otherwise False.
337
- */
338
- public function revokeToken($token = null)
339
- {
340
- if (!$token) {
341
- if (!$this->token) {
342
- // Not initialized, no token to actually revoke
343
- return false;
344
- } elseif (array_key_exists('refresh_token', $this->token)) {
345
- $token = $this->token['refresh_token'];
346
- } else {
347
- $token = $this->token['access_token'];
348
- }
349
- }
350
- $request = new IWP_google_Http_Request(
351
- self::OAUTH2_REVOKE_URI,
352
- 'POST',
353
- array(),
354
- "token=$token"
355
- );
356
- $request->disableGzip();
357
- $response = $this->client->getIo()->makeRequest($request);
358
- $code = $response->getResponseHttpCode();
359
- if ($code == 200) {
360
- $this->token = null;
361
- return true;
362
- }
363
-
364
- return false;
365
- }
366
-
367
- /**
368
- * Returns if the access_token is expired.
369
- * @return bool Returns True if the access_token is expired.
370
- */
371
- public function isAccessTokenExpired()
372
- {
373
- if (!$this->token || !isset($this->token['created'])) {
374
- return true;
375
- }
376
-
377
- // If the token is set to expire in the next 30 seconds.
378
- $expired = ($this->token['created']
379
- + ($this->token['expires_in'] - 30)) < time();
380
-
381
- return $expired;
382
- }
383
-
384
- // Gets federated sign-on certificates to use for verifying identity tokens.
385
- // Returns certs as array structure, where keys are key ids, and values
386
- // are PEM encoded certificates.
387
- private function getFederatedSignOnCerts()
388
- {
389
- return $this->retrieveCertsFromLocation(
390
- $this->client->getClassConfig($this, 'federated_signon_certs_url')
391
- );
392
- }
393
-
394
- /**
395
- * Retrieve and cache a certificates file.
396
- * @param $url location
397
- * @return array certificates
398
- */
399
- public function retrieveCertsFromLocation($url)
400
- {
401
- // If we're retrieving a local file, just grab it.
402
- if ("http" != substr($url, 0, 4)) {
403
- $file = file_get_contents($url);
404
- if ($file) {
405
- return json_decode($file, true);
406
- } else {
407
- throw new IWP_google_Auth_Exception(
408
- "Failed to retrieve verification certificates: '" .
409
- $url . "'."
410
- );
411
- }
412
- }
413
-
414
- // This relies on makeRequest caching certificate responses.
415
- $request = $this->client->getIo()->makeRequest(
416
- new IWP_google_Http_Request(
417
- $url
418
- )
419
- );
420
- if ($request->getResponseHttpCode() == 200) {
421
- $certs = json_decode($request->getResponseBody(), true);
422
- if ($certs) {
423
- return $certs;
424
- }
425
- }
426
- throw new IWP_google_Auth_Exception(
427
- "Failed to retrieve verification certificates: '" .
428
- $request->getResponseBody() . "'.",
429
- $request->getResponseHttpCode()
430
- );
431
- }
432
-
433
- /**
434
- * Verifies an id token and returns the authenticated apiLoginTicket.
435
- * Throws an exception if the id token is not valid.
436
- * The audience parameter can be used to control which id tokens are
437
- * accepted. By default, the id token must have been issued to this OAuth2 client.
438
- *
439
- * @param $id_token
440
- * @param $audience
441
- * @return IWP_google_Auth_LoginTicket
442
- */
443
- public function verifyIdToken($id_token = null, $audience = null)
444
- {
445
- if (!$id_token) {
446
- $id_token = $this->token['id_token'];
447
- }
448
- $certs = $this->getFederatedSignonCerts();
449
- if (!$audience) {
450
- $audience = $this->client->getClassConfig($this, 'client_id');
451
- }
452
-
453
- return $this->verifySignedJwtWithCerts($id_token, $certs, $audience, self::OAUTH2_ISSUER);
454
- }
455
-
456
- /**
457
- * Verifies the id token, returns the verified token contents.
458
- *
459
- * @param $jwt the token
460
- * @param $certs array of certificates
461
- * @param $required_audience the expected consumer of the token
462
- * @param [$issuer] the expected issues, defaults to Google
463
- * @param [$max_expiry] the max lifetime of a token, defaults to MAX_TOKEN_LIFETIME_SECS
464
- * @return token information if valid, false if not
465
- */
466
- public function verifySignedJwtWithCerts(
467
- $jwt,
468
- $certs,
469
- $required_audience,
470
- $issuer = null,
471
- $max_expiry = null
472
- ) {
473
- if (!$max_expiry) {
474
- // Set the maximum time we will accept a token for.
475
- $max_expiry = self::MAX_TOKEN_LIFETIME_SECS;
476
- }
477
-
478
- $segments = explode(".", $jwt);
479
- if (count($segments) != 3) {
480
- throw new IWP_google_Auth_Exception("Wrong number of segments in token: $jwt");
481
- }
482
- $signed = $segments[0] . "." . $segments[1];
483
- $signature = IWP_google_Utils::urlSafeB64Decode($segments[2]);
484
-
485
- // Parse envelope.
486
- $envelope = json_decode(IWP_google_Utils::urlSafeB64Decode($segments[0]), true);
487
- if (!$envelope) {
488
- throw new IWP_google_Auth_Exception("Can't parse token envelope: " . $segments[0]);
489
- }
490
-
491
- // Parse token
492
- $json_body = IWP_google_Utils::urlSafeB64Decode($segments[1]);
493
- $payload = json_decode($json_body, true);
494
- if (!$payload) {
495
- throw new IWP_google_Auth_Exception("Can't parse token payload: " . $segments[1]);
496
- }
497
-
498
- // Check signature
499
- $verified = false;
500
- foreach ($certs as $keyName => $pem) {
501
- $public_key = new IWP_google_Verifier_Pem($pem);
502
- if ($public_key->verify($signed, $signature)) {
503
- $verified = true;
504
- break;
505
- }
506
- }
507
-
508
- if (!$verified) {
509
- throw new IWP_google_Auth_Exception("Invalid token signature: $jwt");
510
- }
511
-
512
- // Check issued-at timestamp
513
- $iat = 0;
514
- if (array_key_exists("iat", $payload)) {
515
- $iat = $payload["iat"];
516
- }
517
- if (!$iat) {
518
- throw new IWP_google_Auth_Exception("No issue time in token: $json_body");
519
- }
520
- $earliest = $iat - self::CLOCK_SKEW_SECS;
521
-
522
- // Check expiration timestamp
523
- $now = time();
524
- $exp = 0;
525
- if (array_key_exists("exp", $payload)) {
526
- $exp = $payload["exp"];
527
- }
528
- if (!$exp) {
529
- throw new IWP_google_Auth_Exception("No expiration time in token: $json_body");
530
- }
531
- if ($exp >= $now + $max_expiry) {
532
- throw new IWP_google_Auth_Exception(
533
- sprintf("Expiration time too far in future: %s", $json_body)
534
- );
535
- }
536
-
537
- $latest = $exp + self::CLOCK_SKEW_SECS;
538
- if ($now < $earliest) {
539
- throw new IWP_google_Auth_Exception(
540
- sprintf(
541
- "Token used too early, %s < %s: %s",
542
- $now,
543
- $earliest,
544
- $json_body
545
- )
546
- );
547
- }
548
- if ($now > $latest) {
549
- throw new IWP_google_Auth_Exception(
550
- sprintf(
551
- "Token used too late, %s > %s: %s",
552
- $now,
553
- $latest,
554
- $json_body
555
- )
556
- );
557
- }
558
-
559
- $iss = $payload['iss'];
560
- if ($issuer && $iss != $issuer) {
561
- throw new IWP_google_Auth_Exception(
562
- sprintf(
563
- "Invalid issuer, %s != %s: %s",
564
- $iss,
565
- $issuer,
566
- $json_body
567
- )
568
- );
569
- }
570
-
571
- // Check audience
572
- $aud = $payload["aud"];
573
- if ($aud != $required_audience) {
574
- throw new IWP_google_Auth_Exception(
575
- sprintf(
576
- "Wrong recipient, %s != %s:",
577
- $aud,
578
- $required_audience,
579
- $json_body
580
- )
581
- );
582
- }
583
-
584
- // All good.
585
- return new IWP_google_Auth_LoginTicket($envelope, $payload);
586
- }
587
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2008 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Auth/Abstract.php";
19
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Auth/AssertionCredentials.php";
20
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Auth/Exception.php";
21
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Auth/LoginTicket.php";
22
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Client.php";
23
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Http/Request.php";
24
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Utils.php";
25
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Verifier/Pem.php";
26
+
27
+ /**
28
+ * Authentication class that deals with the OAuth 2 web-server authentication flow
29
+ *
30
+ * @author Chris Chabot <chabotc@google.com>
31
+ * @author Chirag Shah <chirags@google.com>
32
+ *
33
+ */
34
+ class IWP_google_Auth_OAuth2 extends IWP_google_Auth_Abstract
35
+ {
36
+ const OAUTH2_REVOKE_URI = 'https://accounts.google.com/o/oauth2/revoke';
37
+ const OAUTH2_TOKEN_URI = 'https://accounts.google.com/o/oauth2/token';
38
+ const OAUTH2_AUTH_URL = 'https://accounts.google.com/o/oauth2/auth';
39
+ const CLOCK_SKEW_SECS = 300; // five minutes in seconds
40
+ const AUTH_TOKEN_LIFETIME_SECS = 300; // five minutes in seconds
41
+ const MAX_TOKEN_LIFETIME_SECS = 86400; // one day in seconds
42
+ const OAUTH2_ISSUER = 'accounts.google.com';
43
+
44
+ /** @var IWP_google_Auth_AssertionCredentials $assertionCredentials */
45
+ private $assertionCredentials;
46
+
47
+ /**
48
+ * @var string The state parameters for CSRF and other forgery protection.
49
+ */
50
+ private $state;
51
+
52
+ /**
53
+ * @var array The token bundle.
54
+ */
55
+ private $token = array();
56
+
57
+ /**
58
+ * @var IWP_google_Client the base client
59
+ */
60
+ private $client;
61
+
62
+ /**
63
+ * Instantiates the class, but does not initiate the login flow, leaving it
64
+ * to the discretion of the caller.
65
+ */
66
+ public function __construct(IWP_google_Client $client)
67
+ {
68
+ $this->client = $client;
69
+ }
70
+
71
+ /**
72
+ * Perform an authenticated / signed apiHttpRequest.
73
+ * This function takes the apiHttpRequest, calls apiAuth->sign on it
74
+ * (which can modify the request in what ever way fits the auth mechanism)
75
+ * and then calls apiCurlIO::makeRequest on the signed request
76
+ *
77
+ * @param IWP_google_Http_Request $request
78
+ * @return IWP_google_Http_Request The resulting HTTP response including the
79
+ * responseHttpCode, responseHeaders and responseBody.
80
+ */
81
+ public function authenticatedRequest(IWP_google_Http_Request $request)
82
+ {
83
+ $request = $this->sign($request);
84
+ return $this->client->getIo()->makeRequest($request);
85
+ }
86
+
87
+ /**
88
+ * @param string $code
89
+ * @throws IWP_google_Auth_Exception
90
+ * @return string
91
+ */
92
+ public function authenticate($code)
93
+ {
94
+ if (strlen($code) == 0) {
95
+ throw new IWP_google_Auth_Exception("Invalid code");
96
+ }
97
+
98
+ // We got here from the redirect from a successful authorization grant,
99
+ // fetch the access token
100
+ $request = new IWP_google_Http_Request(
101
+ self::OAUTH2_TOKEN_URI,
102
+ 'POST',
103
+ array(),
104
+ array(
105
+ 'code' => $code,
106
+ 'grant_type' => 'authorization_code',
107
+ 'redirect_uri' => $this->client->getClassConfig($this, 'redirect_uri'),
108
+ 'client_id' => $this->client->getClassConfig($this, 'client_id'),
109
+ 'client_secret' => $this->client->getClassConfig($this, 'client_secret')
110
+ )
111
+ );
112
+ $request->disableGzip();
113
+ $response = $this->client->getIo()->makeRequest($request);
114
+
115
+ if ($response->getResponseHttpCode() == 200) {
116
+ $this->setAccessToken($response->getResponseBody());
117
+ $this->token['created'] = time();
118
+ return $this->getAccessToken();
119
+ } else {
120
+ $decodedResponse = json_decode($response->getResponseBody(), true);
121
+ if ($decodedResponse != null && $decodedResponse['error']) {
122
+ $decodedResponse = $decodedResponse['error'];
123
+ }
124
+ throw new IWP_google_Auth_Exception(
125
+ sprintf(
126
+ "Error fetching OAuth2 access token, message: '%s'",
127
+ $decodedResponse
128
+ ),
129
+ $response->getResponseHttpCode()
130
+ );
131
+ }
132
+ }
133
+
134
+ /**
135
+ * Create a URL to obtain user authorization.
136
+ * The authorization endpoint allows the user to first
137
+ * authenticate, and then grant/deny the access request.
138
+ * @param string $scope The scope is expressed as a list of space-delimited strings.
139
+ * @return string
140
+ */
141
+ public function createAuthUrl($scope)
142
+ {
143
+ $params = array(
144
+ 'response_type' => 'code',
145
+ 'redirect_uri' => $this->client->getClassConfig($this, 'redirect_uri'),
146
+ 'client_id' => $this->client->getClassConfig($this, 'client_id'),
147
+ 'scope' => $scope,
148
+ 'access_type' => $this->client->getClassConfig($this, 'access_type'),
149
+ 'approval_prompt' => $this->client->getClassConfig($this, 'approval_prompt'),
150
+ );
151
+
152
+ // If the list of scopes contains plus.login, add request_visible_actions
153
+ // to auth URL.
154
+ $rva = $this->client->getClassConfig($this, 'request_visible_actions');
155
+ if (strpos($scope, 'plus.login') && strlen($rva) > 0) {
156
+ $params['request_visible_actions'] = $rva;
157
+ }
158
+
159
+ if (isset($this->state)) {
160
+ $params['state'] = $this->state;
161
+ }
162
+
163
+ return self::OAUTH2_AUTH_URL . "?" . http_build_query($params, '', '&');
164
+ }
165
+
166
+ /**
167
+ * @param string $token
168
+ * @throws IWP_google_Auth_Exception
169
+ */
170
+ public function setAccessToken($token)
171
+ {
172
+ $token = json_decode($token, true);
173
+ if ($token == null) {
174
+ throw new IWP_google_Auth_Exception('Could not json decode the token');
175
+ }
176
+ if (! isset($token['access_token'])) {
177
+ throw new IWP_google_Auth_Exception("Invalid token format");
178
+ }
179
+ $this->token = $token;
180
+ }
181
+
182
+ public function getAccessToken()
183
+ {
184
+ return json_encode($this->token);
185
+ }
186
+
187
+ public function setState($state)
188
+ {
189
+ $this->state = $state;
190
+ }
191
+
192
+ public function setAssertionCredentials(IWP_google_Auth_AssertionCredentials $creds)
193
+ {
194
+ $this->assertionCredentials = $creds;
195
+ }
196
+
197
+ /**
198
+ * Include an accessToken in a given apiHttpRequest.
199
+ * @param IWP_google_Http_Request $request
200
+ * @return IWP_google_Http_Request
201
+ * @throws IWP_google_Auth_Exception
202
+ */
203
+ public function sign(IWP_google_Http_Request $request)
204
+ {
205
+ // add the developer key to the request before signing it
206
+ if ($this->client->getClassConfig($this, 'developer_key')) {
207
+ $request->setQueryParam('key', $this->client->getClassConfig($this, 'developer_key'));
208
+ }
209
+
210
+ // Cannot sign the request without an OAuth access token.
211
+ if (null == $this->token && null == $this->assertionCredentials) {
212
+ return $request;
213
+ }
214
+
215
+ // Check if the token is set to expire in the next 30 seconds
216
+ // (or has already expired).
217
+ if ($this->isAccessTokenExpired()) {
218
+ if ($this->assertionCredentials) {
219
+ $this->refreshTokenWithAssertion();
220
+ } else {
221
+ if (! array_key_exists('refresh_token', $this->token)) {
222
+ throw new IWP_google_Auth_Exception(
223
+ "The OAuth 2.0 access token has expired,"
224
+ ." and a refresh token is not available. Refresh tokens"
225
+ ." are not returned for responses that were auto-approved."
226
+ );
227
+ }
228
+ $this->refreshToken($this->token['refresh_token']);
229
+ }
230
+ }
231
+
232
+ // Add the OAuth2 header to the request
233
+ $request->setRequestHeaders(
234
+ array('Authorization' => 'Bearer ' . $this->token['access_token'])
235
+ );
236
+
237
+ return $request;
238
+ }
239
+
240
+ /**
241
+ * Fetches a fresh access token with the given refresh token.
242
+ * @param string $refreshToken
243
+ * @return void
244
+ */
245
+ public function refreshToken($refreshToken)
246
+ {
247
+ $this->refreshTokenRequest(
248
+ array(
249
+ 'client_id' => $this->client->getClassConfig($this, 'client_id'),
250
+ 'client_secret' => $this->client->getClassConfig($this, 'client_secret'),
251
+ 'refresh_token' => $refreshToken,
252
+ 'grant_type' => 'refresh_token'
253
+ )
254
+ );
255
+ }
256
+
257
+ /**
258
+ * Fetches a fresh access token with a given assertion token.
259
+ * @param IWP_google_Auth_AssertionCredentials $assertionCredentials optional.
260
+ * @return void
261
+ */
262
+ public function refreshTokenWithAssertion($assertionCredentials = null)
263
+ {
264
+ if (!$assertionCredentials) {
265
+ $assertionCredentials = $this->assertionCredentials;
266
+ }
267
+
268
+ $cacheKey = $assertionCredentials->getCacheKey();
269
+
270
+ if ($cacheKey) {
271
+ // We can check whether we have a token available in the
272
+ // cache. If it is expired, we can retrieve a new one from
273
+ // the assertion.
274
+ $token = $this->client->getCache()->get($cacheKey);
275
+ if ($token) {
276
+ $this->setAccessToken($token);
277
+ }
278
+ if (!$this->isAccessTokenExpired()) {
279
+ return;
280
+ }
281
+ }
282
+
283
+ $this->refreshTokenRequest(
284
+ array(
285
+ 'grant_type' => 'assertion',
286
+ 'assertion_type' => $assertionCredentials->assertionType,
287
+ 'assertion' => $assertionCredentials->generateAssertion(),
288
+ )
289
+ );
290
+
291
+ if ($cacheKey) {
292
+ // Attempt to cache the token.
293
+ $this->client->getCache()->set(
294
+ $cacheKey,
295
+ $this->getAccessToken()
296
+ );
297
+ }
298
+ }
299
+
300
+ private function refreshTokenRequest($params)
301
+ {
302
+ $http = new IWP_google_Http_Request(
303
+ self::OAUTH2_TOKEN_URI,
304
+ 'POST',
305
+ array(),
306
+ $params
307
+ );
308
+ $http->disableGzip();
309
+ $request = $this->client->getIo()->makeRequest($http);
310
+
311
+ $code = $request->getResponseHttpCode();
312
+ $body = $request->getResponseBody();
313
+ if (200 == $code) {
314
+ $token = json_decode($body, true);
315
+ if ($token == null) {
316
+ throw new IWP_google_Auth_Exception("Could not json decode the access token");
317
+ }
318
+
319
+ if (! isset($token['access_token']) || ! isset($token['expires_in'])) {
320
+ throw new IWP_google_Auth_Exception("Invalid token format");
321
+ }
322
+
323
+ $this->token['access_token'] = $token['access_token'];
324
+ $this->token['expires_in'] = $token['expires_in'];
325
+ $this->token['created'] = time();
326
+ } else {
327
+ throw new IWP_google_Auth_Exception("Error refreshing the OAuth2 token, message: '$body'", $code);
328
+ }
329
+ }
330
+
331
+ /**
332
+ * Revoke an OAuth2 access token or refresh token. This method will revoke the current access
333
+ * token, if a token isn't provided.
334
+ * @throws IWP_google_Auth_Exception
335
+ * @param string|null $token The token (access token or a refresh token) that should be revoked.
336
+ * @return boolean Returns True if the revocation was successful, otherwise False.
337
+ */
338
+ public function revokeToken($token = null)
339
+ {
340
+ if (!$token) {
341
+ if (!$this->token) {
342
+ // Not initialized, no token to actually revoke
343
+ return false;
344
+ } elseif (array_key_exists('refresh_token', $this->token)) {
345
+ $token = $this->token['refresh_token'];
346
+ } else {
347
+ $token = $this->token['access_token'];
348
+ }
349
+ }
350
+ $request = new IWP_google_Http_Request(
351
+ self::OAUTH2_REVOKE_URI,
352
+ 'POST',
353
+ array(),
354
+ "token=$token"
355
+ );
356
+ $request->disableGzip();
357
+ $response = $this->client->getIo()->makeRequest($request);
358
+ $code = $response->getResponseHttpCode();
359
+ if ($code == 200) {
360
+ $this->token = null;
361
+ return true;
362
+ }
363
+
364
+ return false;
365
+ }
366
+
367
+ /**
368
+ * Returns if the access_token is expired.
369
+ * @return bool Returns True if the access_token is expired.
370
+ */
371
+ public function isAccessTokenExpired()
372
+ {
373
+ if (!$this->token || !isset($this->token['created'])) {
374
+ return true;
375
+ }
376
+
377
+ // If the token is set to expire in the next 30 seconds.
378
+ $expired = ($this->token['created']
379
+ + ($this->token['expires_in'] - 30)) < time();
380
+
381
+ return $expired;
382
+ }
383
+
384
+ // Gets federated sign-on certificates to use for verifying identity tokens.
385
+ // Returns certs as array structure, where keys are key ids, and values
386
+ // are PEM encoded certificates.
387
+ private function getFederatedSignOnCerts()
388
+ {
389
+ return $this->retrieveCertsFromLocation(
390
+ $this->client->getClassConfig($this, 'federated_signon_certs_url')
391
+ );
392
+ }
393
+
394
+ /**
395
+ * Retrieve and cache a certificates file.
396
+ * @param $url location
397
+ * @return array certificates
398
+ */
399
+ public function retrieveCertsFromLocation($url)
400
+ {
401
+ // If we're retrieving a local file, just grab it.
402
+ if ("http" != substr($url, 0, 4)) {
403
+ $file = file_get_contents($url);
404
+ if ($file) {
405
+ return json_decode($file, true);
406
+ } else {
407
+ throw new IWP_google_Auth_Exception(
408
+ "Failed to retrieve verification certificates: '" .
409
+ $url . "'."
410
+ );
411
+ }
412
+ }
413
+
414
+ // This relies on makeRequest caching certificate responses.
415
+ $request = $this->client->getIo()->makeRequest(
416
+ new IWP_google_Http_Request(
417
+ $url
418
+ )
419
+ );
420
+ if ($request->getResponseHttpCode() == 200) {
421
+ $certs = json_decode($request->getResponseBody(), true);
422
+ if ($certs) {
423
+ return $certs;
424
+ }
425
+ }
426
+ throw new IWP_google_Auth_Exception(
427
+ "Failed to retrieve verification certificates: '" .
428
+ $request->getResponseBody() . "'.",
429
+ $request->getResponseHttpCode()
430
+ );
431
+ }
432
+
433
+ /**
434
+ * Verifies an id token and returns the authenticated apiLoginTicket.
435
+ * Throws an exception if the id token is not valid.
436
+ * The audience parameter can be used to control which id tokens are
437
+ * accepted. By default, the id token must have been issued to this OAuth2 client.
438
+ *
439
+ * @param $id_token
440
+ * @param $audience
441
+ * @return IWP_google_Auth_LoginTicket
442
+ */
443
+ public function verifyIdToken($id_token = null, $audience = null)
444
+ {
445
+ if (!$id_token) {
446
+ $id_token = $this->token['id_token'];
447
+ }
448
+ $certs = $this->getFederatedSignonCerts();
449
+ if (!$audience) {
450
+ $audience = $this->client->getClassConfig($this, 'client_id');
451
+ }
452
+
453
+ return $this->verifySignedJwtWithCerts($id_token, $certs, $audience, self::OAUTH2_ISSUER);
454
+ }
455
+
456
+ /**
457
+ * Verifies the id token, returns the verified token contents.
458
+ *
459
+ * @param $jwt the token
460
+ * @param $certs array of certificates
461
+ * @param $required_audience the expected consumer of the token
462
+ * @param [$issuer] the expected issues, defaults to Google
463
+ * @param [$max_expiry] the max lifetime of a token, defaults to MAX_TOKEN_LIFETIME_SECS
464
+ * @return token information if valid, false if not
465
+ */
466
+ public function verifySignedJwtWithCerts(
467
+ $jwt,
468
+ $certs,
469
+ $required_audience,
470
+ $issuer = null,
471
+ $max_expiry = null
472
+ ) {
473
+ if (!$max_expiry) {
474
+ // Set the maximum time we will accept a token for.
475
+ $max_expiry = self::MAX_TOKEN_LIFETIME_SECS;
476
+ }
477
+
478
+ $segments = explode(".", $jwt);
479
+ if (count($segments) != 3) {
480
+ throw new IWP_google_Auth_Exception("Wrong number of segments in token: $jwt");
481
+ }
482
+ $signed = $segments[0] . "." . $segments[1];
483
+ $signature = IWP_google_Utils::urlSafeB64Decode($segments[2]);
484
+
485
+ // Parse envelope.
486
+ $envelope = json_decode(IWP_google_Utils::urlSafeB64Decode($segments[0]), true);
487
+ if (!$envelope) {
488
+ throw new IWP_google_Auth_Exception("Can't parse token envelope: " . $segments[0]);
489
+ }
490
+
491
+ // Parse token
492
+ $json_body = IWP_google_Utils::urlSafeB64Decode($segments[1]);
493
+ $payload = json_decode($json_body, true);
494
+ if (!$payload) {
495
+ throw new IWP_google_Auth_Exception("Can't parse token payload: " . $segments[1]);
496
+ }
497
+
498
+ // Check signature
499
+ $verified = false;
500
+ foreach ($certs as $keyName => $pem) {
501
+ $public_key = new IWP_google_Verifier_Pem($pem);
502
+ if ($public_key->verify($signed, $signature)) {
503
+ $verified = true;
504
+ break;
505
+ }
506
+ }
507
+
508
+ if (!$verified) {
509
+ throw new IWP_google_Auth_Exception("Invalid token signature: $jwt");
510
+ }
511
+
512
+ // Check issued-at timestamp
513
+ $iat = 0;
514
+ if (array_key_exists("iat", $payload)) {
515
+ $iat = $payload["iat"];
516
+ }
517
+ if (!$iat) {
518
+ throw new IWP_google_Auth_Exception("No issue time in token: $json_body");
519
+ }
520
+ $earliest = $iat - self::CLOCK_SKEW_SECS;
521
+
522
+ // Check expiration timestamp
523
+ $now = time();
524
+ $exp = 0;
525
+ if (array_key_exists("exp", $payload)) {
526
+ $exp = $payload["exp"];
527
+ }
528
+ if (!$exp) {
529
+ throw new IWP_google_Auth_Exception("No expiration time in token: $json_body");
530
+ }
531
+ if ($exp >= $now + $max_expiry) {
532
+ throw new IWP_google_Auth_Exception(
533
+ sprintf("Expiration time too far in future: %s", $json_body)
534
+ );
535
+ }
536
+
537
+ $latest = $exp + self::CLOCK_SKEW_SECS;
538
+ if ($now < $earliest) {
539
+ throw new IWP_google_Auth_Exception(
540
+ sprintf(
541
+ "Token used too early, %s < %s: %s",
542
+ $now,
543
+ $earliest,
544
+ $json_body
545
+ )
546
+ );
547
+ }
548
+ if ($now > $latest) {
549
+ throw new IWP_google_Auth_Exception(
550
+ sprintf(
551
+ "Token used too late, %s > %s: %s",
552
+ $now,
553
+ $latest,
554
+ $json_body
555
+ )
556
+ );
557
+ }
558
+
559
+ $iss = $payload['iss'];
560
+ if ($issuer && $iss != $issuer) {
561
+ throw new IWP_google_Auth_Exception(
562
+ sprintf(
563
+ "Invalid issuer, %s != %s: %s",
564
+ $iss,
565
+ $issuer,
566
+ $json_body
567
+ )
568
+ );
569
+ }
570
+
571
+ // Check audience
572
+ $aud = $payload["aud"];
573
+ if ($aud != $required_audience) {
574
+ throw new IWP_google_Auth_Exception(
575
+ sprintf(
576
+ "Wrong recipient, %s != %s:",
577
+ $aud,
578
+ $required_audience,
579
+ $json_body
580
+ )
581
+ );
582
+ }
583
+
584
+ // All good.
585
+ return new IWP_google_Auth_LoginTicket($envelope, $payload);
586
+ }
587
+ }
lib/Google/Auth/Simple.php CHANGED
@@ -1,92 +1,92 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Auth/Abstract.php";
19
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Http/Request.php";
20
-
21
- /**
22
- * Simple API access implementation. Can either be used to make requests
23
- * completely unauthenticated, or by using a Simple API Access developer
24
- * key.
25
- * @author Chris Chabot <chabotc@google.com>
26
- * @author Chirag Shah <chirags@google.com>
27
- */
28
- class IWP_google_Auth_Simple extends IWP_google_Auth_Abstract
29
- {
30
- private $key = null;
31
- private $client;
32
-
33
- public function __construct(IWP_google_Client $client, $config = null)
34
- {
35
- $this->client = $client;
36
- }
37
-
38
- /**
39
- * Perform an authenticated / signed apiHttpRequest.
40
- * This function takes the apiHttpRequest, calls apiAuth->sign on it
41
- * (which can modify the request in what ever way fits the auth mechanism)
42
- * and then calls apiCurlIO::makeRequest on the signed request
43
- *
44
- * @param IWP_google_Http_Request $request
45
- * @return IWP_google_Http_Request The resulting HTTP response including the
46
- * responseHttpCode, responseHeaders and responseBody.
47
- */
48
- public function authenticatedRequest(IWP_google_Http_Request $request)
49
- {
50
- $request = $this->sign($request);
51
- return $this->io->makeRequest($request);
52
- }
53
-
54
- public function authenticate($code)
55
- {
56
- throw new IWP_google_Auth_Exception("Simple auth does not exchange tokens.");
57
- }
58
-
59
- public function setAccessToken($accessToken)
60
- {
61
- /* noop*/
62
- }
63
-
64
- public function getAccessToken()
65
- {
66
- return null;
67
- }
68
-
69
- public function createAuthUrl($scope)
70
- {
71
- return null;
72
- }
73
-
74
- public function refreshToken($refreshToken)
75
- {
76
- /* noop*/
77
- }
78
-
79
- public function revokeToken()
80
- {
81
- /* noop*/
82
- }
83
-
84
- public function sign(IWP_google_Http_Request $request)
85
- {
86
- $key = $this->client->getClassConfig($this, 'developer_key');
87
- if ($key) {
88
- $request->setQueryParam('key', $key);
89
- }
90
- return $request;
91
- }
92
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2010 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Auth/Abstract.php";
19
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Http/Request.php";
20
+
21
+ /**
22
+ * Simple API access implementation. Can either be used to make requests
23
+ * completely unauthenticated, or by using a Simple API Access developer
24
+ * key.
25
+ * @author Chris Chabot <chabotc@google.com>
26
+ * @author Chirag Shah <chirags@google.com>
27
+ */
28
+ class IWP_google_Auth_Simple extends IWP_google_Auth_Abstract
29
+ {
30
+ private $key = null;
31
+ private $client;
32
+
33
+ public function __construct(IWP_google_Client $client, $config = null)
34
+ {
35
+ $this->client = $client;
36
+ }
37
+
38
+ /**
39
+ * Perform an authenticated / signed apiHttpRequest.
40
+ * This function takes the apiHttpRequest, calls apiAuth->sign on it
41
+ * (which can modify the request in what ever way fits the auth mechanism)
42
+ * and then calls apiCurlIO::makeRequest on the signed request
43
+ *
44
+ * @param IWP_google_Http_Request $request
45
+ * @return IWP_google_Http_Request The resulting HTTP response including the
46
+ * responseHttpCode, responseHeaders and responseBody.
47
+ */
48
+ public function authenticatedRequest(IWP_google_Http_Request $request)
49
+ {
50
+ $request = $this->sign($request);
51
+ return $this->io->makeRequest($request);
52
+ }
53
+
54
+ public function authenticate($code)
55
+ {
56
+ throw new IWP_google_Auth_Exception("Simple auth does not exchange tokens.");
57
+ }
58
+
59
+ public function setAccessToken($accessToken)
60
+ {
61
+ /* noop*/
62
+ }
63
+
64
+ public function getAccessToken()
65
+ {
66
+ return null;
67
+ }
68
+
69
+ public function createAuthUrl($scope)
70
+ {
71
+ return null;
72
+ }
73
+
74
+ public function refreshToken($refreshToken)
75
+ {
76
+ /* noop*/
77
+ }
78
+
79
+ public function revokeToken()
80
+ {
81
+ /* noop*/
82
+ }
83
+
84
+ public function sign(IWP_google_Http_Request $request)
85
+ {
86
+ $key = $this->client->getClassConfig($this, 'developer_key');
87
+ if ($key) {
88
+ $request->setQueryParam('key', $key);
89
+ }
90
+ return $request;
91
+ }
92
+ }
lib/Google/Cache/Abstract.php CHANGED
@@ -1,53 +1,53 @@
1
- <?php
2
- /*
3
- * Copyright 2008 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- /**
19
- * Abstract storage class
20
- *
21
- * @author Chris Chabot <chabotc@google.com>
22
- */
23
- abstract class IWP_google_Cache_Abstract
24
- {
25
-
26
- abstract public function __construct(IWP_google_Client $client);
27
-
28
- /**
29
- * Retrieves the data for the given key, or false if they
30
- * key is unknown or expired
31
- *
32
- * @param String $key The key who's data to retrieve
33
- * @param boolean|int $expiration Expiration time in seconds
34
- *
35
- */
36
- abstract public function get($key, $expiration = false);
37
-
38
- /**
39
- * Store the key => $value set. The $value is serialized
40
- * by this function so can be of any type
41
- *
42
- * @param string $key Key of the data
43
- * @param string $value data
44
- */
45
- abstract public function set($key, $value);
46
-
47
- /**
48
- * Removes the key/data pair for the given $key
49
- *
50
- * @param String $key
51
- */
52
- abstract public function delete($key);
53
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2008 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ /**
19
+ * Abstract storage class
20
+ *
21
+ * @author Chris Chabot <chabotc@google.com>
22
+ */
23
+ abstract class IWP_google_Cache_Abstract
24
+ {
25
+
26
+ abstract public function __construct(IWP_google_Client $client);
27
+
28
+ /**
29
+ * Retrieves the data for the given key, or false if they
30
+ * key is unknown or expired
31
+ *
32
+ * @param String $key The key who's data to retrieve
33
+ * @param boolean|int $expiration Expiration time in seconds
34
+ *
35
+ */
36
+ abstract public function get($key, $expiration = false);
37
+
38
+ /**
39
+ * Store the key => $value set. The $value is serialized
40
+ * by this function so can be of any type
41
+ *
42
+ * @param string $key Key of the data
43
+ * @param string $value data
44
+ */
45
+ abstract public function set($key, $value);
46
+
47
+ /**
48
+ * Removes the key/data pair for the given $key
49
+ *
50
+ * @param String $key
51
+ */
52
+ abstract public function delete($key);
53
+ }
lib/Google/Cache/Apc.php CHANGED
@@ -1,73 +1,73 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Abstract.php";
19
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Exception.php";
20
-
21
- /**
22
- * A persistent storage class based on the APC cache, which is not
23
- * really very persistent, as soon as you restart your web server
24
- * the storage will be wiped, however for debugging and/or speed
25
- * it can be useful, and cache is a lot cheaper then storage.
26
- *
27
- * @author Chris Chabot <chabotc@google.com>
28
- */
29
- class IWP_google_Cache_Apc extends IWP_google_Cache_Abstract
30
- {
31
- public function __construct(IWP_google_Client $client)
32
- {
33
- if (! function_exists('apc_add') ) {
34
- throw new IWP_google_Cache_Exception("Apc functions not available");
35
- }
36
- }
37
-
38
- /**
39
- * @inheritDoc
40
- */
41
- public function get($key, $expiration = false)
42
- {
43
- $ret = apc_fetch($key);
44
- if ($ret === false) {
45
- return false;
46
- }
47
- if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) {
48
- $this->delete($key);
49
- return false;
50
- }
51
- return $ret['data'];
52
- }
53
-
54
- /**
55
- * @inheritDoc
56
- */
57
- public function set($key, $value)
58
- {
59
- $rc = apc_store($key, array('time' => time(), 'data' => $value));
60
- if ($rc == false) {
61
- throw new IWP_google_Cache_Exception("Couldn't store data");
62
- }
63
- }
64
-
65
- /**
66
- * @inheritDoc
67
- * @param String $key
68
- */
69
- public function delete($key)
70
- {
71
- apc_delete($key);
72
- }
73
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2010 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Abstract.php";
19
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Exception.php";
20
+
21
+ /**
22
+ * A persistent storage class based on the APC cache, which is not
23
+ * really very persistent, as soon as you restart your web server
24
+ * the storage will be wiped, however for debugging and/or speed
25
+ * it can be useful, and cache is a lot cheaper then storage.
26
+ *
27
+ * @author Chris Chabot <chabotc@google.com>
28
+ */
29
+ class IWP_google_Cache_Apc extends IWP_google_Cache_Abstract
30
+ {
31
+ public function __construct(IWP_google_Client $client)
32
+ {
33
+ if (! function_exists('apc_add') ) {
34
+ throw new IWP_google_Cache_Exception("Apc functions not available");
35
+ }
36
+ }
37
+
38
+ /**
39
+ * @inheritDoc
40
+ */
41
+ public function get($key, $expiration = false)
42
+ {
43
+ $ret = apc_fetch($key);
44
+ if ($ret === false) {
45
+ return false;
46
+ }
47
+ if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) {
48
+ $this->delete($key);
49
+ return false;
50
+ }
51
+ return $ret['data'];
52
+ }
53
+
54
+ /**
55
+ * @inheritDoc
56
+ */
57
+ public function set($key, $value)
58
+ {
59
+ $rc = apc_store($key, array('time' => time(), 'data' => $value));
60
+ if ($rc == false) {
61
+ throw new IWP_google_Cache_Exception("Couldn't store data");
62
+ }
63
+ }
64
+
65
+ /**
66
+ * @inheritDoc
67
+ * @param String $key
68
+ */
69
+ public function delete($key)
70
+ {
71
+ apc_delete($key);
72
+ }
73
+ }
lib/Google/Cache/Exception.php CHANGED
@@ -1,21 +1,21 @@
1
- <?php
2
- /*
3
- * Copyright 2013 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Exception.php";
18
-
19
- class IWP_google_Cache_Exception extends IWP_google_Exception
20
- {
21
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2013 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Exception.php";
18
+
19
+ class IWP_google_Cache_Exception extends IWP_google_Exception
20
+ {
21
+ }
lib/Google/Cache/File.php CHANGED
@@ -1,145 +1,145 @@
1
- <?php
2
- /*
3
- * Copyright 2008 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Abstract.php";
19
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Exception.php";
20
-
21
- /*
22
- * This class implements a basic on disk storage. While that does
23
- * work quite well it's not the most elegant and scalable solution.
24
- * It will also get you into a heap of trouble when you try to run
25
- * this in a clustered environment.
26
- *
27
- * @author Chris Chabot <chabotc@google.com>
28
- */
29
- class IWP_google_Cache_File extends IWP_google_Cache_Abstract
30
- {
31
- const MAX_LOCK_RETRIES = 10;
32
- private $path;
33
- private $fh;
34
-
35
- public function __construct(IWP_google_Client $client)
36
- {
37
- $this->path = $client->getClassConfig($this, 'directory');
38
- }
39
-
40
- public function get($key, $expiration = false)
41
- {
42
- $storageFile = $this->getCacheFile($key);
43
- $data = false;
44
-
45
- if (!file_exists($storageFile)) {
46
- return false;
47
- }
48
-
49
- if ($expiration) {
50
- $mtime = filemtime($storageFile);
51
- if (($now - $mtime) >= $expiration) {
52
- $this->delete($key);
53
- return false;
54
- }
55
- }
56
-
57
- if ($this->acquireReadLock($storageFile)) {
58
- $data = fread($this->fh, filesize($storageFile));
59
- $data = unserialize($data);
60
- $this->unlock($storageFile);
61
- }
62
-
63
- return $data;
64
- }
65
-
66
- public function set($key, $value)
67
- {
68
- $storageFile = $this->getWriteableCacheFile($key);
69
- if ($this->acquireWriteLock($storageFile)) {
70
- // We serialize the whole request object, since we don't only want the
71
- // responseContent but also the postBody used, headers, size, etc.
72
- $data = serialize($value);
73
- $result = fwrite($this->fh, $data);
74
- $this->unlock($storageFile);
75
- }
76
- }
77
-
78
- public function delete($key)
79
- {
80
- $file = $this->getCacheFile($key);
81
- if (file_exists($file) && !unlink($file)) {
82
- throw new IWP_google_Cache_Exception("Cache file could not be deleted");
83
- }
84
- }
85
-
86
- private function getWriteableCacheFile($file)
87
- {
88
- return $this->getCacheFile($file, true);
89
- }
90
-
91
- private function getCacheFile($file, $forWrite = false)
92
- {
93
- return $this->getCacheDir($file, $forWrite) . '/' . md5($file);
94
- }
95
-
96
- private function getCacheDir($file, $forWrite)
97
- {
98
- // use the first 2 characters of the hash as a directory prefix
99
- // this should prevent slowdowns due to huge directory listings
100
- // and thus give some basic amount of scalability
101
- $storageDir = $this->path . '/' . substr(md5($file), 0, 2);
102
- if ($forWrite && ! is_dir($storageDir)) {
103
- if (! mkdir($storageDir, 0755, true)) {
104
- throw new IWP_google_Cache_Exception("Could not create storage directory: $storageDir");
105
- }
106
- }
107
- return $storageDir;
108
- }
109
-
110
- private function acquireReadLock($storageFile)
111
- {
112
- return $this->acquireLock(LOCK_SH, $storageFile);
113
- }
114
-
115
- private function acquireWriteLock($storageFile)
116
- {
117
- $rc = $this->acquireLock(LOCK_EX, $storageFile);
118
- if (!$rc) {
119
- $this->delete($storageFile);
120
- }
121
- return $rc;
122
- }
123
-
124
- private function acquireLock($type, $storageFile)
125
- {
126
- $mode = $type == LOCK_EX ? "w" : "r";
127
- $this->fh = fopen($storageFile, $mode);
128
- $count = 0;
129
- while (!flock($this->fh, $type | LOCK_NB)) {
130
- // Sleep for 10ms.
131
- usleep(10000);
132
- if (++$count < self::MAX_LOCK_RETRIES) {
133
- return false;
134
- }
135
- }
136
- return true;
137
- }
138
-
139
- public function unlock($storageFile)
140
- {
141
- if ($this->fh) {
142
- flock($this->fh, LOCK_UN);
143
- }
144
- }
145
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2008 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Abstract.php";
19
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Exception.php";
20
+
21
+ /*
22
+ * This class implements a basic on disk storage. While that does
23
+ * work quite well it's not the most elegant and scalable solution.
24
+ * It will also get you into a heap of trouble when you try to run
25
+ * this in a clustered environment.
26
+ *
27
+ * @author Chris Chabot <chabotc@google.com>
28
+ */
29
+ class IWP_google_Cache_File extends IWP_google_Cache_Abstract
30
+ {
31
+ const MAX_LOCK_RETRIES = 10;
32
+ private $path;
33
+ private $fh;
34
+
35
+ public function __construct(IWP_google_Client $client)
36
+ {
37
+ $this->path = $client->getClassConfig($this, 'directory');
38
+ }
39
+
40
+ public function get($key, $expiration = false)
41
+ {
42
+ $storageFile = $this->getCacheFile($key);
43
+ $data = false;
44
+
45
+ if (!file_exists($storageFile)) {
46
+ return false;
47
+ }
48
+
49
+ if ($expiration) {
50
+ $mtime = filemtime($storageFile);
51
+ if (($now - $mtime) >= $expiration) {
52
+ $this->delete($key);
53
+ return false;
54
+ }
55
+ }
56
+
57
+ if ($this->acquireReadLock($storageFile)) {
58
+ $data = fread($this->fh, filesize($storageFile));
59
+ $data = unserialize($data);
60
+ $this->unlock($storageFile);
61
+ }
62
+
63
+ return $data;
64
+ }
65
+
66
+ public function set($key, $value)
67
+ {
68
+ $storageFile = $this->getWriteableCacheFile($key);
69
+ if ($this->acquireWriteLock($storageFile)) {
70
+ // We serialize the whole request object, since we don't only want the
71
+ // responseContent but also the postBody used, headers, size, etc.
72
+ $data = serialize($value);
73
+ $result = fwrite($this->fh, $data);
74
+ $this->unlock($storageFile);
75
+ }
76
+ }
77
+
78
+ public function delete($key)
79
+ {
80
+ $file = $this->getCacheFile($key);
81
+ if (file_exists($file) && !unlink($file)) {
82
+ throw new IWP_google_Cache_Exception("Cache file could not be deleted");
83
+ }
84
+ }
85
+
86
+ private function getWriteableCacheFile($file)
87
+ {
88
+ return $this->getCacheFile($file, true);
89
+ }
90
+
91
+ private function getCacheFile($file, $forWrite = false)
92
+ {
93
+ return $this->getCacheDir($file, $forWrite) . '/' . md5($file);
94
+ }
95
+
96
+ private function getCacheDir($file, $forWrite)
97
+ {
98
+ // use the first 2 characters of the hash as a directory prefix
99
+ // this should prevent slowdowns due to huge directory listings
100
+ // and thus give some basic amount of scalability
101
+ $storageDir = $this->path . '/' . substr(md5($file), 0, 2);
102
+ if ($forWrite && ! is_dir($storageDir)) {
103
+ if (! mkdir($storageDir, 0755, true)) {
104
+ throw new IWP_google_Cache_Exception("Could not create storage directory: $storageDir");
105
+ }
106
+ }
107
+ return $storageDir;
108
+ }
109
+
110
+ private function acquireReadLock($storageFile)
111
+ {
112
+ return $this->acquireLock(LOCK_SH, $storageFile);
113
+ }
114
+
115
+ private function acquireWriteLock($storageFile)
116
+ {
117
+ $rc = $this->acquireLock(LOCK_EX, $storageFile);
118
+ if (!$rc) {
119
+ $this->delete($storageFile);
120
+ }
121
+ return $rc;
122
+ }
123
+
124
+ private function acquireLock($type, $storageFile)
125
+ {
126
+ $mode = $type == LOCK_EX ? "w" : "r";
127
+ $this->fh = fopen($storageFile, $mode);
128
+ $count = 0;
129
+ while (!flock($this->fh, $type | LOCK_NB)) {
130
+ // Sleep for 10ms.
131
+ usleep(10000);
132
+ if (++$count < self::MAX_LOCK_RETRIES) {
133
+ return false;
134
+ }
135
+ }
136
+ return true;
137
+ }
138
+
139
+ public function unlock($storageFile)
140
+ {
141
+ if ($this->fh) {
142
+ flock($this->fh, LOCK_UN);
143
+ }
144
+ }
145
+ }
lib/Google/Cache/Memcache.php CHANGED
@@ -1,137 +1,137 @@
1
- <?php
2
- /*
3
- * Copyright 2008 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Abstract.php";
19
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Exception.php";
20
-
21
- /**
22
- * A persistent storage class based on the memcache, which is not
23
- * really very persistent, as soon as you restart your memcache daemon
24
- * the storage will be wiped.
25
- *
26
- * Will use either the memcache or memcached extensions, preferring
27
- * memcached.
28
- *
29
- * @author Chris Chabot <chabotc@google.com>
30
- */
31
- class IWP_google_Cache_Memcache extends IWP_google_Cache_Abstract
32
- {
33
- private $connection = false;
34
- private $mc = false;
35
- private $host;
36
- private $port;
37
-
38
- public function __construct(IWP_google_Client $client)
39
- {
40
- if (!function_exists('memcache_connect') && !class_exists("Memcached")) {
41
- throw new IWP_google_Cache_Exception("Memcache functions not available");
42
- }
43
- if ($client->isAppEngine()) {
44
- // No credentials needed for GAE.
45
- $this->mc = new Memcached();
46
- $this->connection = true;
47
- } else {
48
- $this->host = $client->getClassConfig($this, 'host');
49
- $this->port = $client->getClassConfig($this, 'port');
50
- if (empty($this->host) || empty($this->port)) {
51
- throw new IWP_google_Cache_Exception("You need to supply a valid memcache host and port");
52
- }
53
- }
54
- }
55
-
56
- /**
57
- * @inheritDoc
58
- */
59
- public function get($key, $expiration = false)
60
- {
61
- $this->connect();
62
- $ret = false;
63
- if ($this->mc) {
64
- $ret = $this->mc->get($key);
65
- } else {
66
- $ret = memcache_get($this->connection, $key);
67
- }
68
- if ($ret === false) {
69
- return false;
70
- }
71
- if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) {
72
- $this->delete($key);
73
- return false;
74
- }
75
- return $ret['data'];
76
- }
77
-
78
- /**
79
- * @inheritDoc
80
- * @param string $key
81
- * @param string $value
82
- * @throws IWP_google_Cache_Exception
83
- */
84
- public function set($key, $value)
85
- {
86
- $this->connect();
87
- // we store it with the cache_time default expiration so objects will at
88
- // least get cleaned eventually.
89
- $data = array('time' => time(), 'data' => $value);
90
- $rc = false;
91
- if ($this->mc) {
92
- $rc = $this->mc->set($key, $data);
93
- } else {
94
- $rc = memcache_set($this->connection, $key, $data, false);
95
- }
96
- if ($rc == false) {
97
- throw new IWP_google_Cache_Exception("Couldn't store data in cache");
98
- }
99
- }
100
-
101
- /**
102
- * @inheritDoc
103
- * @param String $key
104
- */
105
- public function delete($key)
106
- {
107
- $this->connect();
108
- if ($this->mc) {
109
- $this->mc->delete($key, 0);
110
- } else {
111
- memcache_delete($this->connection, $key, 0);
112
- }
113
- }
114
-
115
- /**
116
- * Lazy initialiser for memcache connection. Uses pconnect for to take
117
- * advantage of the persistence pool where possible.
118
- */
119
- private function connect()
120
- {
121
- if ($this->connection) {
122
- return;
123
- }
124
-
125
- if (class_exists("Memcached")) {
126
- $this->mc = new Memcached();
127
- $this->mc->addServer($this->host, $this->port);
128
- $this->connection = true;
129
- } else {
130
- $this->connection = memcache_pconnect($this->host, $this->port);
131
- }
132
-
133
- if (! $this->connection) {
134
- throw new IWP_google_Cache_Exception("Couldn't connect to memcache server");
135
- }
136
- }
137
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2008 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Abstract.php";
19
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Exception.php";
20
+
21
+ /**
22
+ * A persistent storage class based on the memcache, which is not
23
+ * really very persistent, as soon as you restart your memcache daemon
24
+ * the storage will be wiped.
25
+ *
26
+ * Will use either the memcache or memcached extensions, preferring
27
+ * memcached.
28
+ *
29
+ * @author Chris Chabot <chabotc@google.com>
30
+ */
31
+ class IWP_google_Cache_Memcache extends IWP_google_Cache_Abstract
32
+ {
33
+ private $connection = false;
34
+ private $mc = false;
35
+ private $host;
36
+ private $port;
37
+
38
+ public function __construct(IWP_google_Client $client)
39
+ {
40
+ if (!function_exists('memcache_connect') && !class_exists("Memcached")) {
41
+ throw new IWP_google_Cache_Exception("Memcache functions not available");
42
+ }
43
+ if ($client->isAppEngine()) {
44
+ // No credentials needed for GAE.
45
+ $this->mc = new Memcached();
46
+ $this->connection = true;
47
+ } else {
48
+ $this->host = $client->getClassConfig($this, 'host');
49
+ $this->port = $client->getClassConfig($this, 'port');
50
+ if (empty($this->host) || empty($this->port)) {
51
+ throw new IWP_google_Cache_Exception("You need to supply a valid memcache host and port");
52
+ }
53
+ }
54
+ }
55
+
56
+ /**
57
+ * @inheritDoc
58
+ */
59
+ public function get($key, $expiration = false)
60
+ {
61
+ $this->connect();
62
+ $ret = false;
63
+ if ($this->mc) {
64
+ $ret = $this->mc->get($key);
65
+ } else {
66
+ $ret = memcache_get($this->connection, $key);
67
+ }
68
+ if ($ret === false) {
69
+ return false;
70
+ }
71
+ if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) {
72
+ $this->delete($key);
73
+ return false;
74
+ }
75
+ return $ret['data'];
76
+ }
77
+
78
+ /**
79
+ * @inheritDoc
80
+ * @param string $key
81
+ * @param string $value
82
+ * @throws IWP_google_Cache_Exception
83
+ */
84
+ public function set($key, $value)
85
+ {
86
+ $this->connect();
87
+ // we store it with the cache_time default expiration so objects will at
88
+ // least get cleaned eventually.
89
+ $data = array('time' => time(), 'data' => $value);
90
+ $rc = false;
91
+ if ($this->mc) {
92
+ $rc = $this->mc->set($key, $data);
93
+ } else {
94
+ $rc = memcache_set($this->connection, $key, $data, false);
95
+ }
96
+ if ($rc == false) {
97
+ throw new IWP_google_Cache_Exception("Couldn't store data in cache");
98
+ }
99
+ }
100
+
101
+ /**
102
+ * @inheritDoc
103
+ * @param String $key
104
+ */
105
+ public function delete($key)
106
+ {
107
+ $this->connect();
108
+ if ($this->mc) {
109
+ $this->mc->delete($key, 0);
110
+ } else {
111
+ memcache_delete($this->connection, $key, 0);
112
+ }
113
+ }
114
+
115
+ /**
116
+ * Lazy initialiser for memcache connection. Uses pconnect for to take
117
+ * advantage of the persistence pool where possible.
118
+ */
119
+ private function connect()
120
+ {
121
+ if ($this->connection) {
122
+ return;
123
+ }
124
+
125
+ if (class_exists("Memcached")) {
126
+ $this->mc = new Memcached();
127
+ $this->mc->addServer($this->host, $this->port);
128
+ $this->connection = true;
129
+ } else {
130
+ $this->connection = memcache_pconnect($this->host, $this->port);
131
+ }
132
+
133
+ if (! $this->connection) {
134
+ throw new IWP_google_Cache_Exception("Couldn't connect to memcache server");
135
+ }
136
+ }
137
+ }
lib/Google/Cache/Null.php CHANGED
@@ -1,56 +1,56 @@
1
- <?php
2
- /*
3
- * Copyright 2014 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Abstract.php";
19
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Exception.php";
20
-
21
- /**
22
- * A blank storage class, for cases where caching is not
23
- * required.
24
- */
25
- class IWP_google_Cache_Null extends IWP_google_Cache_Abstract
26
- {
27
- public function __construct(IWP_google_Client $client)
28
- {
29
-
30
- }
31
-
32
- /**
33
- * @inheritDoc
34
- */
35
- public function get($key, $expiration = false)
36
- {
37
- return false;
38
- }
39
-
40
- /**
41
- * @inheritDoc
42
- */
43
- public function set($key, $value)
44
- {
45
- // Nop.
46
- }
47
-
48
- /**
49
- * @inheritDoc
50
- * @param String $key
51
- */
52
- public function delete($key)
53
- {
54
- // Nop.
55
- }
56
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Abstract.php";
19
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Cache/Exception.php";
20
+
21
+ /**
22
+ * A blank storage class, for cases where caching is not
23
+ * required.
24
+ */
25
+ class IWP_google_Cache_Null extends IWP_google_Cache_Abstract
26
+ {
27
+ public function __construct(IWP_google_Client $client)
28
+ {
29
+
30
+ }
31
+
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ public function get($key, $expiration = false)
36
+ {
37
+ return false;
38
+ }
39
+
40
+ /**
41
+ * @inheritDoc
42
+ */
43
+ public function set($key, $value)
44
+ {
45
+ // Nop.
46
+ }
47
+
48
+ /**
49
+ * @inheritDoc
50
+ * @param String $key
51
+ */
52
+ public function delete($key)
53
+ {
54
+ // Nop.
55
+ }
56
+ }
lib/Google/Client.php CHANGED
@@ -1,608 +1,608 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Auth/AssertionCredentials.php';
19
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Cache/File.php';
20
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Cache/Memcache.php';
21
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Config.php';
22
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Collection.php';
23
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Exception.php';
24
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/IO/Curl.php';
25
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/IO/Stream.php';
26
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Model.php';
27
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Service.php';
28
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Service/Resource.php';
29
-
30
- /**
31
- * The Google API Client
32
- * http://code.google.com/p/google-api-php-client/
33
- *
34
- * @author Chris Chabot <chabotc@google.com>
35
- * @author Chirag Shah <chirags@google.com>
36
- */
37
- class IWP_google_Client
38
- {
39
- const LIBVER = "1.0.5-beta";
40
- const USER_AGENT_SUFFIX = "google-api-php-client/";
41
- /**
42
- * @var IWP_google_Auth_Abstract $auth
43
- */
44
- private $auth;
45
-
46
- /**
47
- * @var IWP_google_IO_Abstract $io
48
- */
49
- private $io;
50
-
51
- /**
52
- * @var IWP_google_Cache_Abstract $cache
53
- */
54
- private $cache;
55
-
56
- /**
57
- * @var IWP_google_Config $config
58
- */
59
- private $config;
60
-
61
- /**
62
- * @var boolean $deferExecution
63
- */
64
- private $deferExecution = false;
65
-
66
- /** @var array $scopes */
67
- // Scopes requested by the client
68
- protected $requestedScopes = array();
69
-
70
- // definitions of services that are discovered.
71
- protected $services = array();
72
-
73
- // Used to track authenticated state, can't discover services after doing authenticate()
74
- private $authenticated = false;
75
-
76
- /**
77
- * Construct the Google Client.
78
- *
79
- * @param $config IWP_google_Config or string for the ini file to load
80
- */
81
- public function __construct($config = null)
82
- {
83
- if (! ini_get('date.timezone') &&
84
- function_exists('date_default_timezone_set')) {
85
- date_default_timezone_set('UTC');
86
- }
87
-
88
- if (is_string($config) && strlen($config)) {
89
- $config = new IWP_google_Config($config);
90
- } else if ( !($config instanceof IWP_google_Config)) {
91
- $config = new IWP_google_Config();
92
-
93
- if ($this->isAppEngine()) {
94
- // Automatically use Memcache if we're in AppEngine.
95
- $config->setCacheClass('IWP_google_Cache_Memcache');
96
- }
97
-
98
- if (version_compare(phpversion(), "5.3.4", "<=") || $this->isAppEngine()) {
99
- // Automatically disable compress.zlib, as currently unsupported.
100
- $config->setClassConfig('IWP_google_Http_Request', 'disable_gzip', true);
101
- }
102
- }
103
-
104
- if ($config->getIoClass() == IWP_google_Config::USE_AUTO_IO_SELECTION) {
105
- if (function_exists('curl_version') && function_exists('curl_exec')) {
106
- $config->setIoClass("IWP_google_Io_Curl");
107
- } else {
108
- $config->setIoClass("IWP_google_Io_Stream");
109
- }
110
- }
111
-
112
- $this->config = $config;
113
- }
114
-
115
- /**
116
- * Get a string containing the version of the library.
117
- *
118
- * @return string
119
- */
120
- public function getLibraryVersion()
121
- {
122
- return self::LIBVER;
123
- }
124
-
125
- /**
126
- * Attempt to exchange a code for an valid authentication token.
127
- * Helper wrapped around the OAuth 2.0 implementation.
128
- *
129
- * @param $code string code from accounts.google.com
130
- * @return string token
131
- */
132
- public function authenticate($code)
133
- {
134
- $this->authenticated = true;
135
- return $this->getAuth()->authenticate($code);
136
- }
137
-
138
- /**
139
- * Set the auth config from the JSON string provided.
140
- * This structure should match the file downloaded from
141
- * the "Download JSON" button on in the Google Developer
142
- * Console.
143
- * @param string $json the configuration json
144
- */
145
- public function setAuthConfig($json)
146
- {
147
- $data = json_decode($json);
148
- $key = isset($data->installed) ? 'installed' : 'web';
149
- if (!isset($data->$key)) {
150
- throw new IWP_google_Exception("Invalid client secret JSON file.");
151
- }
152
- $this->setClientId($data->$key->client_id);
153
- $this->setClientSecret($data->$key->client_secret);
154
- if (isset($data->$key->redirect_uris)) {
155
- $this->setRedirectUri($data->$key->redirect_uris[0]);
156
- }
157
- }
158
-
159
- /**
160
- * Set the auth config from the JSON file in the path
161
- * provided. This should match the file downloaded from
162
- * the "Download JSON" button on in the Google Developer
163
- * Console.
164
- * @param string $file the file location of the client json
165
- */
166
- public function setAuthConfigFile($file)
167
- {
168
- $this->setAuthConfig(file_get_contents($file));
169
- }
170
-
171
- /**
172
- * @return array
173
- * @visible For Testing
174
- */
175
- public function prepareScopes()
176
- {
177
- if (empty($this->requestedScopes)) {
178
- throw new IWP_google_Auth_Exception("No scopes specified");
179
- }
180
- $scopes = implode(' ', $this->requestedScopes);
181
- return $scopes;
182
- }
183
-
184
- /**
185
- * Set the OAuth 2.0 access token using the string that resulted from calling createAuthUrl()
186
- * or IWP_google_Client#getAccessToken().
187
- * @param string $accessToken JSON encoded string containing in the following format:
188
- * {"access_token":"TOKEN", "refresh_token":"TOKEN", "token_type":"Bearer",
189
- * "expires_in":3600, "id_token":"TOKEN", "created":1320790426}
190
- */
191
- public function setAccessToken($accessToken)
192
- {
193
- if ($accessToken == 'null') {
194
- $accessToken = null;
195
- }
196
- $this->getAuth()->setAccessToken($accessToken);
197
- }
198
-
199
-
200
-
201
- /**
202
- * Set the authenticator object
203
- * @param IWP_google_Auth_Abstract $auth
204
- */
205
- public function setAuth(IWP_google_Auth_Abstract $auth)
206
- {
207
- $this->config->setAuthClass(get_class($auth));
208
- $this->auth = $auth;
209
- }
210
-
211
- /**
212
- * Set the IO object
213
- * @param IWP_google_Io_Abstract $auth
214
- */
215
- public function setIo(IWP_google_Io_Abstract $io)
216
- {
217
- $this->config->setIoClass(get_class($io));
218
- $this->io = $io;
219
- }
220
-
221
- /**
222
- * Set the Cache object
223
- * @param IWP_google_Cache_Abstract $auth
224
- */
225
- public function setCache(IWP_google_Cache_Abstract $cache)
226
- {
227
- $this->config->setCacheClass(get_class($cache));
228
- $this->cache = $cache;
229
- }
230
-
231
- /**
232
- * Construct the OAuth 2.0 authorization request URI.
233
- * @return string
234
- */
235
- public function createAuthUrl()
236
- {
237
- $scopes = $this->prepareScopes();
238
- return $this->getAuth()->createAuthUrl($scopes);
239
- }
240
-
241
- /**
242
- * Get the OAuth 2.0 access token.
243
- * @return string $accessToken JSON encoded string in the following format:
244
- * {"access_token":"TOKEN", "refresh_token":"TOKEN", "token_type":"Bearer",
245
- * "expires_in":3600,"id_token":"TOKEN", "created":1320790426}
246
- */
247
- public function getAccessToken()
248
- {
249
- $token = $this->getAuth()->getAccessToken();
250
- // The response is json encoded, so could be the string null.
251
- // It is arguable whether this check should be here or lower
252
- // in the library.
253
- return (null == $token || 'null' == $token) ? null : $token;
254
- }
255
-
256
- /**
257
- * Returns if the access_token is expired.
258
- * @return bool Returns True if the access_token is expired.
259
- */
260
- public function isAccessTokenExpired()
261
- {
262
- return $this->getAuth()->isAccessTokenExpired();
263
- }
264
-
265
- /**
266
- * Set OAuth 2.0 "state" parameter to achieve per-request customization.
267
- * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-22#section-3.1.2.2
268
- * @param string $state
269
- */
270
- public function setState($state)
271
- {
272
- $this->getAuth()->setState($state);
273
- }
274
-
275
- /**
276
- * @param string $accessType Possible values for access_type include:
277
- * {@code "offline"} to request offline access from the user.
278
- * {@code "online"} to request online access from the user.
279
- */
280
- public function setAccessType($accessType)
281
- {
282
- $this->config->setAccessType($accessType);
283
- }
284
-
285
- /**
286
- * @param string $approvalPrompt Possible values for approval_prompt include:
287
- * {@code "force"} to force the approval UI to appear. (This is the default value)
288
- * {@code "auto"} to request auto-approval when possible.
289
- */
290
- public function setApprovalPrompt($approvalPrompt)
291
- {
292
- $this->config->setApprovalPrompt($approvalPrompt);
293
- }
294
-
295
- /**
296
- * Set the application name, this is included in the User-Agent HTTP header.
297
- * @param string $applicationName
298
- */
299
- public function setApplicationName($applicationName)
300
- {
301
- $this->config->setApplicationName($applicationName);
302
- }
303
-
304
- /**
305
- * Set the OAuth 2.0 Client ID.
306
- * @param string $clientId
307
- */
308
- public function setClientId($clientId)
309
- {
310
- $this->config->setClientId($clientId);
311
- }
312
-
313
- /**
314
- * Set the OAuth 2.0 Client Secret.
315
- * @param string $clientSecret
316
- */
317
- public function setClientSecret($clientSecret)
318
- {
319
- $this->config->setClientSecret($clientSecret);
320
- }
321
-
322
- /**
323
- * Set the OAuth 2.0 Redirect URI.
324
- * @param string $redirectUri
325
- */
326
- public function setRedirectUri($redirectUri)
327
- {
328
- $this->config->setRedirectUri($redirectUri);
329
- }
330
-
331
- /**
332
- * If 'plus.login' is included in the list of requested scopes, you can use
333
- * this method to define types of app activities that your app will write.
334
- * You can find a list of available types here:
335
- * @link https://developers.google.com/+/api/moment-types
336
- *
337
- * @param array $requestVisibleActions Array of app activity types
338
- */
339
- public function setRequestVisibleActions($requestVisibleActions)
340
- {
341
- if (is_array($requestVisibleActions)) {
342
- $requestVisibleActions = join(" ", $requestVisibleActions);
343
- }
344
- $this->config->setRequestVisibleActions($requestVisibleActions);
345
- }
346
-
347
- /**
348
- * Set the developer key to use, these are obtained through the API Console.
349
- * @see http://code.google.com/apis/console-help/#generatingdevkeys
350
- * @param string $developerKey
351
- */
352
- public function setDeveloperKey($developerKey)
353
- {
354
- $this->config->setDeveloperKey($developerKey);
355
- }
356
-
357
- /**
358
- * Fetches a fresh OAuth 2.0 access token with the given refresh token.
359
- * @param string $refreshToken
360
- * @return void
361
- */
362
- public function refreshToken($refreshToken)
363
- {
364
- return $this->getAuth()->refreshToken($refreshToken);
365
- }
366
-
367
- /**
368
- * Revoke an OAuth2 access token or refresh token. This method will revoke the current access
369
- * token, if a token isn't provided.
370
- * @throws IWP_google_Auth_Exception
371
- * @param string|null $token The token (access token or a refresh token) that should be revoked.
372
- * @return boolean Returns True if the revocation was successful, otherwise False.
373
- */
374
- public function revokeToken($token = null)
375
- {
376
- return $this->getAuth()->revokeToken($token);
377
- }
378
-
379
- /**
380
- * Verify an id_token. This method will verify the current id_token, if one
381
- * isn't provided.
382
- * @throws IWP_google_Auth_Exception
383
- * @param string|null $token The token (id_token) that should be verified.
384
- * @return IWP_google_Auth_LoginTicket Returns an apiLoginTicket if the verification was
385
- * successful.
386
- */
387
- public function verifyIdToken($token = null)
388
- {
389
- return $this->getAuth()->verifyIdToken($token);
390
- }
391
-
392
- /**
393
- * Verify a JWT that was signed with your own certificates.
394
- *
395
- * @param $jwt the token
396
- * @param $certs array of certificates
397
- * @param $required_audience the expected consumer of the token
398
- * @param [$issuer] the expected issues, defaults to Google
399
- * @param [$max_expiry] the max lifetime of a token, defaults to MAX_TOKEN_LIFETIME_SECS
400
- * @return token information if valid, false if not
401
- */
402
- public function verifySignedJwt($id_token, $cert_location, $audience, $issuer, $max_expiry = null)
403
- {
404
- $auth = new IWP_google_Auth_OAuth2($this);
405
- $certs = $auth->retrieveCertsFromLocation($cert_location);
406
- return $auth->verifySignedJwtWithCerts($id_token, $certs, $audience, $issuer, $max_expiry);
407
- }
408
-
409
- /**
410
- * @param IWP_google_Auth_AssertionCredentials $creds
411
- * @return void
412
- */
413
- public function setAssertionCredentials(IWP_google_Auth_AssertionCredentials $creds)
414
- {
415
- $this->getAuth()->setAssertionCredentials($creds);
416
- }
417
-
418
- /**
419
- * Set the scopes to be requested. Must be called before createAuthUrl().
420
- * Will remove any previously configured scopes.
421
- * @param array $scopes, ie: array('https://www.googleapis.com/auth/plus.login',
422
- * 'https://www.googleapis.com/auth/moderator')
423
- */
424
- public function setScopes($scopes)
425
- {
426
- $this->requestedScopes = array();
427
- $this->addScope($scopes);
428
- }
429
-
430
- /**
431
- * This functions adds a scope to be requested as part of the OAuth2.0 flow.
432
- * Will append any scopes not previously requested to the scope parameter.
433
- * A single string will be treated as a scope to request. An array of strings
434
- * will each be appended.
435
- * @param $scope_or_scopes string|array e.g. "profile"
436
- */
437
- public function addScope($scope_or_scopes)
438
- {
439
- if (is_string($scope_or_scopes) && !in_array($scope_or_scopes, $this->requestedScopes)) {
440
- $this->requestedScopes[] = $scope_or_scopes;
441
- } else if (is_array($scope_or_scopes)) {
442
- foreach ($scope_or_scopes as $scope) {
443
- $this->addScope($scope);
444
- }
445
- }
446
- }
447
-
448
- /**
449
- * Returns the list of scopes requested by the client
450
- * @return array the list of scopes
451
- *
452
- */
453
- public function getScopes()
454
- {
455
- return $this->requestedScopes;
456
- }
457
-
458
- /**
459
- * Declare whether batch calls should be used. This may increase throughput
460
- * by making multiple requests in one connection.
461
- *
462
- * @param boolean $useBatch True if the batch support should
463
- * be enabled. Defaults to False.
464
- */
465
- public function setUseBatch($useBatch)
466
- {
467
- // This is actually an alias for setDefer.
468
- $this->setDefer($useBatch);
469
- }
470
-
471
- /**
472
- * Declare whether making API calls should make the call immediately, or
473
- * return a request which can be called with ->execute();
474
- *
475
- * @param boolean $defer True if calls should not be executed right away.
476
- */
477
- public function setDefer($defer)
478
- {
479
- $this->deferExecution = $defer;
480
- }
481
-
482
- /**
483
- * Helper method to execute deferred HTTP requests.
484
- *
485
- * @returns object of the type of the expected class or array.
486
- */
487
- public function execute($request)
488
- {
489
- if ($request instanceof IWP_google_Http_Request) {
490
- $request->setUserAgent(
491
- $this->getApplicationName()
492
- . " " . self::USER_AGENT_SUFFIX
493
- . $this->getLibraryVersion()
494
- );
495
- if (!$this->getClassConfig("IWP_google_Http_Request", "disable_gzip")) {
496
- $request->enableGzip();
497
- }
498
- $request->maybeMoveParametersToBody();
499
- return IWP_google_Http_REST::execute($this, $request);
500
- } else if ($request instanceof IWP_google_Http_Batch) {
501
- return $request->execute();
502
- } else {
503
- throw new IWP_google_Exception("Do not know how to execute this type of object.");
504
- }
505
- }
506
-
507
- /**
508
- * Whether or not to return raw requests
509
- * @return boolean
510
- */
511
- public function shouldDefer()
512
- {
513
- return $this->deferExecution;
514
- }
515
-
516
- /**
517
- * @return IWP_google_Auth_Abstract Authentication implementation
518
- */
519
- public function getAuth()
520
- {
521
- if (!isset($this->auth)) {
522
- $class = $this->config->getAuthClass();
523
- $this->auth = new $class($this);
524
- }
525
- return $this->auth;
526
- }
527
-
528
- /**
529
- * @return IWP_google_IO_Abstract IO implementation
530
- */
531
- public function getIo()
532
- {
533
- if (!isset($this->io)) {
534
- $class = $this->config->getIoClass();
535
- $this->io = new $class($this);
536
- }
537
- return $this->io;
538
- }
539
-
540
- /**
541
- * @return IWP_google_Cache_Abstract Cache implementation
542
- */
543
- public function getCache()
544
- {
545
- if (!isset($this->cache)) {
546
- $class = $this->config->getCacheClass();
547
- $this->cache = new $class($this);
548
- }
549
- return $this->cache;
550
- }
551
-
552
- /**
553
- * Retrieve custom configuration for a specific class.
554
- * @param $class string|object - class or instance of class to retrieve
555
- * @param $key string optional - key to retrieve
556
- */
557
- public function getClassConfig($class, $key = null)
558
- {
559
- if (!is_string($class)) {
560
- $class = get_class($class);
561
- }
562
- return $this->config->getClassConfig($class, $key);
563
- }
564
-
565
- /**
566
- * Set configuration specific to a given class.
567
- * $config->setClassConfig('IWP_google_Cache_File',
568
- * array('directory' => '/tmp/cache'));
569
- * @param $class The class name for the configuration
570
- * @param $config string key or an array of configuration values
571
- * @param $value optional - if $config is a key, the value
572
- *
573
- */
574
- public function setClassConfig($class, $config, $value = null)
575
- {
576
- if (!is_string($class)) {
577
- $class = get_class($class);
578
- }
579
- return $this->config->setClassConfig($class, $config, $value);
580
-
581
- }
582
-
583
- /**
584
- * @return string the base URL to use for calls to the APIs
585
- */
586
- public function getBasePath()
587
- {
588
- return $this->config->getBasePath();
589
- }
590
-
591
- /**
592
- * @return string the name of the application
593
- */
594
- public function getApplicationName()
595
- {
596
- return $this->config->getApplicationName();
597
- }
598
-
599
- /**
600
- * Are we running in Google AppEngine?
601
- * return bool
602
- */
603
- public function isAppEngine()
604
- {
605
- return (isset($_SERVER['SERVER_SOFTWARE']) &&
606
- strpos($_SERVER['SERVER_SOFTWARE'], 'Google App Engine') !== false);
607
- }
608
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2010 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Auth/AssertionCredentials.php';
19
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Cache/File.php';
20
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Cache/Memcache.php';
21
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Config.php';
22
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Collection.php';
23
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Exception.php';
24
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/IO/Curl.php';
25
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/IO/Stream.php';
26
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Model.php';
27
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Service.php';
28
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Service/Resource.php';
29
+
30
+ /**
31
+ * The Google API Client
32
+ * http://code.google.com/p/google-api-php-client/
33
+ *
34
+ * @author Chris Chabot <chabotc@google.com>
35
+ * @author Chirag Shah <chirags@google.com>
36
+ */
37
+ class IWP_google_Client
38
+ {
39
+ const LIBVER = "1.0.5-beta";
40
+ const USER_AGENT_SUFFIX = "google-api-php-client/";
41
+ /**
42
+ * @var IWP_google_Auth_Abstract $auth
43
+ */
44
+ private $auth;
45
+
46
+ /**
47
+ * @var IWP_google_IO_Abstract $io
48
+ */
49
+ private $io;
50
+
51
+ /**
52
+ * @var IWP_google_Cache_Abstract $cache
53
+ */
54
+ private $cache;
55
+
56
+ /**
57
+ * @var IWP_google_Config $config
58
+ */
59
+ private $config;
60
+
61
+ /**
62
+ * @var boolean $deferExecution
63
+ */
64
+ private $deferExecution = false;
65
+
66
+ /** @var array $scopes */
67
+ // Scopes requested by the client
68
+ protected $requestedScopes = array();
69
+
70
+ // definitions of services that are discovered.
71
+ protected $services = array();
72
+
73
+ // Used to track authenticated state, can't discover services after doing authenticate()
74
+ private $authenticated = false;
75
+
76
+ /**
77
+ * Construct the Google Client.
78
+ *
79
+ * @param $config IWP_google_Config or string for the ini file to load
80
+ */
81
+ public function __construct($config = null)
82
+ {
83
+ if (! ini_get('date.timezone') &&
84
+ function_exists('date_default_timezone_set')) {
85
+ date_default_timezone_set('UTC');
86
+ }
87
+
88
+ if (is_string($config) && strlen($config)) {
89
+ $config = new IWP_google_Config($config);
90
+ } else if ( !($config instanceof IWP_google_Config)) {
91
+ $config = new IWP_google_Config();
92
+
93
+ if ($this->isAppEngine()) {
94
+ // Automatically use Memcache if we're in AppEngine.
95
+ $config->setCacheClass('IWP_google_Cache_Memcache');
96
+ }
97
+
98
+ if (version_compare(phpversion(), "5.3.4", "<=") || $this->isAppEngine()) {
99
+ // Automatically disable compress.zlib, as currently unsupported.
100
+ $config->setClassConfig('IWP_google_Http_Request', 'disable_gzip', true);
101
+ }
102
+ }
103
+
104
+ if ($config->getIoClass() == IWP_google_Config::USE_AUTO_IO_SELECTION) {
105
+ if (function_exists('curl_version') && function_exists('curl_exec')) {
106
+ $config->setIoClass("IWP_google_Io_Curl");
107
+ } else {
108
+ $config->setIoClass("IWP_google_Io_Stream");
109
+ }
110
+ }
111
+
112
+ $this->config = $config;
113
+ }
114
+
115
+ /**
116
+ * Get a string containing the version of the library.
117
+ *
118
+ * @return string
119
+ */
120
+ public function getLibraryVersion()
121
+ {
122
+ return self::LIBVER;
123
+ }
124
+
125
+ /**
126
+ * Attempt to exchange a code for an valid authentication token.
127
+ * Helper wrapped around the OAuth 2.0 implementation.
128
+ *
129
+ * @param $code string code from accounts.google.com
130
+ * @return string token
131
+ */
132
+ public function authenticate($code)
133
+ {
134
+ $this->authenticated = true;
135
+ return $this->getAuth()->authenticate($code);
136
+ }
137
+
138
+ /**
139
+ * Set the auth config from the JSON string provided.
140
+ * This structure should match the file downloaded from
141
+ * the "Download JSON" button on in the Google Developer
142
+ * Console.
143
+ * @param string $json the configuration json
144
+ */
145
+ public function setAuthConfig($json)
146
+ {
147
+ $data = json_decode($json);
148
+ $key = isset($data->installed) ? 'installed' : 'web';
149
+ if (!isset($data->$key)) {
150
+ throw new IWP_google_Exception("Invalid client secret JSON file.");
151
+ }
152
+ $this->setClientId($data->$key->client_id);
153
+ $this->setClientSecret($data->$key->client_secret);
154
+ if (isset($data->$key->redirect_uris)) {
155
+ $this->setRedirectUri($data->$key->redirect_uris[0]);
156
+ }
157
+ }
158
+
159
+ /**
160
+ * Set the auth config from the JSON file in the path
161
+ * provided. This should match the file downloaded from
162
+ * the "Download JSON" button on in the Google Developer
163
+ * Console.
164
+ * @param string $file the file location of the client json
165
+ */
166
+ public function setAuthConfigFile($file)
167
+ {
168
+ $this->setAuthConfig(file_get_contents($file));
169
+ }
170
+
171
+ /**
172
+ * @return array
173
+ * @visible For Testing
174
+ */
175
+ public function prepareScopes()
176
+ {
177
+ if (empty($this->requestedScopes)) {
178
+ throw new IWP_google_Auth_Exception("No scopes specified");
179
+ }
180
+ $scopes = implode(' ', $this->requestedScopes);
181
+ return $scopes;
182
+ }
183
+
184
+ /**
185
+ * Set the OAuth 2.0 access token using the string that resulted from calling createAuthUrl()
186
+ * or IWP_google_Client#getAccessToken().
187
+ * @param string $accessToken JSON encoded string containing in the following format:
188
+ * {"access_token":"TOKEN", "refresh_token":"TOKEN", "token_type":"Bearer",
189
+ * "expires_in":3600, "id_token":"TOKEN", "created":1320790426}
190
+ */
191
+ public function setAccessToken($accessToken)
192
+ {
193
+ if ($accessToken == 'null') {
194
+ $accessToken = null;
195
+ }
196
+ $this->getAuth()->setAccessToken($accessToken);
197
+ }
198
+
199
+
200
+
201
+ /**
202
+ * Set the authenticator object
203
+ * @param IWP_google_Auth_Abstract $auth
204
+ */
205
+ public function setAuth(IWP_google_Auth_Abstract $auth)
206
+ {
207
+ $this->config->setAuthClass(get_class($auth));
208
+ $this->auth = $auth;
209
+ }
210
+
211
+ /**
212
+ * Set the IO object
213
+ * @param IWP_google_Io_Abstract $auth
214
+ */
215
+ public function setIo(IWP_google_Io_Abstract $io)
216
+ {
217
+ $this->config->setIoClass(get_class($io));
218
+ $this->io = $io;
219
+ }
220
+
221
+ /**
222
+ * Set the Cache object
223
+ * @param IWP_google_Cache_Abstract $auth
224
+ */
225
+ public function setCache(IWP_google_Cache_Abstract $cache)
226
+ {
227
+ $this->config->setCacheClass(get_class($cache));
228
+ $this->cache = $cache;
229
+ }
230
+
231
+ /**
232
+ * Construct the OAuth 2.0 authorization request URI.
233
+ * @return string
234
+ */
235
+ public function createAuthUrl()
236
+ {
237
+ $scopes = $this->prepareScopes();
238
+ return $this->getAuth()->createAuthUrl($scopes);
239
+ }
240
+
241
+ /**
242
+ * Get the OAuth 2.0 access token.
243
+ * @return string $accessToken JSON encoded string in the following format:
244
+ * {"access_token":"TOKEN", "refresh_token":"TOKEN", "token_type":"Bearer",
245
+ * "expires_in":3600,"id_token":"TOKEN", "created":1320790426}
246
+ */
247
+ public function getAccessToken()
248
+ {
249
+ $token = $this->getAuth()->getAccessToken();
250
+ // The response is json encoded, so could be the string null.
251
+ // It is arguable whether this check should be here or lower
252
+ // in the library.
253
+ return (null == $token || 'null' == $token) ? null : $token;
254
+ }
255
+
256
+ /**
257
+ * Returns if the access_token is expired.
258
+ * @return bool Returns True if the access_token is expired.
259
+ */
260
+ public function isAccessTokenExpired()
261
+ {
262
+ return $this->getAuth()->isAccessTokenExpired();
263
+ }
264
+
265
+ /**
266
+ * Set OAuth 2.0 "state" parameter to achieve per-request customization.
267
+ * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-22#section-3.1.2.2
268
+ * @param string $state
269
+ */
270
+ public function setState($state)
271
+ {
272
+ $this->getAuth()->setState($state);
273
+ }
274
+
275
+ /**
276
+ * @param string $accessType Possible values for access_type include:
277
+ * {@code "offline"} to request offline access from the user.
278
+ * {@code "online"} to request online access from the user.
279
+ */
280
+ public function setAccessType($accessType)
281
+ {
282
+ $this->config->setAccessType($accessType);
283
+ }
284
+
285
+ /**
286
+ * @param string $approvalPrompt Possible values for approval_prompt include:
287
+ * {@code "force"} to force the approval UI to appear. (This is the default value)
288
+ * {@code "auto"} to request auto-approval when possible.
289
+ */
290
+ public function setApprovalPrompt($approvalPrompt)
291
+ {
292
+ $this->config->setApprovalPrompt($approvalPrompt);
293
+ }
294
+
295
+ /**
296
+ * Set the application name, this is included in the User-Agent HTTP header.
297
+ * @param string $applicationName
298
+ */
299
+ public function setApplicationName($applicationName)
300
+ {
301
+ $this->config->setApplicationName($applicationName);
302
+ }
303
+
304
+ /**
305
+ * Set the OAuth 2.0 Client ID.
306
+ * @param string $clientId
307
+ */
308
+ public function setClientId($clientId)
309
+ {
310
+ $this->config->setClientId($clientId);
311
+ }
312
+
313
+ /**
314
+ * Set the OAuth 2.0 Client Secret.
315
+ * @param string $clientSecret
316
+ */
317
+ public function setClientSecret($clientSecret)
318
+ {
319
+ $this->config->setClientSecret($clientSecret);
320
+ }
321
+
322
+ /**
323
+ * Set the OAuth 2.0 Redirect URI.
324
+ * @param string $redirectUri
325
+ */
326
+ public function setRedirectUri($redirectUri)
327
+ {
328
+ $this->config->setRedirectUri($redirectUri);
329
+ }
330
+
331
+ /**
332
+ * If 'plus.login' is included in the list of requested scopes, you can use
333
+ * this method to define types of app activities that your app will write.
334
+ * You can find a list of available types here:
335
+ * @link https://developers.google.com/+/api/moment-types
336
+ *
337
+ * @param array $requestVisibleActions Array of app activity types
338
+ */
339
+ public function setRequestVisibleActions($requestVisibleActions)
340
+ {
341
+ if (is_array($requestVisibleActions)) {
342
+ $requestVisibleActions = join(" ", $requestVisibleActions);
343
+ }
344
+ $this->config->setRequestVisibleActions($requestVisibleActions);
345
+ }
346
+
347
+ /**
348
+ * Set the developer key to use, these are obtained through the API Console.
349
+ * @see http://code.google.com/apis/console-help/#generatingdevkeys
350
+ * @param string $developerKey
351
+ */
352
+ public function setDeveloperKey($developerKey)
353
+ {
354
+ $this->config->setDeveloperKey($developerKey);
355
+ }
356
+
357
+ /**
358
+ * Fetches a fresh OAuth 2.0 access token with the given refresh token.
359
+ * @param string $refreshToken
360
+ * @return void
361
+ */
362
+ public function refreshToken($refreshToken)
363
+ {
364
+ return $this->getAuth()->refreshToken($refreshToken);
365
+ }
366
+
367
+ /**
368
+ * Revoke an OAuth2 access token or refresh token. This method will revoke the current access
369
+ * token, if a token isn't provided.
370
+ * @throws IWP_google_Auth_Exception
371
+ * @param string|null $token The token (access token or a refresh token) that should be revoked.
372
+ * @return boolean Returns True if the revocation was successful, otherwise False.
373
+ */
374
+ public function revokeToken($token = null)
375
+ {
376
+ return $this->getAuth()->revokeToken($token);
377
+ }
378
+
379
+ /**
380
+ * Verify an id_token. This method will verify the current id_token, if one
381
+ * isn't provided.
382
+ * @throws IWP_google_Auth_Exception
383
+ * @param string|null $token The token (id_token) that should be verified.
384
+ * @return IWP_google_Auth_LoginTicket Returns an apiLoginTicket if the verification was
385
+ * successful.
386
+ */
387
+ public function verifyIdToken($token = null)
388
+ {
389
+ return $this->getAuth()->verifyIdToken($token);
390
+ }
391
+
392
+ /**
393
+ * Verify a JWT that was signed with your own certificates.
394
+ *
395
+ * @param $jwt the token
396
+ * @param $certs array of certificates
397
+ * @param $required_audience the expected consumer of the token
398
+ * @param [$issuer] the expected issues, defaults to Google
399
+ * @param [$max_expiry] the max lifetime of a token, defaults to MAX_TOKEN_LIFETIME_SECS
400
+ * @return token information if valid, false if not
401
+ */
402
+ public function verifySignedJwt($id_token, $cert_location, $audience, $issuer, $max_expiry = null)
403
+ {
404
+ $auth = new IWP_google_Auth_OAuth2($this);
405
+ $certs = $auth->retrieveCertsFromLocation($cert_location);
406
+ return $auth->verifySignedJwtWithCerts($id_token, $certs, $audience, $issuer, $max_expiry);
407
+ }
408
+
409
+ /**
410
+ * @param IWP_google_Auth_AssertionCredentials $creds
411
+ * @return void
412
+ */
413
+ public function setAssertionCredentials(IWP_google_Auth_AssertionCredentials $creds)
414
+ {
415
+ $this->getAuth()->setAssertionCredentials($creds);
416
+ }
417
+
418
+ /**
419
+ * Set the scopes to be requested. Must be called before createAuthUrl().
420
+ * Will remove any previously configured scopes.
421
+ * @param array $scopes, ie: array('https://www.googleapis.com/auth/plus.login',
422
+ * 'https://www.googleapis.com/auth/moderator')
423
+ */
424
+ public function setScopes($scopes)
425
+ {
426
+ $this->requestedScopes = array();
427
+ $this->addScope($scopes);
428
+ }
429
+
430
+ /**
431
+ * This functions adds a scope to be requested as part of the OAuth2.0 flow.
432
+ * Will append any scopes not previously requested to the scope parameter.
433
+ * A single string will be treated as a scope to request. An array of strings
434
+ * will each be appended.
435
+ * @param $scope_or_scopes string|array e.g. "profile"
436
+ */
437
+ public function addScope($scope_or_scopes)
438
+ {
439
+ if (is_string($scope_or_scopes) && !in_array($scope_or_scopes, $this->requestedScopes)) {
440
+ $this->requestedScopes[] = $scope_or_scopes;
441
+ } else if (is_array($scope_or_scopes)) {
442
+ foreach ($scope_or_scopes as $scope) {
443
+ $this->addScope($scope);
444
+ }
445
+ }
446
+ }
447
+
448
+ /**
449
+ * Returns the list of scopes requested by the client
450
+ * @return array the list of scopes
451
+ *
452
+ */
453
+ public function getScopes()
454
+ {
455
+ return $this->requestedScopes;
456
+ }
457
+
458
+ /**
459
+ * Declare whether batch calls should be used. This may increase throughput
460
+ * by making multiple requests in one connection.
461
+ *
462
+ * @param boolean $useBatch True if the batch support should
463
+ * be enabled. Defaults to False.
464
+ */
465
+ public function setUseBatch($useBatch)
466
+ {
467
+ // This is actually an alias for setDefer.
468
+ $this->setDefer($useBatch);
469
+ }
470
+
471
+ /**
472
+ * Declare whether making API calls should make the call immediately, or
473
+ * return a request which can be called with ->execute();
474
+ *
475
+ * @param boolean $defer True if calls should not be executed right away.
476
+ */
477
+ public function setDefer($defer)
478
+ {
479
+ $this->deferExecution = $defer;
480
+ }
481
+
482
+ /**
483
+ * Helper method to execute deferred HTTP requests.
484
+ *
485
+ * @returns object of the type of the expected class or array.
486
+ */
487
+ public function execute($request)
488
+ {
489
+ if ($request instanceof IWP_google_Http_Request) {
490
+ $request->setUserAgent(
491
+ $this->getApplicationName()
492
+ . " " . self::USER_AGENT_SUFFIX
493
+ . $this->getLibraryVersion()
494
+ );
495
+ if (!$this->getClassConfig("IWP_google_Http_Request", "disable_gzip")) {
496
+ $request->enableGzip();
497
+ }
498
+ $request->maybeMoveParametersToBody();
499
+ return IWP_google_Http_REST::execute($this, $request);
500
+ } else if ($request instanceof IWP_google_Http_Batch) {
501
+ return $request->execute();
502
+ } else {
503
+ throw new IWP_google_Exception("Do not know how to execute this type of object.");
504
+ }
505
+ }
506
+
507
+ /**
508
+ * Whether or not to return raw requests
509
+ * @return boolean
510
+ */
511
+ public function shouldDefer()
512
+ {
513
+ return $this->deferExecution;
514
+ }
515
+
516
+ /**
517
+ * @return IWP_google_Auth_Abstract Authentication implementation
518
+ */
519
+ public function getAuth()
520
+ {
521
+ if (!isset($this->auth)) {
522
+ $class = $this->config->getAuthClass();
523
+ $this->auth = new $class($this);
524
+ }
525
+ return $this->auth;
526
+ }
527
+
528
+ /**
529
+ * @return IWP_google_IO_Abstract IO implementation
530
+ */
531
+ public function getIo()
532
+ {
533
+ if (!isset($this->io)) {
534
+ $class = $this->config->getIoClass();
535
+ $this->io = new $class($this);
536
+ }
537
+ return $this->io;
538
+ }
539
+
540
+ /**
541
+ * @return IWP_google_Cache_Abstract Cache implementation
542
+ */
543
+ public function getCache()
544
+ {
545
+ if (!isset($this->cache)) {
546
+ $class = $this->config->getCacheClass();
547
+ $this->cache = new $class($this);
548
+ }
549
+ return $this->cache;
550
+ }
551
+
552
+ /**
553
+ * Retrieve custom configuration for a specific class.
554
+ * @param $class string|object - class or instance of class to retrieve
555
+ * @param $key string optional - key to retrieve
556
+ */
557
+ public function getClassConfig($class, $key = null)
558
+ {
559
+ if (!is_string($class)) {
560
+ $class = get_class($class);
561
+ }
562
+ return $this->config->getClassConfig($class, $key);
563
+ }
564
+
565
+ /**
566
+ * Set configuration specific to a given class.
567
+ * $config->setClassConfig('IWP_google_Cache_File',
568
+ * array('directory' => '/tmp/cache'));
569
+ * @param $class The class name for the configuration
570
+ * @param $config string key or an array of configuration values
571
+ * @param $value optional - if $config is a key, the value
572
+ *
573
+ */
574
+ public function setClassConfig($class, $config, $value = null)
575
+ {
576
+ if (!is_string($class)) {
577
+ $class = get_class($class);
578
+ }
579
+ return $this->config->setClassConfig($class, $config, $value);
580
+
581
+ }
582
+
583
+ /**
584
+ * @return string the base URL to use for calls to the APIs
585
+ */
586
+ public function getBasePath()
587
+ {
588
+ return $this->config->getBasePath();
589
+ }
590
+
591
+ /**
592
+ * @return string the name of the application
593
+ */
594
+ public function getApplicationName()
595
+ {
596
+ return $this->config->getApplicationName();
597
+ }
598
+
599
+ /**
600
+ * Are we running in Google AppEngine?
601
+ * return bool
602
+ */
603
+ public function isAppEngine()
604
+ {
605
+ return (isset($_SERVER['SERVER_SOFTWARE']) &&
606
+ strpos($_SERVER['SERVER_SOFTWARE'], 'Google App Engine') !== false);
607
+ }
608
+ }
lib/Google/Collection.php CHANGED
@@ -1,94 +1,94 @@
1
- <?php
2
-
3
- require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Model.php";
4
-
5
- /**
6
- * Extension to the regular IWP_google_Model that automatically
7
- * exposes the items array for iteration, so you can just
8
- * iterate over the object rather than a reference inside.
9
- */
10
- class IWP_google_Collection extends IWP_google_Model implements Iterator, Countable
11
- {
12
- protected $collection_key = 'items';
13
-
14
- public function rewind()
15
- {
16
- if (is_array($this->modelData[$this->collection_key])) {
17
- reset($this->modelData[$this->collection_key]);
18
- }
19
- }
20
-
21
- public function current()
22
- {
23
- $this->coerceType($this->key());
24
- if (is_array($this->modelData[$this->collection_key])) {
25
- return current($this->modelData[$this->collection_key]);
26
- }
27
- }
28
-
29
- public function key()
30
- {
31
- if (is_array($this->modelData[$this->collection_key])) {
32
- return key($this->modelData[$this->collection_key]);
33
- }
34
- }
35
-
36
- public function next()
37
- {
38
- return next($this->modelData[$this->collection_key]);
39
- }
40
-
41
- public function valid()
42
- {
43
- $key = $this->key();
44
- return $key !== null && $key !== false;
45
- }
46
-
47
- public function count()
48
- {
49
- return count($this->modelData[$this->collection_key]);
50
- }
51
-
52
- public function offsetExists ($offset)
53
- {
54
- if (!is_numeric($offset)) {
55
- return parent::offsetExists($offset);
56
- }
57
- return isset($this->modelData[$this->collection_key][$offset]);
58
- }
59
-
60
- public function offsetGet($offset)
61
- {
62
- if (!is_numeric($offset)) {
63
- return parent::offsetGet($offset);
64
- }
65
- $this->coerceType($offset);
66
- return $this->modelData[$this->collection_key][$offset];
67
- }
68
-
69
- public function offsetSet($offset, $value)
70
- {
71
- if (!is_numeric($offset)) {
72
- return parent::offsetSet($offset, $value);
73
- }
74
- $this->modelData[$this->collection_key][$offset] = $value;
75
- }
76
-
77
- public function offsetUnset($offset)
78
- {
79
- if (!is_numeric($offset)) {
80
- return parent::offsetUnset($offset);
81
- }
82
- unset($this->modelData[$this->collection_key][$offset]);
83
- }
84
-
85
- private function coerceType($offset)
86
- {
87
- $typeKey = $this->keyType($this->collection_key);
88
- if (isset($this->$typeKey) && !is_object($this->modelData[$this->collection_key][$offset])) {
89
- $type = $this->$typeKey;
90
- $this->modelData[$this->collection_key][$offset] =
91
- new $type($this->modelData[$this->collection_key][$offset]);
92
- }
93
- }
94
- }
1
+ <?php
2
+
3
+ require_once $GLOBALS['iwp_mmb_plugin_dir']."/lib/Google/Model.php";
4
+
5
+ /**
6
+ * Extension to the regular IWP_google_Model that automatically
7
+ * exposes the items array for iteration, so you can just
8
+ * iterate over the object rather than a reference inside.
9
+ */
10
+ class IWP_google_Collection extends IWP_google_Model implements Iterator, Countable
11
+ {
12
+ protected $collection_key = 'items';
13
+
14
+ public function rewind()
15
+ {
16
+ if (is_array($this->modelData[$this->collection_key])) {
17
+ reset($this->modelData[$this->collection_key]);
18
+ }
19
+ }
20
+
21
+ public function current()
22
+ {
23
+ $this->coerceType($this->key());
24
+ if (is_array($this->modelData[$this->collection_key])) {
25
+ return current($this->modelData[$this->collection_key]);
26
+ }
27
+ }
28
+
29
+ public function key()
30
+ {
31
+ if (is_array($this->modelData[$this->collection_key])) {
32
+ return key($this->modelData[$this->collection_key]);
33
+ }
34
+ }
35
+
36
+ public function next()
37
+ {
38
+ return next($this->modelData[$this->collection_key]);
39
+ }
40
+
41
+ public function valid()
42
+ {
43
+ $key = $this->key();
44
+ return $key !== null && $key !== false;
45
+ }
46
+
47
+ public function count()
48
+ {
49
+ return count($this->modelData[$this->collection_key]);
50
+ }
51
+
52
+ public function offsetExists ($offset)
53
+ {
54
+ if (!is_numeric($offset)) {
55
+ return parent::offsetExists($offset);
56
+ }
57
+ return isset($this->modelData[$this->collection_key][$offset]);
58
+ }
59
+
60
+ public function offsetGet($offset)
61
+ {
62
+ if (!is_numeric($offset)) {
63
+ return parent::offsetGet($offset);
64
+ }
65
+ $this->coerceType($offset);
66
+ return $this->modelData[$this->collection_key][$offset];
67
+ }
68
+
69
+ public function offsetSet($offset, $value)
70
+ {
71
+ if (!is_numeric($offset)) {
72
+ return parent::offsetSet($offset, $value);
73
+ }
74
+ $this->modelData[$this->collection_key][$offset] = $value;
75
+ }
76
+
77
+ public function offsetUnset($offset)
78
+ {
79
+ if (!is_numeric($offset)) {
80
+ return parent::offsetUnset($offset);
81
+ }
82
+ unset($this->modelData[$this->collection_key][$offset]);
83
+ }
84
+
85
+ private function coerceType($offset)
86
+ {
87
+ $typeKey = $this->keyType($this->collection_key);
88
+ if (isset($this->$typeKey) && !is_object($this->modelData[$this->collection_key][$offset])) {
89
+ $type = $this->$typeKey;
90
+ $this->modelData[$this->collection_key][$offset] =
91
+ new $type($this->modelData[$this->collection_key][$offset]);
92
+ }
93
+ }
94
+ }
lib/Google/Config.php CHANGED
@@ -1,315 +1,315 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- /**
19
- * A class to contain the library configuration for the Google API client.
20
- */
21
- class IWP_google_Config
22
- {
23
- const GZIP_DISABLED = true;
24
- const GZIP_ENABLED = false;
25
- const GZIP_UPLOADS_ENABLED = true;
26
- const GZIP_UPLOADS_DISABLED = false;
27
- const USE_AUTO_IO_SELECTION = "auto";
28
- private $configuration;
29
-
30
- /**
31
- * Create a new IWP_google_Config. Can accept an ini file location with the
32
- * local configuration. For example:
33
- * application_name: "My App";
34
- *
35
- * @param [$ini_file_location] - optional - The location of the ini file to load
36
- */
37
- public function __construct($ini_file_location = null)
38
- {
39
- $this->configuration = array(
40
- // The application_name is included in the User-Agent HTTP header.
41
- 'application_name' => '',
42
-
43
- // Which Authentication, Storage and HTTP IO classes to use.
44
- 'auth_class' => 'IWP_google_Auth_OAuth2',
45
- 'io_class' => self::USE_AUTO_IO_SELECTION,
46
- 'cache_class' => 'IWP_google_Cache_File',
47
-
48
- // Don't change these unless you're working against a special development
49
- // or testing environment.
50
- 'base_path' => 'https://www.googleapis.com',
51
-
52
- // Definition of class specific values, like file paths and so on.
53
- 'classes' => array(
54
- 'IWP_google_IO_Abstract' => array(
55
- 'request_timeout_seconds' => 100,
56
- ),
57
- 'IWP_google_Http_Request' => array(
58
- // Disable the use of gzip on calls if set to true. Defaults to false.
59
- 'disable_gzip' => self::GZIP_ENABLED,
60
-
61
- // We default gzip to disabled on uploads even if gzip is otherwise
62
- // enabled, due to some issues seen with small packet sizes for uploads.
63
- // Please test with this option before enabling gzip for uploads in
64
- // a production environment.
65
- 'enable_gzip_for_uploads' => self::GZIP_UPLOADS_DISABLED,
66
- ),
67
- // If you want to pass in OAuth 2.0 settings, they will need to be
68
- // structured like this.
69
- 'IWP_google_Auth_OAuth2' => array(
70
- // Keys for OAuth 2.0 access, see the API console at
71
- // https://developers.google.com/console
72
- 'client_id' => '',
73
- 'client_secret' => '',
74
- 'redirect_uri' => '',
75
-
76
- // Simple API access key, also from the API console. Ensure you get
77
- // a Server key, and not a Browser key.
78
- 'developer_key' => '',
79
-
80
- // Other parameters.
81
- 'access_type' => 'online',
82
- 'approval_prompt' => 'auto',
83
- 'request_visible_actions' => '',
84
- 'federated_signon_certs_url' =>
85
- 'https://www.googleapis.com/oauth2/v1/certs',
86
- ),
87
- // Set a default directory for the file cache.
88
- 'IWP_google_Cache_File' => array(
89
- 'directory' => sys_get_temp_dir() . '/IWP_google_Client'
90
- )
91
- ),
92
-
93
- // Definition of service specific values like scopes, oauth token URLs,
94
- // etc. Example:
95
- 'services' => array(
96
- ),
97
- );
98
- if ($ini_file_location) {
99
- $ini = parse_ini_file($ini_file_location, true);
100
- if (is_array($ini) && count($ini)) {
101
- $this->configuration = array_merge($this->configuration, $ini);
102
- }
103
- }
104
- }
105
-
106
- /**
107
- * Set configuration specific to a given class.
108
- * $config->setClassConfig('IWP_google_Cache_File',
109
- * array('directory' => '/tmp/cache'));
110
- * @param $class The class name for the configuration
111
- * @param $config string key or an array of configuration values
112
- * @param $value optional - if $config is a key, the value
113
- */
114
- public function setClassConfig($class, $config, $value = null)
115
- {
116
- if (!is_array($config)) {
117
- if (!isset($this->configuration['classes'][$class])) {
118
- $this->configuration['classes'][$class] = array();
119
- }
120
- $this->configuration['classes'][$class][$config] = $value;
121
- } else {
122
- $this->configuration['classes'][$class] = $config;
123
- }
124
- }
125
-
126
- public function getClassConfig($class, $key = null)
127
- {
128
- if (!isset($this->configuration['classes'][$class])) {
129
- return null;
130
- }
131
- if ($key === null) {
132
- return $this->configuration['classes'][$class];
133
- } else {
134
- return $this->configuration['classes'][$class][$key];
135
- }
136
- }
137
-
138
- /**
139
- * Return the configured cache class.
140
- * @return string
141
- */
142
- public function getCacheClass()
143
- {
144
- return $this->configuration['cache_class'];
145
- }
146
-
147
- /**
148
- * Return the configured Auth class.
149
- * @return string
150
- */
151
- public function getAuthClass()
152
- {
153
- return $this->configuration['auth_class'];
154
- }
155
-
156
- /**
157
- * Set the auth class.
158
- *
159
- * @param $class the class name to set
160
- */
161
- public function setAuthClass($class)
162
- {
163
- $prev = $this->configuration['auth_class'];
164
- if (!isset($this->configuration['classes'][$class]) &&
165
- isset($this->configuration['classes'][$prev])) {
166
- $this->configuration['classes'][$class] =
167
- $this->configuration['classes'][$prev];
168
- }
169
- $this->configuration['auth_class'] = $class;
170
- }
171
-
172
- /**
173
- * Set the IO class.
174
- *
175
- * @param $class the class name to set
176
- */
177
- public function setIoClass($class)
178
- {
179
- $prev = $this->configuration['io_class'];
180
- if (!isset($this->configuration['classes'][$class]) &&
181
- isset($this->configuration['classes'][$prev])) {
182
- $this->configuration['classes'][$class] =
183
- $this->configuration['classes'][$prev];
184
- }
185
- $this->configuration['io_class'] = $class;
186
- }
187
-
188
- /**
189
- * Set the cache class.
190
- *
191
- * @param $class the class name to set
192
- */
193
- public function setCacheClass($class)
194
- {
195
- $prev = $this->configuration['cache_class'];
196
- if (!isset($this->configuration['classes'][$class]) &&
197
- isset($this->configuration['classes'][$prev])) {
198
- $this->configuration['classes'][$class] =
199
- $this->configuration['classes'][$prev];
200
- }
201
- $this->configuration['cache_class'] = $class;
202
- }
203
-
204
- /**
205
- * Return the configured IO class.
206
- * @return string
207
- */
208
- public function getIoClass()
209
- {
210
- return $this->configuration['io_class'];
211
- }
212
-
213
- /**
214
- * Set the application name, this is included in the User-Agent HTTP header.
215
- * @param string $name
216
- */
217
- public function setApplicationName($name)
218
- {
219
- $this->configuration['application_name'] = $name;
220
- }
221
-
222
- /**
223
- * @return string the name of the application
224
- */
225
- public function getApplicationName()
226
- {
227
- return $this->configuration['application_name'];
228
- }
229
-
230
- /**
231
- * Set the client ID for the auth class.
232
- * @param $key string - the API console client ID
233
- */
234
- public function setClientId($clientId)
235
- {
236
- $this->setAuthConfig('client_id', $clientId);
237
- }
238
-
239
- /**
240
- * Set the client secret for the auth class.
241
- * @param $key string - the API console client secret
242
- */
243
- public function setClientSecret($secret)
244
- {
245
- $this->setAuthConfig('client_secret', $secret);
246
- }
247
-
248
- /**
249
- * Set the redirect uri for the auth class. Note that if using the
250
- * Javascript based sign in flow, this should be the string 'postmessage'.
251
- * @param $key string - the URI that users should be redirected to
252
- */
253
- public function setRedirectUri($uri)
254
- {
255
- $this->setAuthConfig('redirect_uri', $uri);
256
- }
257
-
258
- /**
259
- * Set the app activities for the auth class.
260
- * @param $rva string a space separated list of app activity types
261
- */
262
- public function setRequestVisibleActions($rva)
263
- {
264
- $this->setAuthConfig('request_visible_actions', $rva);
265
- }
266
-
267
- /**
268
- * Set the the access type requested (offline or online.)
269
- * @param $access string - the access type
270
- */
271
- public function setAccessType($access)
272
- {
273
- $this->setAuthConfig('access_type', $access);
274
- }
275
-
276
- /**
277
- * Set when to show the approval prompt (auto or force)
278
- * @param $approval string - the approval request
279
- */
280
- public function setApprovalPrompt($approval)
281
- {
282
- $this->setAuthConfig('approval_prompt', $approval);
283
- }
284
-
285
- /**
286
- * Set the developer key for the auth class. Note that this is separate value
287
- * from the client ID - if it looks like a URL, its a client ID!
288
- * @param $key string - the API console developer key
289
- */
290
- public function setDeveloperKey($key)
291
- {
292
- $this->setAuthConfig('developer_key', $key);
293
- }
294
-
295
- /**
296
- * @return string the base URL to use for API calls
297
- */
298
- public function getBasePath()
299
- {
300
- return $this->configuration['base_path'];
301
- }
302
-
303
- /**
304
- * Set the auth configuration for the current auth class.
305
- * @param $key - the key to set
306
- * @param $value - the parameter value
307
- */
308
- private function setAuthConfig($key, $value)
309
- {
310
- if (!isset($this->configuration['classes'][$this->getAuthClass()])) {
311
- $this->configuration['classes'][$this->getAuthClass()] = array();
312
- }
313
- $this->configuration['classes'][$this->getAuthClass()][$key] = $value;
314
- }
315
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2010 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ /**
19
+ * A class to contain the library configuration for the Google API client.
20
+ */
21
+ class IWP_google_Config
22
+ {
23
+ const GZIP_DISABLED = true;
24
+ const GZIP_ENABLED = false;
25
+ const GZIP_UPLOADS_ENABLED = true;
26
+ const GZIP_UPLOADS_DISABLED = false;
27
+ const USE_AUTO_IO_SELECTION = "auto";
28
+ private $configuration;
29
+
30
+ /**
31
+ * Create a new IWP_google_Config. Can accept an ini file location with the
32
+ * local configuration. For example:
33
+ * application_name: "My App";
34
+ *
35
+ * @param [$ini_file_location] - optional - The location of the ini file to load
36
+ */
37
+ public function __construct($ini_file_location = null)
38
+ {
39
+ $this->configuration = array(
40
+ // The application_name is included in the User-Agent HTTP header.
41
+ 'application_name' => '',
42
+
43
+ // Which Authentication, Storage and HTTP IO classes to use.
44
+ 'auth_class' => 'IWP_google_Auth_OAuth2',
45
+ 'io_class' => self::USE_AUTO_IO_SELECTION,
46
+ 'cache_class' => 'IWP_google_Cache_File',
47
+
48
+ // Don't change these unless you're working against a special development
49
+ // or testing environment.
50
+ 'base_path' => 'https://www.googleapis.com',
51
+
52
+ // Definition of class specific values, like file paths and so on.
53
+ 'classes' => array(
54
+ 'IWP_google_IO_Abstract' => array(
55
+ 'request_timeout_seconds' => 100,
56
+ ),
57
+ 'IWP_google_Http_Request' => array(
58
+ // Disable the use of gzip on calls if set to true. Defaults to false.
59
+ 'disable_gzip' => self::GZIP_ENABLED,
60
+
61
+ // We default gzip to disabled on uploads even if gzip is otherwise
62
+ // enabled, due to some issues seen with small packet sizes for uploads.
63
+ // Please test with this option before enabling gzip for uploads in
64
+ // a production environment.
65
+ 'enable_gzip_for_uploads' => self::GZIP_UPLOADS_DISABLED,
66
+ ),
67
+ // If you want to pass in OAuth 2.0 settings, they will need to be
68
+ // structured like this.
69
+ 'IWP_google_Auth_OAuth2' => array(
70
+ // Keys for OAuth 2.0 access, see the API console at
71
+ // https://developers.google.com/console
72
+ 'client_id' => '',
73
+ 'client_secret' => '',
74
+ 'redirect_uri' => '',
75
+
76
+ // Simple API access key, also from the API console. Ensure you get
77
+ // a Server key, and not a Browser key.
78
+ 'developer_key' => '',
79
+
80
+ // Other parameters.
81
+ 'access_type' => 'online',
82
+ 'approval_prompt' => 'auto',
83
+ 'request_visible_actions' => '',
84
+ 'federated_signon_certs_url' =>
85
+ 'https://www.googleapis.com/oauth2/v1/certs',
86
+ ),
87
+ // Set a default directory for the file cache.
88
+ 'IWP_google_Cache_File' => array(
89
+ 'directory' => sys_get_temp_dir() . '/IWP_google_Client'
90
+ )
91
+ ),
92
+
93
+ // Definition of service specific values like scopes, oauth token URLs,
94
+ // etc. Example:
95
+ 'services' => array(
96
+ ),
97
+ );
98
+ if ($ini_file_location) {
99
+ $ini = parse_ini_file($ini_file_location, true);
100
+ if (is_array($ini) && count($ini)) {
101
+ $this->configuration = array_merge($this->configuration, $ini);
102
+ }
103
+ }
104
+ }
105
+
106
+ /**
107
+ * Set configuration specific to a given class.
108
+ * $config->setClassConfig('IWP_google_Cache_File',
109
+ * array('directory' => '/tmp/cache'));
110
+ * @param $class The class name for the configuration
111
+ * @param $config string key or an array of configuration values
112
+ * @param $value optional - if $config is a key, the value
113
+ */
114
+ public function setClassConfig($class, $config, $value = null)
115
+ {
116
+ if (!is_array($config)) {
117
+ if (!isset($this->configuration['classes'][$class])) {
118
+ $this->configuration['classes'][$class] = array();
119
+ }
120
+ $this->configuration['classes'][$class][$config] = $value;
121
+ } else {
122
+ $this->configuration['classes'][$class] = $config;
123
+ }
124
+ }
125
+
126
+ public function getClassConfig($class, $key = null)
127
+ {
128
+ if (!isset($this->configuration['classes'][$class])) {
129
+ return null;
130
+ }
131
+ if ($key === null) {
132
+ return $this->configuration['classes'][$class];
133
+ } else {
134
+ return $this->configuration['classes'][$class][$key];
135
+ }
136
+ }
137
+
138
+ /**
139
+ * Return the configured cache class.
140
+ * @return string
141
+ */
142
+ public function getCacheClass()
143
+ {
144
+ return $this->configuration['cache_class'];
145
+ }
146
+
147
+ /**
148
+ * Return the configured Auth class.
149
+ * @return string
150
+ */
151
+ public function getAuthClass()
152
+ {
153
+ return $this->configuration['auth_class'];
154
+ }
155
+
156
+ /**
157
+ * Set the auth class.
158
+ *
159
+ * @param $class the class name to set
160
+ */
161
+ public function setAuthClass($class)
162
+ {
163
+ $prev = $this->configuration['auth_class'];
164
+ if (!isset($this->configuration['classes'][$class]) &&
165
+ isset($this->configuration['classes'][$prev])) {
166
+ $this->configuration['classes'][$class] =
167
+ $this->configuration['classes'][$prev];
168
+ }
169
+ $this->configuration['auth_class'] = $class;
170
+ }
171
+
172
+ /**
173
+ * Set the IO class.
174
+ *
175
+ * @param $class the class name to set
176
+ */
177
+ public function setIoClass($class)
178
+ {
179
+ $prev = $this->configuration['io_class'];
180
+ if (!isset($this->configuration['classes'][$class]) &&
181
+ isset($this->configuration['classes'][$prev])) {
182
+ $this->configuration['classes'][$class] =
183
+ $this->configuration['classes'][$prev];
184
+ }
185
+ $this->configuration['io_class'] = $class;
186
+ }
187
+
188
+ /**
189
+ * Set the cache class.
190
+ *
191
+ * @param $class the class name to set
192
+ */
193
+ public function setCacheClass($class)
194
+ {
195
+ $prev = $this->configuration['cache_class'];
196
+ if (!isset($this->configuration['classes'][$class]) &&
197
+ isset($this->configuration['classes'][$prev])) {
198
+ $this->configuration['classes'][$class] =
199
+ $this->configuration['classes'][$prev];
200
+ }
201
+ $this->configuration['cache_class'] = $class;
202
+ }
203
+
204
+ /**
205
+ * Return the configured IO class.
206
+ * @return string
207
+ */
208
+ public function getIoClass()
209
+ {
210
+ return $this->configuration['io_class'];
211
+ }
212
+
213
+ /**
214
+ * Set the application name, this is included in the User-Agent HTTP header.
215
+ * @param string $name
216
+ */
217
+ public function setApplicationName($name)
218
+ {
219
+ $this->configuration['application_name'] = $name;
220
+ }
221
+
222
+ /**
223
+ * @return string the name of the application
224
+ */
225
+ public function getApplicationName()
226
+ {
227
+ return $this->configuration['application_name'];
228
+ }
229
+
230
+ /**
231
+ * Set the client ID for the auth class.
232
+ * @param $key string - the API console client ID
233
+ */
234
+ public function setClientId($clientId)
235
+ {
236
+ $this->setAuthConfig('client_id', $clientId);
237
+ }
238
+
239
+ /**
240
+ * Set the client secret for the auth class.
241
+ * @param $key string - the API console client secret
242
+ */
243
+ public function setClientSecret($secret)
244
+ {
245
+ $this->setAuthConfig('client_secret', $secret);
246
+ }
247
+
248
+ /**
249
+ * Set the redirect uri for the auth class. Note that if using the
250
+ * Javascript based sign in flow, this should be the string 'postmessage'.
251
+ * @param $key string - the URI that users should be redirected to
252
+ */
253
+ public function setRedirectUri($uri)
254
+ {
255
+ $this->setAuthConfig('redirect_uri', $uri);
256
+ }
257
+
258
+ /**
259
+ * Set the app activities for the auth class.
260
+ * @param $rva string a space separated list of app activity types
261
+ */
262
+ public function setRequestVisibleActions($rva)
263
+ {
264
+ $this->setAuthConfig('request_visible_actions', $rva);
265
+ }
266
+
267
+ /**
268
+ * Set the the access type requested (offline or online.)
269
+ * @param $access string - the access type
270
+ */
271
+ public function setAccessType($access)
272
+ {
273
+ $this->setAuthConfig('access_type', $access);
274
+ }
275
+
276
+ /**
277
+ * Set when to show the approval prompt (auto or force)
278
+ * @param $approval string - the approval request
279
+ */
280
+ public function setApprovalPrompt($approval)
281
+ {
282
+ $this->setAuthConfig('approval_prompt', $approval);
283
+ }
284
+
285
+ /**
286
+ * Set the developer key for the auth class. Note that this is separate value
287
+ * from the client ID - if it looks like a URL, its a client ID!
288
+ * @param $key string - the API console developer key
289
+ */
290
+ public function setDeveloperKey($key)
291
+ {
292
+ $this->setAuthConfig('developer_key', $key);
293
+ }
294
+
295
+ /**
296
+ * @return string the base URL to use for API calls
297
+ */
298
+ public function getBasePath()
299
+ {
300
+ return $this->configuration['base_path'];
301
+ }
302
+
303
+ /**
304
+ * Set the auth configuration for the current auth class.
305
+ * @param $key - the key to set
306
+ * @param $value - the parameter value
307
+ */
308
+ private function setAuthConfig($key, $value)
309
+ {
310
+ if (!isset($this->configuration['classes'][$this->getAuthClass()])) {
311
+ $this->configuration['classes'][$this->getAuthClass()] = array();
312
+ }
313
+ $this->configuration['classes'][$this->getAuthClass()][$key] = $value;
314
+ }
315
+ }
lib/Google/Exception.php CHANGED
@@ -1,20 +1,20 @@
1
- <?php
2
- /*
3
- * Copyright 2013 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- class IWP_google_Exception extends Exception
19
- {
20
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2013 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ class IWP_google_Exception extends Exception
19
+ {
20
+ }
lib/Google/Http/Batch.php CHANGED
@@ -1,143 +1,143 @@
1
- <?php
2
- /*
3
- * Copyright 2012 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php';
19
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/Request.php';
20
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/REST.php';
21
-
22
- /**
23
- * @author Chirag Shah <chirags@google.com>
24
- */
25
- class IWP_google_Http_Batch
26
- {
27
- /** @var string Multipart Boundary. */
28
- private $boundary;
29
-
30
- /** @var array service requests to be executed. */
31
- private $requests = array();
32
-
33
- /** @var IWP_google_Client */
34
- private $client;
35
-
36
- private $expected_classes = array();
37
-
38
- private $base_path;
39
-
40
- public function __construct(IWP_google_Client $client, $boundary = false)
41
- {
42
- $this->client = $client;
43
- $this->base_path = $this->client->getBasePath();
44
- $this->expected_classes = array();
45
- $boundary = (false == $boundary) ? mt_rand() : $boundary;
46
- $this->boundary = str_replace('"', '', $boundary);
47
- }
48
-
49
- public function add(IWP_google_Http_Request $request, $key = false)
50
- {
51
- if (false == $key) {
52
- $key = mt_rand();
53
- }
54
-
55
- $this->requests[$key] = $request;
56
- }
57
-
58
- public function execute()
59
- {
60
- $body = '';
61
-
62
- /** @var IWP_google_Http_Request $req */
63
- foreach ($this->requests as $key => $req) {
64
- $body .= "--{$this->boundary}\n";
65
- $body .= $req->toBatchString($key) . "\n";
66
- $this->expected_classes["response-" . $key] = $req->getExpectedClass();
67
- }
68
-
69
- $body = rtrim($body);
70
- $body .= "\n--{$this->boundary}--";
71
-
72
- $url = $this->base_path . '/batch';
73
- $httpRequest = new IWP_google_Http_Request($url, 'POST');
74
- $httpRequest->setRequestHeaders(
75
- array('Content-Type' => 'multipart/mixed; boundary=' . $this->boundary)
76
- );
77
-
78
- $httpRequest->setPostBody($body);
79
- $response = $this->client->getIo()->makeRequest($httpRequest);
80
-
81
- return $this->parseResponse($response);
82
- }
83
-
84
- public function parseResponse(IWP_google_Http_Request $response)
85
- {
86
- $contentType = $response->getResponseHeader('content-type');
87
- $contentType = explode(';', $contentType);
88
- $boundary = false;
89
- foreach ($contentType as $part) {
90
- $part = (explode('=', $part, 2));
91
- if (isset($part[0]) && 'boundary' == trim($part[0])) {
92
- $boundary = $part[1];
93
- }
94
- }
95
-
96
- $body = $response->getResponseBody();
97
- if ($body) {
98
- $body = str_replace("--$boundary--", "--$boundary", $body);
99
- $parts = explode("--$boundary", $body);
100
- $responses = array();
101
-
102
- foreach ($parts as $part) {
103
- $part = trim($part);
104
- if (!empty($part)) {
105
- list($metaHeaders, $part) = explode("\r\n\r\n", $part, 2);
106
- $metaHeaders = $this->client->getIo()->getHttpResponseHeaders($metaHeaders);
107
-
108
- $status = substr($part, 0, strpos($part, "\n"));
109
- $status = explode(" ", $status);
110
- $status = $status[1];
111
-
112
- list($partHeaders, $partBody) = $this->client->getIo()->ParseHttpResponse($part, false);
113
- $response = new IWP_google_Http_Request("");
114
- $response->setResponseHttpCode($status);
115
- $response->setResponseHeaders($partHeaders);
116
- $response->setResponseBody($partBody);
117
-
118
- // Need content id.
119
- $key = $metaHeaders['content-id'];
120
-
121
- if (isset($this->expected_classes[$key]) &&
122
- strlen($this->expected_classes[$key]) > 0) {
123
- $class = $this->expected_classes[$key];
124
- $response->setExpectedClass($class);
125
- }
126
-
127
- try {
128
- $response = IWP_google_Http_REST::decodeHttpResponse($response);
129
- $responses[$key] = $response;
130
- } catch (IWP_google_Service_Exception $e) {
131
- // Store the exception as the response, so succesful responses
132
- // can be processed.
133
- $responses[$key] = $e;
134
- }
135
- }
136
- }
137
-
138
- return $responses;
139
- }
140
-
141
- return null;
142
- }
143
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2012 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php';
19
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/Request.php';
20
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/REST.php';
21
+
22
+ /**
23
+ * @author Chirag Shah <chirags@google.com>
24
+ */
25
+ class IWP_google_Http_Batch
26
+ {
27
+ /** @var string Multipart Boundary. */
28
+ private $boundary;
29
+
30
+ /** @var array service requests to be executed. */
31
+ private $requests = array();
32
+
33
+ /** @var IWP_google_Client */
34
+ private $client;
35
+
36
+ private $expected_classes = array();
37
+
38
+ private $base_path;
39
+
40
+ public function __construct(IWP_google_Client $client, $boundary = false)
41
+ {
42
+ $this->client = $client;
43
+ $this->base_path = $this->client->getBasePath();
44
+ $this->expected_classes = array();
45
+ $boundary = (false == $boundary) ? mt_rand() : $boundary;
46
+ $this->boundary = str_replace('"', '', $boundary);
47
+ }
48
+
49
+ public function add(IWP_google_Http_Request $request, $key = false)
50
+ {
51
+ if (false == $key) {
52
+ $key = mt_rand();
53
+ }
54
+
55
+ $this->requests[$key] = $request;
56
+ }
57
+
58
+ public function execute()
59
+ {
60
+ $body = '';
61
+
62
+ /** @var IWP_google_Http_Request $req */
63
+ foreach ($this->requests as $key => $req) {
64
+ $body .= "--{$this->boundary}\n";
65
+ $body .= $req->toBatchString($key) . "\n";
66
+ $this->expected_classes["response-" . $key] = $req->getExpectedClass();
67
+ }
68
+
69
+ $body = rtrim($body);
70
+ $body .= "\n--{$this->boundary}--";
71
+
72
+ $url = $this->base_path . '/batch';
73
+ $httpRequest = new IWP_google_Http_Request($url, 'POST');
74
+ $httpRequest->setRequestHeaders(
75
+ array('Content-Type' => 'multipart/mixed; boundary=' . $this->boundary)
76
+ );
77
+
78
+ $httpRequest->setPostBody($body);
79
+ $response = $this->client->getIo()->makeRequest($httpRequest);
80
+
81
+ return $this->parseResponse($response);
82
+ }
83
+
84
+ public function parseResponse(IWP_google_Http_Request $response)
85
+ {
86
+ $contentType = $response->getResponseHeader('content-type');
87
+ $contentType = explode(';', $contentType);
88
+ $boundary = false;
89
+ foreach ($contentType as $part) {
90
+ $part = (explode('=', $part, 2));
91
+ if (isset($part[0]) && 'boundary' == trim($part[0])) {
92
+ $boundary = $part[1];
93
+ }
94
+ }
95
+
96
+ $body = $response->getResponseBody();
97
+ if ($body) {
98
+ $body = str_replace("--$boundary--", "--$boundary", $body);
99
+ $parts = explode("--$boundary", $body);
100
+ $responses = array();
101
+
102
+ foreach ($parts as $part) {
103
+ $part = trim($part);
104
+ if (!empty($part)) {
105
+ list($metaHeaders, $part) = explode("\r\n\r\n", $part, 2);
106
+ $metaHeaders = $this->client->getIo()->getHttpResponseHeaders($metaHeaders);
107
+
108
+ $status = substr($part, 0, strpos($part, "\n"));
109
+ $status = explode(" ", $status);
110
+ $status = $status[1];
111
+
112
+ list($partHeaders, $partBody) = $this->client->getIo()->ParseHttpResponse($part, false);
113
+ $response = new IWP_google_Http_Request("");
114
+ $response->setResponseHttpCode($status);
115
+ $response->setResponseHeaders($partHeaders);
116
+ $response->setResponseBody($partBody);
117
+
118
+ // Need content id.
119
+ $key = $metaHeaders['content-id'];
120
+
121
+ if (isset($this->expected_classes[$key]) &&
122
+ strlen($this->expected_classes[$key]) > 0) {
123
+ $class = $this->expected_classes[$key];
124
+ $response->setExpectedClass($class);
125
+ }
126
+
127
+ try {
128
+ $response = IWP_google_Http_REST::decodeHttpResponse($response);
129
+ $responses[$key] = $response;
130
+ } catch (IWP_google_Service_Exception $e) {
131
+ // Store the exception as the response, so succesful responses
132
+ // can be processed.
133
+ $responses[$key] = $e;
134
+ }
135
+ }
136
+ }
137
+
138
+ return $responses;
139
+ }
140
+
141
+ return null;
142
+ }
143
+ }
lib/Google/Http/CacheParser.php CHANGED
@@ -1,184 +1,184 @@
1
- <?php
2
- /*
3
- * Copyright 2012 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/Request.php';
19
-
20
- /**
21
- * Implement the caching directives specified in rfc2616. This
22
- * implementation is guided by the guidance offered in rfc2616-sec13.
23
- * @author Chirag Shah <chirags@google.com>
24
- */
25
- class IWP_google_Http_CacheParser
26
- {
27
- public static $CACHEABLE_HTTP_METHODS = array('GET', 'HEAD');
28
- public static $CACHEABLE_STATUS_CODES = array('200', '203', '300', '301');
29
-
30
- /**
31
- * Check if an HTTP request can be cached by a private local cache.
32
- *
33
- * @static
34
- * @param IWP_google_Http_Request $resp
35
- * @return bool True if the request is cacheable.
36
- * False if the request is uncacheable.
37
- */
38
- public static function isRequestCacheable(IWP_google_Http_Request $resp)
39
- {
40
- $method = $resp->getRequestMethod();
41
- if (! in_array($method, self::$CACHEABLE_HTTP_METHODS)) {
42
- return false;
43
- }
44
-
45
- // Don't cache authorized requests/responses.
46
- // [rfc2616-14.8] When a shared cache receives a request containing an
47
- // Authorization field, it MUST NOT return the corresponding response
48
- // as a reply to any other request...
49
- if ($resp->getRequestHeader("authorization")) {
50
- return false;
51
- }
52
-
53
- return true;
54
- }
55
-
56
- /**
57
- * Check if an HTTP response can be cached by a private local cache.
58
- *
59
- * @static
60
- * @param IWP_google_Http_Request $resp
61
- * @return bool True if the response is cacheable.
62
- * False if the response is un-cacheable.
63
- */
64
- public static function isResponseCacheable(IWP_google_Http_Request $resp)
65
- {
66
- // First, check if the HTTP request was cacheable before inspecting the
67
- // HTTP response.
68
- if (false == self::isRequestCacheable($resp)) {
69
- return false;
70
- }
71
-
72
- $code = $resp->getResponseHttpCode();
73
- if (! in_array($code, self::$CACHEABLE_STATUS_CODES)) {
74
- return false;
75
- }
76
-
77
- // The resource is uncacheable if the resource is already expired and
78
- // the resource doesn't have an ETag for revalidation.
79
- $etag = $resp->getResponseHeader("etag");
80
- if (self::isExpired($resp) && $etag == false) {
81
- return false;
82
- }
83
-
84
- // [rfc2616-14.9.2] If [no-store is] sent in a response, a cache MUST NOT
85
- // store any part of either this response or the request that elicited it.
86
- $cacheControl = $resp->getParsedCacheControl();
87
- if (isset($cacheControl['no-store'])) {
88
- return false;
89
- }
90
-
91
- // Pragma: no-cache is an http request directive, but is occasionally
92
- // used as a response header incorrectly.
93
- $pragma = $resp->getResponseHeader('pragma');
94
- if ($pragma == 'no-cache' || strpos($pragma, 'no-cache') !== false) {
95
- return false;
96
- }
97
-
98
- // [rfc2616-14.44] Vary: * is extremely difficult to cache. "It implies that
99
- // a cache cannot determine from the request headers of a subsequent request
100
- // whether this response is the appropriate representation."
101
- // Given this, we deem responses with the Vary header as uncacheable.
102
- $vary = $resp->getResponseHeader('vary');
103
- if ($vary) {
104
- return false;
105
- }
106
-
107
- return true;
108
- }
109
-
110
- /**
111
- * @static
112
- * @param IWP_google_Http_Request $resp
113
- * @return bool True if the HTTP response is considered to be expired.
114
- * False if it is considered to be fresh.
115
- */
116
- public static function isExpired(IWP_google_Http_Request $resp)
117
- {
118
- // HTTP/1.1 clients and caches MUST treat other invalid date formats,
119
- // especially including the value “0”, as in the past.
120
- $parsedExpires = false;
121
- $responseHeaders = $resp->getResponseHeaders();
122
-
123
- if (isset($responseHeaders['expires'])) {
124
- $rawExpires = $responseHeaders['expires'];
125
- // Check for a malformed expires header first.
126
- if (empty($rawExpires) || (is_numeric($rawExpires) && $rawExpires <= 0)) {
127
- return true;
128
- }
129
-
130
- // See if we can parse the expires header.
131
- $parsedExpires = strtotime($rawExpires);
132
- if (false == $parsedExpires || $parsedExpires <= 0) {
133
- return true;
134
- }
135
- }
136
-
137
- // Calculate the freshness of an http response.
138
- $freshnessLifetime = false;
139
- $cacheControl = $resp->getParsedCacheControl();
140
- if (isset($cacheControl['max-age'])) {
141
- $freshnessLifetime = $cacheControl['max-age'];
142
- }
143
-
144
- $rawDate = $resp->getResponseHeader('date');
145
- $parsedDate = strtotime($rawDate);
146
-
147
- if (empty($rawDate) || false == $parsedDate) {
148
- // We can't default this to now, as that means future cache reads
149
- // will always pass with the logic below, so we will require a
150
- // date be injected if not supplied.
151
- throw new IWP_google_Exception("All cacheable requests must have creation dates.");
152
- }
153
-
154
- if (false == $freshnessLifetime && isset($responseHeaders['expires'])) {
155
- $freshnessLifetime = $parsedExpires - $parsedDate;
156
- }
157
-
158
- if (false == $freshnessLifetime) {
159
- return true;
160
- }
161
-
162
- // Calculate the age of an http response.
163
- $age = max(0, time() - $parsedDate);
164
- if (isset($responseHeaders['age'])) {
165
- $age = max($age, strtotime($responseHeaders['age']));
166
- }
167
-
168
- return $freshnessLifetime <= $age;
169
- }
170
-
171
- /**
172
- * Determine if a cache entry should be revalidated with by the origin.
173
- *
174
- * @param IWP_google_Http_Request $response
175
- * @return bool True if the entry is expired, else return false.
176
- */
177
- public static function mustRevalidate(IWP_google_Http_Request $response)
178
- {
179
- // [13.3] When a cache has a stale entry that it would like to use as a
180
- // response to a client's request, it first has to check with the origin
181
- // server to see if its cached entry is still usable.
182
- return self::isExpired($response);
183
- }
184
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2012 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/Request.php';
19
+
20
+ /**
21
+ * Implement the caching directives specified in rfc2616. This
22
+ * implementation is guided by the guidance offered in rfc2616-sec13.
23
+ * @author Chirag Shah <chirags@google.com>
24
+ */
25
+ class IWP_google_Http_CacheParser
26
+ {
27
+ public static $CACHEABLE_HTTP_METHODS = array('GET', 'HEAD');
28
+ public static $CACHEABLE_STATUS_CODES = array('200', '203', '300', '301');
29
+
30
+ /**
31
+ * Check if an HTTP request can be cached by a private local cache.
32
+ *
33
+ * @static
34
+ * @param IWP_google_Http_Request $resp
35
+ * @return bool True if the request is cacheable.
36
+ * False if the request is uncacheable.
37
+ */
38
+ public static function isRequestCacheable(IWP_google_Http_Request $resp)
39
+ {
40
+ $method = $resp->getRequestMethod();
41
+ if (! in_array($method, self::$CACHEABLE_HTTP_METHODS)) {
42
+ return false;
43
+ }
44
+
45
+ // Don't cache authorized requests/responses.
46
+ // [rfc2616-14.8] When a shared cache receives a request containing an
47
+ // Authorization field, it MUST NOT return the corresponding response
48
+ // as a reply to any other request...
49
+ if ($resp->getRequestHeader("authorization")) {
50
+ return false;
51
+ }
52
+
53
+ return true;
54
+ }
55
+
56
+ /**
57
+ * Check if an HTTP response can be cached by a private local cache.
58
+ *
59
+ * @static
60
+ * @param IWP_google_Http_Request $resp
61
+ * @return bool True if the response is cacheable.
62
+ * False if the response is un-cacheable.
63
+ */
64
+ public static function isResponseCacheable(IWP_google_Http_Request $resp)
65
+ {
66
+ // First, check if the HTTP request was cacheable before inspecting the
67
+ // HTTP response.
68
+ if (false == self::isRequestCacheable($resp)) {
69
+ return false;
70
+ }
71
+
72
+ $code = $resp->getResponseHttpCode();
73
+ if (! in_array($code, self::$CACHEABLE_STATUS_CODES)) {
74
+ return false;
75
+ }
76
+
77
+ // The resource is uncacheable if the resource is already expired and
78
+ // the resource doesn't have an ETag for revalidation.
79
+ $etag = $resp->getResponseHeader("etag");
80
+ if (self::isExpired($resp) && $etag == false) {
81
+ return false;
82
+ }
83
+
84
+ // [rfc2616-14.9.2] If [no-store is] sent in a response, a cache MUST NOT
85
+ // store any part of either this response or the request that elicited it.
86
+ $cacheControl = $resp->getParsedCacheControl();
87
+ if (isset($cacheControl['no-store'])) {
88
+ return false;
89
+ }
90
+
91
+ // Pragma: no-cache is an http request directive, but is occasionally
92
+ // used as a response header incorrectly.
93
+ $pragma = $resp->getResponseHeader('pragma');
94
+ if ($pragma == 'no-cache' || strpos($pragma, 'no-cache') !== false) {
95
+ return false;
96
+ }
97
+
98
+ // [rfc2616-14.44] Vary: * is extremely difficult to cache. "It implies that
99
+ // a cache cannot determine from the request headers of a subsequent request
100
+ // whether this response is the appropriate representation."
101
+ // Given this, we deem responses with the Vary header as uncacheable.
102
+ $vary = $resp->getResponseHeader('vary');
103
+ if ($vary) {
104
+ return false;
105
+ }
106
+
107
+ return true;
108
+ }
109
+
110
+ /**
111
+ * @static
112
+ * @param IWP_google_Http_Request $resp
113
+ * @return bool True if the HTTP response is considered to be expired.
114
+ * False if it is considered to be fresh.
115
+ */
116
+ public static function isExpired(IWP_google_Http_Request $resp)
117
+ {
118
+ // HTTP/1.1 clients and caches MUST treat other invalid date formats,
119
+ // especially including the value “0”, as in the past.
120
+ $parsedExpires = false;
121
+ $responseHeaders = $resp->getResponseHeaders();
122
+
123
+ if (isset($responseHeaders['expires'])) {
124
+ $rawExpires = $responseHeaders['expires'];
125
+ // Check for a malformed expires header first.
126
+ if (empty($rawExpires) || (is_numeric($rawExpires) && $rawExpires <= 0)) {
127
+ return true;
128
+ }
129
+
130
+ // See if we can parse the expires header.
131
+ $parsedExpires = strtotime($rawExpires);
132
+ if (false == $parsedExpires || $parsedExpires <= 0) {
133
+ return true;
134
+ }
135
+ }
136
+
137
+ // Calculate the freshness of an http response.
138
+ $freshnessLifetime = false;
139
+ $cacheControl = $resp->getParsedCacheControl();
140
+ if (isset($cacheControl['max-age'])) {
141
+ $freshnessLifetime = $cacheControl['max-age'];
142
+ }
143
+
144
+ $rawDate = $resp->getResponseHeader('date');
145
+ $parsedDate = strtotime($rawDate);
146
+
147
+ if (empty($rawDate) || false == $parsedDate) {
148
+ // We can't default this to now, as that means future cache reads
149
+ // will always pass with the logic below, so we will require a
150
+ // date be injected if not supplied.
151
+ throw new IWP_google_Exception("All cacheable requests must have creation dates.");
152
+ }
153
+
154
+ if (false == $freshnessLifetime && isset($responseHeaders['expires'])) {
155
+ $freshnessLifetime = $parsedExpires - $parsedDate;
156
+ }
157
+
158
+ if (false == $freshnessLifetime) {
159
+ return true;
160
+ }
161
+
162
+ // Calculate the age of an http response.
163
+ $age = max(0, time() - $parsedDate);
164
+ if (isset($responseHeaders['age'])) {
165
+ $age = max($age, strtotime($responseHeaders['age']));
166
+ }
167
+
168
+ return $freshnessLifetime <= $age;
169
+ }
170
+
171
+ /**
172
+ * Determine if a cache entry should be revalidated with by the origin.
173
+ *
174
+ * @param IWP_google_Http_Request $response
175
+ * @return bool True if the entry is expired, else return false.
176
+ */
177
+ public static function mustRevalidate(IWP_google_Http_Request $response)
178
+ {
179
+ // [13.3] When a cache has a stale entry that it would like to use as a
180
+ // response to a client's request, it first has to check with the origin
181
+ // server to see if its cached entry is still usable.
182
+ return self::isExpired($response);
183
+ }
184
+ }
lib/Google/Http/MediaFileUpload.php CHANGED
@@ -1,305 +1,304 @@
1
- <?php
2
- /**
3
- * Copyright 2012 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php';
19
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Exception.php';
20
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/Request.php';
21
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/REST.php';
22
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Utils.php';
23
-
24
- /**
25
- * @author Chirag Shah <chirags@google.com>
26
- *
27
- */
28
- class IWP_google_Http_MediaFileUpload
29
- {
30
- const UPLOAD_MEDIA_TYPE = 'media';
31
- const UPLOAD_MULTIPART_TYPE = 'multipart';
32
- const UPLOAD_RESUMABLE_TYPE = 'resumable';
33
-
34
- /** @var string $mimeType */
35
- private $mimeType;
36
-
37
- /** @var string $data */
38
- private $data;
39
-
40
- /** @var bool $resumable */
41
- private $resumable;
42
-
43
- /** @var int $chunkSize */
44
- private $chunkSize;
45
-
46
- /** @var int $size */
47
- private $size;
48
-
49
- /** @var string $resumeUri */
50
- private $resumeUri;
51
-
52
- /** @var int $progress */
53
- private $progress;
54
-
55
- /** @var IWP_google_Client */
56
- private $client;
57
-
58
- /** @var IWP_google_Http_Request */
59
- private $request;
60
-
61
- /** @var string */
62
- private $boundary;
63
-
64
- /**
65
- * Result code from last HTTP call
66
- * @var int
67
- */
68
- private $httpResultCode;
69
-
70
- /**
71
- * @param $mimeType string
72
- * @param $data string The bytes you want to upload.
73
- * @param $resumable bool
74
- * @param bool $chunkSize File will be uploaded in chunks of this many bytes.
75
- * only used if resumable=True
76
- */
77
- public function __construct(
78
- IWP_google_Client $client,
79
- IWP_google_Http_Request $request,
80
- $mimeType,
81
- $data,
82
- $resumable = false,
83
- $chunkSize = false,
84
- $boundary = false
85
- ) {
86
- $this->client = $client;
87
- $this->request = $request;
88
- $this->mimeType = $mimeType;
89
- $this->data = $data;
90
- $this->size = strlen($this->data);
91
- $this->resumable = $resumable;
92
- if (!$chunkSize) {
93
- $chunkSize = 256 * 1024;
94
- }
95
- $this->chunkSize = $chunkSize;
96
- $this->progress = 0;
97
- $this->boundary = $boundary;
98
-
99
- // Process Media Request
100
- $this->process();
101
- }
102
-
103
- /**
104
- * Set the size of the file that is being uploaded.
105
- * @param $size - int file size in bytes
106
- */
107
- public function setFileSize($size)
108
- {
109
- $this->size = $size;
110
- }
111
-
112
- /**
113
- * Return the progress on the upload
114
- * @return int progress in bytes uploaded.
115
- */
116
- public function getProgress()
117
- {
118
- return $this->progress;
119
- }
120
-
121
- /**
122
- * Return the HTTP result code from the last call made.
123
- * @return int code
124
- */
125
- public function getHttpResultCode()
126
- {
127
- return $this->httpResultCode;
128
- }
129
-
130
- /**
131
- * Send the next part of the file to upload.
132
- * @param [$chunk] the next set of bytes to send. If false will used $data passed
133
- * at construct time.
134
- */
135
- public function nextChunk($chunk = false, $prevResumeUri = false, $fileSizeUploaded = 0)
136
- {
137
- $this->resumeUri = $prevResumeUri;
138
- $this->progress = $fileSizeUploaded;
139
-
140
- if (false == $this->resumeUri) {
141
- $this->resumeUri = $this->getResumeUri();
142
- }
143
-
144
- file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',"\n ------ resumeURI-------- ".var_export($this->resumeUri,true)."\n",FILE_APPEND);
145
-
146
- if (false == $chunk) {
147
- $chunk = substr($this->data, $this->progress, $this->chunkSize);
148
- }
149
-
150
- $lastBytePos = $this->progress + strlen($chunk) - 1;
151
- $headers = array(
152
- 'content-range' => "bytes $this->progress-$lastBytePos/$this->size",
153
- 'content-type' => $this->request->getRequestHeader('content-type'),
154
- 'content-length' => $this->chunkSize,
155
- 'expect' => '',
156
- );
157
-
158
- $httpRequest = new IWP_google_Http_Request(
159
- $this->resumeUri,
160
- 'PUT',
161
- $headers,
162
- $chunk
163
- );
164
-
165
- if ($this->client->getClassConfig("IWP_google_Http_Request", "enable_gzip_for_uploads")) {
166
- $httpRequest->enableGzip();
167
- } else {
168
- $httpRequest->disableGzip();
169
- }
170
-
171
- $response = $this->client->getIo()->makeRequest($httpRequest);
172
- $response->setExpectedClass($this->request->getExpectedClass());
173
- $code = $response->getResponseHttpCode();
174
- $this->httpResultCode = $code;
175
-
176
- if (308 == $code) {
177
- // Track the amount uploaded.
178
- $range = explode('-', $response->getResponseHeader('range'));
179
- $this->progress = $range[1] + 1;
180
-
181
- // Allow for changing upload URLs.
182
- $location = $response->getResponseHeader('location');
183
- if ($location) {
184
- $this->resumeUri = $location;
185
- }
186
- // No problems, but upload not complete.
187
- $status = array();
188
- $status['resumeURI'] = $this->resumeUri;
189
- $status['progress'] = $this->progress;
190
- $status['status'] = false;
191
- return $status;
192
- } else {
193
- $status['progress'] = $this->progress;
194
- $status['status'] = IWP_google_Http_REST::decodeHttpResponse($response);
195
- return $status;
196
- //return IWP_google_Http_REST::decodeHttpResponse($response);
197
- }
198
- }
199
-
200
- /**
201
- * @param $meta
202
- * @param $params
203
- * @return array|bool
204
- * @visible for testing
205
- */
206
- private function process()
207
- {
208
- $postBody = false;
209
- $contentType = false;
210
-
211
- $meta = $this->request->getPostBody();
212
- $meta = is_string($meta) ? json_decode($meta, true) : $meta;
213
-
214
- $uploadType = $this->getUploadType($meta);
215
- $this->request->setQueryParam('uploadType', $uploadType);
216
- $this->transformToUploadUrl();
217
- $mimeType = $this->mimeType ?
218
- $this->mimeType :
219
- $this->request->getRequestHeader('content-type');
220
-
221
- if (self::UPLOAD_RESUMABLE_TYPE == $uploadType) {
222
- $contentType = $mimeType;
223
- $postBody = is_string($meta) ? $meta : json_encode($meta);
224
- }
225
- else if (self::UPLOAD_MEDIA_TYPE == $uploadType) {
226
- $contentType = $mimeType;
227
- $postBody = $this->data;
228
- }
229
- else if (self::UPLOAD_MULTIPART_TYPE == $uploadType) {
230
- // This is a multipart/related upload.
231
- $boundary = $this->boundary ? $this->boundary : mt_rand();
232
- $boundary = str_replace('"', '', $boundary);
233
- $contentType = 'multipart/related; boundary=' . $boundary;
234
- $related = "--$boundary\r\n";
235
- $related .= "Content-Type: application/json; charset=UTF-8\r\n";
236
- $related .= "\r\n" . json_encode($meta) . "\r\n";
237
- $related .= "--$boundary\r\n";
238
- $related .= "Content-Type: $mimeType\r\n";
239
- $related .= "Content-Transfer-Encoding: base64\r\n";
240
- $related .= "\r\n" . base64_encode($this->data) . "\r\n";
241
- $related .= "--$boundary--";
242
- $postBody = $related;
243
- }
244
-
245
- $this->request->setPostBody($postBody);
246
-
247
- if (isset($contentType) && $contentType) {
248
- $contentTypeHeader['content-type'] = $contentType;
249
- $this->request->setRequestHeaders($contentTypeHeader);
250
- }
251
- }
252
-
253
- private function transformToUploadUrl()
254
- {
255
- $base = $this->request->getBaseComponent();
256
- $this->request->setBaseComponent($base . '/upload');
257
- }
258
-
259
- /**
260
- * Valid upload types:
261
- * - resumable (UPLOAD_RESUMABLE_TYPE)
262
- * - media (UPLOAD_MEDIA_TYPE)
263
- * - multipart (UPLOAD_MULTIPART_TYPE)
264
- * @param $meta
265
- * @return string
266
- * @visible for testing
267
- */
268
- public function getUploadType($meta)
269
- {
270
- if ($this->resumable) {
271
- return self::UPLOAD_RESUMABLE_TYPE;
272
- }
273
-
274
- if (false == $meta && $this->data) {
275
- return self::UPLOAD_MEDIA_TYPE;
276
- }
277
-
278
- return self::UPLOAD_MULTIPART_TYPE;
279
- }
280
-
281
- private function getResumeUri()
282
- {
283
- $result = null;
284
- $body = $this->request->getPostBody();
285
- if ($body) {
286
- $headers = array(
287
- 'content-type' => 'application/json; charset=UTF-8',
288
- 'content-length' => IWP_google_Utils::getStrLen($body),
289
- 'x-upload-content-type' => $this->mimeType,
290
- 'x-upload-content-length' => $this->size,
291
- 'expect' => '',
292
- );
293
- $this->request->setRequestHeaders($headers);
294
- }
295
-
296
- $response = $this->client->getIo()->makeRequest($this->request);
297
- $location = $response->getResponseHeader('location');
298
- $code = $response->getResponseHttpCode();
299
-
300
- if (200 == $code && true == $location) {
301
- return $location;
302
- }
303
- throw new IWP_google_Exception("Failed to start the resumable upload");
304
- }
305
- }
1
+ <?php
2
+ /**
3
+ * Copyright 2012 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php';
19
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Exception.php';
20
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/Request.php';
21
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/REST.php';
22
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Utils.php';
23
+
24
+ /**
25
+ * @author Chirag Shah <chirags@google.com>
26
+ *
27
+ */
28
+ class IWP_google_Http_MediaFileUpload
29
+ {
30
+ const UPLOAD_MEDIA_TYPE = 'media';
31
+ const UPLOAD_MULTIPART_TYPE = 'multipart';
32
+ const UPLOAD_RESUMABLE_TYPE = 'resumable';
33
+
34
+ /** @var string $mimeType */
35
+ private $mimeType;
36
+
37
+ /** @var string $data */
38
+ private $data;
39
+
40
+ /** @var bool $resumable */
41
+ private $resumable;
42
+
43
+ /** @var int $chunkSize */
44
+ private $chunkSize;
45
+
46
+ /** @var int $size */
47
+ private $size;
48
+
49
+ /** @var string $resumeUri */
50
+ private $resumeUri;
51
+
52
+ /** @var int $progress */
53
+ private $progress;
54
+
55
+ /** @var IWP_google_Client */
56
+ private $client;
57
+
58
+ /** @var IWP_google_Http_Request */
59
+ private $request;
60
+
61
+ /** @var string */
62
+ private $boundary;
63
+
64
+ /**
65
+ * Result code from last HTTP call
66
+ * @var int
67
+ */
68
+ private $httpResultCode;
69
+
70
+ /**
71
+ * @param $mimeType string
72
+ * @param $data string The bytes you want to upload.
73
+ * @param $resumable bool
74
+ * @param bool $chunkSize File will be uploaded in chunks of this many bytes.
75
+ * only used if resumable=True
76
+ */
77
+ public function __construct(
78
+ IWP_google_Client $client,
79
+ IWP_google_Http_Request $request,
80
+ $mimeType,
81
+ $data,
82
+ $resumable = false,
83
+ $chunkSize = false,
84
+ $boundary = false
85
+ ) {
86
+ $this->client = $client;
87
+ $this->request = $request;
88
+ $this->mimeType = $mimeType;
89
+ $this->data = $data;
90
+ $this->size = strlen($this->data);
91
+ $this->resumable = $resumable;
92
+ if (!$chunkSize) {
93
+ $chunkSize = 256 * 1024;
94
+ }
95
+ $this->chunkSize = $chunkSize;
96
+ $this->progress = 0;
97
+ $this->boundary = $boundary;
98
+
99
+ // Process Media Request
100
+ $this->process();
101
+ }
102
+
103
+ /**
104
+ * Set the size of the file that is being uploaded.
105
+ * @param $size - int file size in bytes
106
+ */
107
+ public function setFileSize($size)
108
+ {
109
+ $this->size = $size;
110
+ }
111
+
112
+ /**
113
+ * Return the progress on the upload
114
+ * @return int progress in bytes uploaded.
115
+ */
116
+ public function getProgress()
117
+ {
118
+ return $this->progress;
119
+ }
120
+
121
+ /**
122
+ * Return the HTTP result code from the last call made.
123
+ * @return int code
124
+ */
125
+ public function getHttpResultCode()
126
+ {
127
+ return $this->httpResultCode;
128
+ }
129
+
130
+ /**
131
+ * Send the next part of the file to upload.
132
+ * @param [$chunk] the next set of bytes to send. If false will used $data passed
133
+ * at construct time.
134
+ */
135
+ public function nextChunk($chunk = false, $prevResumeUri = false, $fileSizeUploaded = 0)
136
+ {
137
+ $this->resumeUri = $prevResumeUri;
138
+ $this->progress = $fileSizeUploaded;
139
+
140
+ if (false == $this->resumeUri) {
141
+ $this->resumeUri = $this->getResumeUri();
142
+ }
143
+
144
+
145
+ if (false == $chunk) {
146
+ $chunk = substr($this->data, $this->progress, $this->chunkSize);
147
+ }
148
+
149
+ $lastBytePos = $this->progress + strlen($chunk) - 1;
150
+ $headers = array(
151
+ 'content-range' => "bytes $this->progress-$lastBytePos/$this->size",
152
+ 'content-type' => $this->request->getRequestHeader('content-type'),
153
+ 'content-length' => $this->chunkSize,
154
+ 'expect' => '',
155
+ );
156
+
157
+ $httpRequest = new IWP_google_Http_Request(
158
+ $this->resumeUri,
159
+ 'PUT',
160
+ $headers,
161
+ $chunk
162
+ );
163
+
164
+ if ($this->client->getClassConfig("IWP_google_Http_Request", "enable_gzip_for_uploads")) {
165
+ $httpRequest->enableGzip();
166
+ } else {
167
+ $httpRequest->disableGzip();
168
+ }
169
+
170
+ $response = $this->client->getIo()->makeRequest($httpRequest);
171
+ $response->setExpectedClass($this->request->getExpectedClass());
172
+ $code = $response->getResponseHttpCode();
173
+ $this->httpResultCode = $code;
174
+
175
+ if (308 == $code) {
176
+ // Track the amount uploaded.
177
+ $range = explode('-', $response->getResponseHeader('range'));
178
+ $this->progress = $range[1] + 1;
179
+
180
+ // Allow for changing upload URLs.
181
+ $location = $response->getResponseHeader('location');
182
+ if ($location) {
183
+ $this->resumeUri = $location;
184
+ }
185
+ // No problems, but upload not complete.
186
+ $status = array();
187
+ $status['resumeURI'] = $this->resumeUri;
188
+ $status['progress'] = $this->progress;
189
+ $status['status'] = false;
190
+ return $status;
191
+ } else {
192
+ $status['progress'] = $this->progress;
193
+ $status['status'] = IWP_google_Http_REST::decodeHttpResponse($response);
194
+ return $status;
195
+ //return IWP_google_Http_REST::decodeHttpResponse($response);
196
+ }
197
+ }
198
+
199
+ /**
200
+ * @param $meta
201
+ * @param $params
202
+ * @return array|bool
203
+ * @visible for testing
204
+ */
205
+ private function process()
206
+ {
207
+ $postBody = false;
208
+ $contentType = false;
209
+
210
+ $meta = $this->request->getPostBody();
211
+ $meta = is_string($meta) ? json_decode($meta, true) : $meta;
212
+
213
+ $uploadType = $this->getUploadType($meta);
214
+ $this->request->setQueryParam('uploadType', $uploadType);
215
+ $this->transformToUploadUrl();
216
+ $mimeType = $this->mimeType ?
217
+ $this->mimeType :
218
+ $this->request->getRequestHeader('content-type');
219
+
220
+ if (self::UPLOAD_RESUMABLE_TYPE == $uploadType) {
221
+ $contentType = $mimeType;
222
+ $postBody = is_string($meta) ? $meta : json_encode($meta);
223
+ }
224
+ else if (self::UPLOAD_MEDIA_TYPE == $uploadType) {
225
+ $contentType = $mimeType;
226
+ $postBody = $this->data;
227
+ }
228
+ else if (self::UPLOAD_MULTIPART_TYPE == $uploadType) {
229
+ // This is a multipart/related upload.
230
+ $boundary = $this->boundary ? $this->boundary : mt_rand();
231
+ $boundary = str_replace('"', '', $boundary);
232
+ $contentType = 'multipart/related; boundary=' . $boundary;
233
+ $related = "--$boundary\r\n";
234
+ $related .= "Content-Type: application/json; charset=UTF-8\r\n";
235
+ $related .= "\r\n" . json_encode($meta) . "\r\n";
236
+ $related .= "--$boundary\r\n";
237
+ $related .= "Content-Type: $mimeType\r\n";
238
+ $related .= "Content-Transfer-Encoding: base64\r\n";
239
+ $related .= "\r\n" . base64_encode($this->data) . "\r\n";
240
+ $related .= "--$boundary--";
241
+ $postBody = $related;
242
+ }
243
+
244
+ $this->request->setPostBody($postBody);
245
+
246
+ if (isset($contentType) && $contentType) {
247
+ $contentTypeHeader['content-type'] = $contentType;
248
+ $this->request->setRequestHeaders($contentTypeHeader);
249
+ }
250
+ }
251
+
252
+ private function transformToUploadUrl()
253
+ {
254
+ $base = $this->request->getBaseComponent();
255
+ $this->request->setBaseComponent($base . '/upload');
256
+ }
257
+
258
+ /**
259
+ * Valid upload types:
260
+ * - resumable (UPLOAD_RESUMABLE_TYPE)
261
+ * - media (UPLOAD_MEDIA_TYPE)
262
+ * - multipart (UPLOAD_MULTIPART_TYPE)
263
+ * @param $meta
264
+ * @return string
265
+ * @visible for testing
266
+ */
267
+ public function getUploadType($meta)
268
+ {
269
+ if ($this->resumable) {
270
+ return self::UPLOAD_RESUMABLE_TYPE;
271
+ }
272
+
273
+ if (false == $meta && $this->data) {
274
+ return self::UPLOAD_MEDIA_TYPE;
275
+ }
276
+
277
+ return self::UPLOAD_MULTIPART_TYPE;
278
+ }
279
+
280
+ private function getResumeUri()
281
+ {
282
+ $result = null;
283
+ $body = $this->request->getPostBody();
284
+ if ($body) {
285
+ $headers = array(
286
+ 'content-type' => 'application/json; charset=UTF-8',
287
+ 'content-length' => IWP_google_Utils::getStrLen($body),
288
+ 'x-upload-content-type' => $this->mimeType,
289
+ 'x-upload-content-length' => $this->size,
290
+ 'expect' => '',
291
+ );
292
+ $this->request->setRequestHeaders($headers);
293
+ }
294
+
295
+ $response = $this->client->getIo()->makeRequest($this->request);
296
+ $location = $response->getResponseHeader('location');
297
+ $code = $response->getResponseHttpCode();
298
+
299
+ if (200 == $code && true == $location) {
300
+ return $location;
301
+ }
302
+ throw new IWP_google_Exception("Failed to start the resumable upload");
303
+ }
304
+ }
 
lib/Google/Http/REST.php CHANGED
@@ -1,139 +1,139 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php';
19
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/Request.php';
20
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Service/Exception.php';
21
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Utils/URITemplate.php';
22
-
23
- /**
24
- * This class implements the RESTful transport of apiServiceRequest()'s
25
- *
26
- * @author Chris Chabot <chabotc@google.com>
27
- * @author Chirag Shah <chirags@google.com>
28
- */
29
- class IWP_google_Http_REST
30
- {
31
- /**
32
- * Executes a IWP_google_Http_Request
33
- *
34
- * @param IWP_google_Client $client
35
- * @param IWP_google_Http_Request $req
36
- * @return array decoded result
37
- * @throws IWP_google_Service_Exception on server side error (ie: not authenticated,
38
- * invalid or malformed post body, invalid url)
39
- */
40
- public static function execute(IWP_google_Client $client, IWP_google_Http_Request $req)
41
- {
42
- $httpRequest = $client->getIo()->makeRequest($req);
43
- $httpRequest->setExpectedClass($req->getExpectedClass());
44
- return self::decodeHttpResponse($httpRequest);
45
- }
46
-
47
- /**
48
- * Decode an HTTP Response.
49
- * @static
50
- * @throws IWP_google_Service_Exception
51
- * @param IWP_google_Http_Request $response The http response to be decoded.
52
- * @return mixed|null
53
- */
54
- public static function decodeHttpResponse($response)
55
- {
56
- $code = $response->getResponseHttpCode();
57
- $body = $response->getResponseBody();
58
- $decoded = null;
59
-
60
- if ((intVal($code)) >= 300) {
61
- $decoded = json_decode($body, true);
62
- $err = 'Error calling ' . $response->getRequestMethod() . ' ' . $response->getUrl();
63
- if (isset($decoded['error']) &&
64
- isset($decoded['error']['message']) &&
65
- isset($decoded['error']['code'])) {
66
- // if we're getting a json encoded error definition, use that instead of the raw response
67
- // body for improved readability
68
- $err .= ": ({$decoded['error']['code']}) {$decoded['error']['message']}";
69
- } else {
70
- $err .= ": ($code) $body";
71
- }
72
-
73
- $errors = null;
74
- // Specific check for APIs which don't return error details, such as Blogger.
75
- if (isset($decoded['error']) && isset($decoded['error']['errors'])) {
76
- $errors = $decoded['error']['errors'];
77
- }
78
-
79
- throw new IWP_google_Service_Exception($err, $code, null, $errors);
80
- }
81
-
82
- // Only attempt to decode the response, if the response code wasn't (204) 'no content'
83
- if ($code != '204') {
84
- $decoded = json_decode($body, true);
85
- if ($decoded === null || $decoded === "") {
86
- throw new IWP_google_Service_Exception("Invalid json in service response: $body");
87
- }
88
-
89
- if ($response->getExpectedClass()) {
90
- $class = $response->getExpectedClass();
91
- $decoded = new $class($decoded);
92
- }
93
- }
94
- return $decoded;
95
- }
96
-
97
- /**
98
- * Parse/expand request parameters and create a fully qualified
99
- * request uri.
100
- * @static
101
- * @param string $servicePath
102
- * @param string $restPath
103
- * @param array $params
104
- * @return string $requestUrl
105
- */
106
- public static function createRequestUri($servicePath, $restPath, $params)
107
- {
108
- $requestUrl = $servicePath . $restPath;
109
- $uriTemplateVars = array();
110
- $queryVars = array();
111
- foreach ($params as $paramName => $paramSpec) {
112
- if ($paramSpec['type'] == 'boolean') {
113
- $paramSpec['value'] = ($paramSpec['value']) ? 'true' : 'false';
114
- }
115
- if ($paramSpec['location'] == 'path') {
116
- $uriTemplateVars[$paramName] = $paramSpec['value'];
117
- } else if ($paramSpec['location'] == 'query') {
118
- if (isset($paramSpec['repeated']) && is_array($paramSpec['value'])) {
119
- foreach ($paramSpec['value'] as $value) {
120
- $queryVars[] = $paramName . '=' . rawurlencode($value);
121
- }
122
- } else {
123
- $queryVars[] = $paramName . '=' . rawurlencode($paramSpec['value']);
124
- }
125
- }
126
- }
127
-
128
- if (count($uriTemplateVars)) {
129
- $uriTemplateParser = new IWP_google_Utils_URITemplate();
130
- $requestUrl = $uriTemplateParser->parse($requestUrl, $uriTemplateVars);
131
- }
132
-
133
- if (count($queryVars)) {
134
- $requestUrl .= '?' . implode($queryVars, '&');
135
- }
136
-
137
- return $requestUrl;
138
- }
139
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2010 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php';
19
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/Request.php';
20
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Service/Exception.php';
21
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Utils/URITemplate.php';
22
+
23
+ /**
24
+ * This class implements the RESTful transport of apiServiceRequest()'s
25
+ *
26
+ * @author Chris Chabot <chabotc@google.com>
27
+ * @author Chirag Shah <chirags@google.com>
28
+ */
29
+ class IWP_google_Http_REST
30
+ {
31
+ /**
32
+ * Executes a IWP_google_Http_Request
33
+ *
34
+ * @param IWP_google_Client $client
35
+ * @param IWP_google_Http_Request $req
36
+ * @return array decoded result
37
+ * @throws IWP_google_Service_Exception on server side error (ie: not authenticated,
38
+ * invalid or malformed post body, invalid url)
39
+ */
40
+ public static function execute(IWP_google_Client $client, IWP_google_Http_Request $req)
41
+ {
42
+ $httpRequest = $client->getIo()->makeRequest($req);
43
+ $httpRequest->setExpectedClass($req->getExpectedClass());
44
+ return self::decodeHttpResponse($httpRequest);
45
+ }
46
+
47
+ /**
48
+ * Decode an HTTP Response.
49
+ * @static
50
+ * @throws IWP_google_Service_Exception
51
+ * @param IWP_google_Http_Request $response The http response to be decoded.
52
+ * @return mixed|null
53
+ */
54
+ public static function decodeHttpResponse($response)
55
+ {
56
+ $code = $response->getResponseHttpCode();
57
+ $body = $response->getResponseBody();
58
+ $decoded = null;
59
+
60
+ if ((intVal($code)) >= 300) {
61
+ $decoded = json_decode($body, true);
62
+ $err = 'Error calling ' . $response->getRequestMethod() . ' ' . $response->getUrl();
63
+ if (isset($decoded['error']) &&
64
+ isset($decoded['error']['message']) &&
65
+ isset($decoded['error']['code'])) {
66
+ // if we're getting a json encoded error definition, use that instead of the raw response
67
+ // body for improved readability
68
+ $err .= ": ({$decoded['error']['code']}) {$decoded['error']['message']}";
69
+ } else {
70
+ $err .= ": ($code) $body";
71
+ }
72
+
73
+ $errors = null;
74
+ // Specific check for APIs which don't return error details, such as Blogger.
75
+ if (isset($decoded['error']) && isset($decoded['error']['errors'])) {
76
+ $errors = $decoded['error']['errors'];
77
+ }
78
+
79
+ throw new IWP_google_Service_Exception($err, $code, null, $errors);
80
+ }
81
+
82
+ // Only attempt to decode the response, if the response code wasn't (204) 'no content'
83
+ if ($code != '204') {
84
+ $decoded = json_decode($body, true);
85
+ if ($decoded === null || $decoded === "") {
86
+ throw new IWP_google_Service_Exception("Invalid json in service response: $body");
87
+ }
88
+
89
+ if ($response->getExpectedClass()) {
90
+ $class = $response->getExpectedClass();
91
+ $decoded = new $class($decoded);
92
+ }
93
+ }
94
+ return $decoded;
95
+ }
96
+
97
+ /**
98
+ * Parse/expand request parameters and create a fully qualified
99
+ * request uri.
100
+ * @static
101
+ * @param string $servicePath
102
+ * @param string $restPath
103
+ * @param array $params
104
+ * @return string $requestUrl
105
+ */
106
+ public static function createRequestUri($servicePath, $restPath, $params)
107
+ {
108
+ $requestUrl = $servicePath . $restPath;
109
+ $uriTemplateVars = array();
110
+ $queryVars = array();
111
+ foreach ($params as $paramName => $paramSpec) {
112
+ if ($paramSpec['type'] == 'boolean') {
113
+ $paramSpec['value'] = ($paramSpec['value']) ? 'true' : 'false';
114
+ }
115
+ if ($paramSpec['location'] == 'path') {
116
+ $uriTemplateVars[$paramName] = $paramSpec['value'];
117
+ } else if ($paramSpec['location'] == 'query') {
118
+ if (isset($paramSpec['repeated']) && is_array($paramSpec['value'])) {
119
+ foreach ($paramSpec['value'] as $value) {
120
+ $queryVars[] = $paramName . '=' . rawurlencode($value);
121
+ }
122
+ } else {
123
+ $queryVars[] = $paramName . '=' . rawurlencode($paramSpec['value']);
124
+ }
125
+ }
126
+ }
127
+
128
+ if (count($uriTemplateVars)) {
129
+ $uriTemplateParser = new IWP_google_Utils_URITemplate();
130
+ $requestUrl = $uriTemplateParser->parse($requestUrl, $uriTemplateVars);
131
+ }
132
+
133
+ if (count($queryVars)) {
134
+ $requestUrl .= '?' . implode($queryVars, '&');
135
+ }
136
+
137
+ return $requestUrl;
138
+ }
139
+ }
lib/Google/Http/Request.php CHANGED
@@ -1,476 +1,476 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Utils.php';
19
-
20
- /**
21
- * HTTP Request to be executed by IO classes. Upon execution, the
22
- * responseHttpCode, responseHeaders and responseBody will be filled in.
23
- *
24
- * @author Chris Chabot <chabotc@google.com>
25
- * @author Chirag Shah <chirags@google.com>
26
- *
27
- */
28
- class IWP_google_Http_Request
29
- {
30
- const GZIP_UA = " (gzip)";
31
-
32
- private $batchHeaders = array(
33
- 'Content-Type' => 'application/http',
34
- 'Content-Transfer-Encoding' => 'binary',
35
- 'MIME-Version' => '1.0',
36
- );
37
-
38
- protected $queryParams;
39
- protected $requestMethod;
40
- protected $requestHeaders;
41
- protected $baseComponent = null;
42
- protected $path;
43
- protected $postBody;
44
- protected $userAgent;
45
- protected $canGzip = null;
46
-
47
- protected $responseHttpCode;
48
- protected $responseHeaders;
49
- protected $responseBody;
50
-
51
- protected $expectedClass;
52
-
53
- public $accessKey;
54
-
55
- public function __construct(
56
- $url,
57
- $method = 'GET',
58
- $headers = array(),
59
- $postBody = null
60
- ) {
61
- $this->setUrl($url);
62
- $this->setRequestMethod($method);
63
- $this->setRequestHeaders($headers);
64
- $this->setPostBody($postBody);
65
- }
66
-
67
- /**
68
- * Misc function that returns the base url component of the $url
69
- * used by the OAuth signing class to calculate the base string
70
- * @return string The base url component of the $url.
71
- */
72
- public function getBaseComponent()
73
- {
74
- return $this->baseComponent;
75
- }
76
-
77
- /**
78
- * Set the base URL that path and query parameters will be added to.
79
- * @param $baseComponent string
80
- */
81
- public function setBaseComponent($baseComponent)
82
- {
83
- $this->baseComponent = $baseComponent;
84
- }
85
-
86
- /**
87
- * Enable support for gzipped responses with this request.
88
- */
89
- public function enableGzip()
90
- {
91
- $this->setRequestHeaders(array("Accept-Encoding" => "gzip"));
92
- $this->canGzip = true;
93
- $this->setUserAgent($this->userAgent);
94
- }
95
-
96
- /**
97
- * Disable support for gzip responses with this request.
98
- */
99
- public function disableGzip()
100
- {
101
- if (
102
- isset($this->requestHeaders['accept-encoding']) &&
103
- $this->requestHeaders['accept-encoding'] == "gzip"
104
- ) {
105
- unset($this->requestHeaders['accept-encoding']);
106
- }
107
- $this->canGzip = false;
108
- $this->userAgent = str_replace(self::GZIP_UA, "", $this->userAgent);
109
- }
110
-
111
- /**
112
- * Can this request accept a gzip response?
113
- * @return bool
114
- */
115
- public function canGzip()
116
- {
117
- return $this->canGzip;
118
- }
119
-
120
- /**
121
- * Misc function that returns an array of the query parameters of the current
122
- * url used by the OAuth signing class to calculate the signature
123
- * @return array Query parameters in the query string.
124
- */
125
- public function getQueryParams()
126
- {
127
- return $this->queryParams;
128
- }
129
-
130
- /**
131
- * Set a new query parameter.
132
- * @param $key - string to set, does not need to be URL encoded
133
- * @param $value - string to set, does not need to be URL encoded
134
- */
135
- public function setQueryParam($key, $value)
136
- {
137
- $this->queryParams[$key] = $value;
138
- }
139
-
140
- /**
141
- * @return string HTTP Response Code.
142
- */
143
- public function getResponseHttpCode()
144
- {
145
- return (int) $this->responseHttpCode;
146
- }
147
-
148
- /**
149
- * @param int $responseHttpCode HTTP Response Code.
150
- */
151
- public function setResponseHttpCode($responseHttpCode)
152
- {
153
- $this->responseHttpCode = $responseHttpCode;
154
- }
155
-
156
- /**
157
- * @return $responseHeaders (array) HTTP Response Headers.
158
- */
159
- public function getResponseHeaders()
160
- {
161
- return $this->responseHeaders;
162
- }
163
-
164
- /**
165
- * @return string HTTP Response Body
166
- */
167
- public function getResponseBody()
168
- {
169
- return $this->responseBody;
170
- }
171
-
172
- /**
173
- * Set the class the response to this request should expect.
174
- *
175
- * @param $class string the class name
176
- */
177
- public function setExpectedClass($class)
178
- {
179
- $this->expectedClass = $class;
180
- }
181
-
182
- /**
183
- * Retrieve the expected class the response should expect.
184
- * @return string class name
185
- */
186
- public function getExpectedClass()
187
- {
188
- return $this->expectedClass;
189
- }
190
-
191
- /**
192
- * @param array $headers The HTTP response headers
193
- * to be normalized.
194
- */
195
- public function setResponseHeaders($headers)
196
- {
197
- $headers = IWP_google_Utils::normalize($headers);
198
- if ($this->responseHeaders) {
199
- $headers = array_merge($this->responseHeaders, $headers);
200
- }
201
-
202
- $this->responseHeaders = $headers;
203
- }
204
-
205
- /**
206
- * @param string $key
207
- * @return array|boolean Returns the requested HTTP header or
208
- * false if unavailable.
209
- */
210
- public function getResponseHeader($key)
211
- {
212
- return isset($this->responseHeaders[$key])
213
- ? $this->responseHeaders[$key]
214
- : false;
215
- }
216
-
217
- /**
218
- * @param string $responseBody The HTTP response body.
219
- */
220
- public function setResponseBody($responseBody)
221
- {
222
- $this->responseBody = $responseBody;
223
- }
224
-
225
- /**
226
- * @return string $url The request URL.
227
- */
228
- public function getUrl()
229
- {
230
- return $this->baseComponent . $this->path .
231
- (count($this->queryParams) ?
232
- "?" . $this->buildQuery($this->queryParams) :
233
- '');
234
- }
235
-
236
- /**
237
- * @return string $method HTTP Request Method.
238
- */
239
- public function getRequestMethod()
240
- {
241
- return $this->requestMethod;
242
- }
243
-
244
- /**
245
- * @return array $headers HTTP Request Headers.
246
- */
247
- public function getRequestHeaders()
248
- {
249
- return $this->requestHeaders;
250
- }
251
-
252
- /**
253
- * @param string $key
254
- * @return array|boolean Returns the requested HTTP header or
255
- * false if unavailable.
256
- */
257
- public function getRequestHeader($key)
258
- {
259
- return isset($this->requestHeaders[$key])
260
- ? $this->requestHeaders[$key]
261
- : false;
262
- }
263
-
264
- /**
265
- * @return string $postBody HTTP Request Body.
266
- */
267
- public function getPostBody()
268
- {
269
- return $this->postBody;
270
- }
271
-
272
- /**
273
- * @param string $url the url to set
274
- */
275
- public function setUrl($url)
276
- {
277
- if (substr($url, 0, 4) != 'http') {
278
- // Force the path become relative.
279
- if (substr($url, 0, 1) !== '/') {
280
- $url = '/' . $url;
281
- }
282
- }
283
- $parts = parse_url($url);
284
- if (isset($parts['host'])) {
285
- $this->baseComponent = sprintf(
286
- "%s%s%s",
287
- isset($parts['scheme']) ? $parts['scheme'] . "://" : '',
288
- isset($parts['host']) ? $parts['host'] : '',
289
- isset($parts['port']) ? ":" . $parts['port'] : ''
290
- );
291
- }
292
- $this->path = isset($parts['path']) ? $parts['path'] : '';
293
- $this->queryParams = array();
294
- if (isset($parts['query'])) {
295
- $this->queryParams = $this->parseQuery($parts['query']);
296
- }
297
- }
298
-
299
- /**
300
- * @param string $method Set he HTTP Method and normalize
301
- * it to upper-case, as required by HTTP.
302
- *
303
- */
304
- public function setRequestMethod($method)
305
- {
306
- $this->requestMethod = strtoupper($method);
307
- }
308
-
309
- /**
310
- * @param array $headers The HTTP request headers
311
- * to be set and normalized.
312
- */
313
- public function setRequestHeaders($headers)
314
- {
315
- $headers = IWP_google_Utils::normalize($headers);
316
- if ($this->requestHeaders) {
317
- $headers = array_merge($this->requestHeaders, $headers);
318
- }
319
- $this->requestHeaders = $headers;
320
- }
321
-
322
- /**
323
- * @param string $postBody the postBody to set
324
- */
325
- public function setPostBody($postBody)
326
- {
327
- $this->postBody = $postBody;
328
- }
329
-
330
- /**
331
- * Set the User-Agent Header.
332
- * @param string $userAgent The User-Agent.
333
- */
334
- public function setUserAgent($userAgent)
335
- {
336
- $this->userAgent = $userAgent;
337
- if ($this->canGzip) {
338
- $this->userAgent = $userAgent . self::GZIP_UA;
339
- }
340
- }
341
-
342
- /**
343
- * @return string The User-Agent.
344
- */
345
- public function getUserAgent()
346
- {
347
- return $this->userAgent;
348
- }
349
-
350
- /**
351
- * Returns a cache key depending on if this was an OAuth signed request
352
- * in which case it will use the non-signed url and access key to make this
353
- * cache key unique per authenticated user, else use the plain request url
354
- * @return string The md5 hash of the request cache key.
355
- */
356
- public function getCacheKey()
357
- {
358
- $key = $this->getUrl();
359
-
360
- if (isset($this->accessKey)) {
361
- $key .= $this->accessKey;
362
- }
363
-
364
- if (isset($this->requestHeaders['authorization'])) {
365
- $key .= $this->requestHeaders['authorization'];
366
- }
367
-
368
- return md5($key);
369
- }
370
-
371
- public function getParsedCacheControl()
372
- {
373
- $parsed = array();
374
- $rawCacheControl = $this->getResponseHeader('cache-control');
375
- if ($rawCacheControl) {
376
- $rawCacheControl = str_replace(', ', '&', $rawCacheControl);
377
- parse_str($rawCacheControl, $parsed);
378
- }
379
-
380
- return $parsed;
381
- }
382
-
383
- /**
384
- * @param string $id
385
- * @return string A string representation of the HTTP Request.
386
- */
387
- public function toBatchString($id)
388
- {
389
- $str = '';
390
- $path = parse_url($this->getUrl(), PHP_URL_PATH) . "?" .
391
- http_build_query($this->queryParams);
392
- $str .= $this->getRequestMethod() . ' ' . $path . " HTTP/1.1\n";
393
-
394
- foreach ($this->getRequestHeaders() as $key => $val) {
395
- $str .= $key . ': ' . $val . "\n";
396
- }
397
-
398
- if ($this->getPostBody()) {
399
- $str .= "\n";
400
- $str .= $this->getPostBody();
401
- }
402
-
403
- $headers = '';
404
- foreach ($this->batchHeaders as $key => $val) {
405
- $headers .= $key . ': ' . $val . "\n";
406
- }
407
-
408
- $headers .= "Content-ID: $id\n";
409
- $str = $headers . "\n" . $str;
410
-
411
- return $str;
412
- }
413
-
414
- /**
415
- * Our own version of parse_str that allows for multiple variables
416
- * with the same name.
417
- * @param $string - the query string to parse
418
- */
419
- private function parseQuery($string)
420
- {
421
- $return = array();
422
- $parts = explode("&", $string);
423
- foreach ($parts as $part) {
424
- list($key, $value) = explode('=', $part, 2);
425
- $value = urldecode($value);
426
- if (isset($return[$key])) {
427
- if (!is_array($return[$key])) {
428
- $return[$key] = array($return[$key]);
429
- }
430
- $return[$key][] = $value;
431
- } else {
432
- $return[$key] = $value;
433
- }
434
- }
435
- return $return;
436
- }
437
-
438
- /**
439
- * A version of build query that allows for multiple
440
- * duplicate keys.
441
- * @param $parts array of key value pairs
442
- */
443
- private function buildQuery($parts)
444
- {
445
- $return = array();
446
- foreach ($parts as $key => $value) {
447
- if (is_array($value)) {
448
- foreach ($value as $v) {
449
- $return[] = urlencode($key) . "=" . urlencode($v);
450
- }
451
- } else {
452
- $return[] = urlencode($key) . "=" . urlencode($value);
453
- }
454
- }
455
- return implode('&', $return);
456
- }
457
-
458
- /**
459
- * If we're POSTing and have no body to send, we can send the query
460
- * parameters in there, which avoids length issues with longer query
461
- * params.
462
- */
463
- public function maybeMoveParametersToBody()
464
- {
465
- if ($this->getRequestMethod() == "POST" && empty($this->postBody)) {
466
- $this->setRequestHeaders(
467
- array(
468
- "content-type" =>
469
- "application/x-www-form-urlencoded; charset=UTF-8"
470
- )
471
- );
472
- $this->setPostBody($this->buildQuery($this->queryParams));
473
- $this->queryParams = array();
474
- }
475
- }
476
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2010 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Utils.php';
19
+
20
+ /**
21
+ * HTTP Request to be executed by IO classes. Upon execution, the
22
+ * responseHttpCode, responseHeaders and responseBody will be filled in.
23
+ *
24
+ * @author Chris Chabot <chabotc@google.com>
25
+ * @author Chirag Shah <chirags@google.com>
26
+ *
27
+ */
28
+ class IWP_google_Http_Request
29
+ {
30
+ const GZIP_UA = " (gzip)";
31
+
32
+ private $batchHeaders = array(
33
+ 'Content-Type' => 'application/http',
34
+ 'Content-Transfer-Encoding' => 'binary',
35
+ 'MIME-Version' => '1.0',
36
+ );
37
+
38
+ protected $queryParams;
39
+ protected $requestMethod;
40
+ protected $requestHeaders;
41
+ protected $baseComponent = null;
42
+ protected $path;
43
+ protected $postBody;
44
+ protected $userAgent;
45
+ protected $canGzip = null;
46
+
47
+ protected $responseHttpCode;
48
+ protected $responseHeaders;
49
+ protected $responseBody;
50
+
51
+ protected $expectedClass;
52
+
53
+ public $accessKey;
54
+
55
+ public function __construct(
56
+ $url,
57
+ $method = 'GET',
58
+ $headers = array(),
59
+ $postBody = null
60
+ ) {
61
+ $this->setUrl($url);
62
+ $this->setRequestMethod($method);
63
+ $this->setRequestHeaders($headers);
64
+ $this->setPostBody($postBody);
65
+ }
66
+
67
+ /**
68
+ * Misc function that returns the base url component of the $url
69
+ * used by the OAuth signing class to calculate the base string
70
+ * @return string The base url component of the $url.
71
+ */
72
+ public function getBaseComponent()
73
+ {
74
+ return $this->baseComponent;
75
+ }
76
+
77
+ /**
78
+ * Set the base URL that path and query parameters will be added to.
79
+ * @param $baseComponent string
80
+ */
81
+ public function setBaseComponent($baseComponent)
82
+ {
83
+ $this->baseComponent = $baseComponent;
84
+ }
85
+
86
+ /**
87
+ * Enable support for gzipped responses with this request.
88
+ */
89
+ public function enableGzip()
90
+ {
91
+ $this->setRequestHeaders(array("Accept-Encoding" => "gzip"));
92
+ $this->canGzip = true;
93
+ $this->setUserAgent($this->userAgent);
94
+ }
95
+
96
+ /**
97
+ * Disable support for gzip responses with this request.
98
+ */
99
+ public function disableGzip()
100
+ {
101
+ if (
102
+ isset($this->requestHeaders['accept-encoding']) &&
103
+ $this->requestHeaders['accept-encoding'] == "gzip"
104
+ ) {
105
+ unset($this->requestHeaders['accept-encoding']);
106
+ }
107
+ $this->canGzip = false;
108
+ $this->userAgent = str_replace(self::GZIP_UA, "", $this->userAgent);
109
+ }
110
+
111
+ /**
112
+ * Can this request accept a gzip response?
113
+ * @return bool
114
+ */
115
+ public function canGzip()
116
+ {
117
+ return $this->canGzip;
118
+ }
119
+
120
+ /**
121
+ * Misc function that returns an array of the query parameters of the current
122
+ * url used by the OAuth signing class to calculate the signature
123
+ * @return array Query parameters in the query string.
124
+ */
125
+ public function getQueryParams()
126
+ {
127
+ return $this->queryParams;
128
+ }
129
+
130
+ /**
131
+ * Set a new query parameter.
132
+ * @param $key - string to set, does not need to be URL encoded
133
+ * @param $value - string to set, does not need to be URL encoded
134
+ */
135
+ public function setQueryParam($key, $value)
136
+ {
137
+ $this->queryParams[$key] = $value;
138
+ }
139
+
140
+ /**
141
+ * @return string HTTP Response Code.
142
+ */
143
+ public function getResponseHttpCode()
144
+ {
145
+ return (int) $this->responseHttpCode;
146
+ }
147
+
148
+ /**
149
+ * @param int $responseHttpCode HTTP Response Code.
150
+ */
151
+ public function setResponseHttpCode($responseHttpCode)
152
+ {
153
+ $this->responseHttpCode = $responseHttpCode;
154
+ }
155
+
156
+ /**
157
+ * @return $responseHeaders (array) HTTP Response Headers.
158
+ */
159
+ public function getResponseHeaders()
160
+ {
161
+ return $this->responseHeaders;
162
+ }
163
+
164
+ /**
165
+ * @return string HTTP Response Body
166
+ */
167
+ public function getResponseBody()
168
+ {
169
+ return $this->responseBody;
170
+ }
171
+
172
+ /**
173
+ * Set the class the response to this request should expect.
174
+ *
175
+ * @param $class string the class name
176
+ */
177
+ public function setExpectedClass($class)
178
+ {
179
+ $this->expectedClass = $class;
180
+ }
181
+
182
+ /**
183
+ * Retrieve the expected class the response should expect.
184
+ * @return string class name
185
+ */
186
+ public function getExpectedClass()
187
+ {
188
+ return $this->expectedClass;
189
+ }
190
+
191
+ /**
192
+ * @param array $headers The HTTP response headers
193
+ * to be normalized.
194
+ */
195
+ public function setResponseHeaders($headers)
196
+ {
197
+ $headers = IWP_google_Utils::normalize($headers);
198
+ if ($this->responseHeaders) {
199
+ $headers = array_merge($this->responseHeaders, $headers);
200
+ }
201
+
202
+ $this->responseHeaders = $headers;
203
+ }
204
+
205
+ /**
206
+ * @param string $key
207
+ * @return array|boolean Returns the requested HTTP header or
208
+ * false if unavailable.
209
+ */
210
+ public function getResponseHeader($key)
211
+ {
212
+ return isset($this->responseHeaders[$key])
213
+ ? $this->responseHeaders[$key]
214
+ : false;
215
+ }
216
+
217
+ /**
218
+ * @param string $responseBody The HTTP response body.
219
+ */
220
+ public function setResponseBody($responseBody)
221
+ {
222
+ $this->responseBody = $responseBody;
223
+ }
224
+
225
+ /**
226
+ * @return string $url The request URL.
227
+ */
228
+ public function getUrl()
229
+ {
230
+ return $this->baseComponent . $this->path .
231
+ (count($this->queryParams) ?
232
+ "?" . $this->buildQuery($this->queryParams) :
233
+ '');
234
+ }
235
+
236
+ /**
237
+ * @return string $method HTTP Request Method.
238
+ */
239
+ public function getRequestMethod()
240
+ {
241
+ return $this->requestMethod;
242
+ }
243
+
244
+ /**
245
+ * @return array $headers HTTP Request Headers.
246
+ */
247
+ public function getRequestHeaders()
248
+ {
249
+ return $this->requestHeaders;
250
+ }
251
+
252
+ /**
253
+ * @param string $key
254
+ * @return array|boolean Returns the requested HTTP header or
255
+ * false if unavailable.
256
+ */
257
+ public function getRequestHeader($key)
258
+ {
259
+ return isset($this->requestHeaders[$key])
260
+ ? $this->requestHeaders[$key]
261
+ : false;
262
+ }
263
+
264
+ /**
265
+ * @return string $postBody HTTP Request Body.
266
+ */
267
+ public function getPostBody()
268
+ {
269
+ return $this->postBody;
270
+ }
271
+
272
+ /**
273
+ * @param string $url the url to set
274
+ */
275
+ public function setUrl($url)
276
+ {
277
+ if (substr($url, 0, 4) != 'http') {
278
+ // Force the path become relative.
279
+ if (substr($url, 0, 1) !== '/') {
280
+ $url = '/' . $url;
281
+ }
282
+ }
283
+ $parts = parse_url($url);
284
+ if (isset($parts['host'])) {
285
+ $this->baseComponent = sprintf(
286
+ "%s%s%s",
287
+ isset($parts['scheme']) ? $parts['scheme'] . "://" : '',
288
+ isset($parts['host']) ? $parts['host'] : '',
289
+ isset($parts['port']) ? ":" . $parts['port'] : ''
290
+ );
291
+ }
292
+ $this->path = isset($parts['path']) ? $parts['path'] : '';
293
+ $this->queryParams = array();
294
+ if (isset($parts['query'])) {
295
+ $this->queryParams = $this->parseQuery($parts['query']);
296
+ }
297
+ }
298
+
299
+ /**
300
+ * @param string $method Set he HTTP Method and normalize
301
+ * it to upper-case, as required by HTTP.
302
+ *
303
+ */
304
+ public function setRequestMethod($method)
305
+ {
306
+ $this->requestMethod = strtoupper($method);
307
+ }
308
+
309
+ /**
310
+ * @param array $headers The HTTP request headers
311
+ * to be set and normalized.
312
+ */
313
+ public function setRequestHeaders($headers)
314
+ {
315
+ $headers = IWP_google_Utils::normalize($headers);
316
+ if ($this->requestHeaders) {
317
+ $headers = array_merge($this->requestHeaders, $headers);
318
+ }
319
+ $this->requestHeaders = $headers;
320
+ }
321
+
322
+ /**
323
+ * @param string $postBody the postBody to set
324
+ */
325
+ public function setPostBody($postBody)
326
+ {
327
+ $this->postBody = $postBody;
328
+ }
329
+
330
+ /**
331
+ * Set the User-Agent Header.
332
+ * @param string $userAgent The User-Agent.
333
+ */
334
+ public function setUserAgent($userAgent)
335
+ {
336
+ $this->userAgent = $userAgent;
337
+ if ($this->canGzip) {
338
+ $this->userAgent = $userAgent . self::GZIP_UA;
339
+ }
340
+ }
341
+
342
+ /**
343
+ * @return string The User-Agent.
344
+ */
345
+ public function getUserAgent()
346
+ {
347
+ return $this->userAgent;
348
+ }
349
+
350
+ /**
351
+ * Returns a cache key depending on if this was an OAuth signed request
352
+ * in which case it will use the non-signed url and access key to make this
353
+ * cache key unique per authenticated user, else use the plain request url
354
+ * @return string The md5 hash of the request cache key.
355
+ */
356
+ public function getCacheKey()
357
+ {
358
+ $key = $this->getUrl();
359
+
360
+ if (isset($this->accessKey)) {
361
+ $key .= $this->accessKey;
362
+ }
363
+
364
+ if (isset($this->requestHeaders['authorization'])) {
365
+ $key .= $this->requestHeaders['authorization'];
366
+ }
367
+
368
+ return md5($key);
369
+ }
370
+
371
+ public function getParsedCacheControl()
372
+ {
373
+ $parsed = array();
374
+ $rawCacheControl = $this->getResponseHeader('cache-control');
375
+ if ($rawCacheControl) {
376
+ $rawCacheControl = str_replace(', ', '&', $rawCacheControl);
377
+ parse_str($rawCacheControl, $parsed);
378
+ }
379
+
380
+ return $parsed;
381
+ }
382
+
383
+ /**
384
+ * @param string $id
385
+ * @return string A string representation of the HTTP Request.
386
+ */
387
+ public function toBatchString($id)
388
+ {
389
+ $str = '';
390
+ $path = parse_url($this->getUrl(), PHP_URL_PATH) . "?" .
391
+ http_build_query($this->queryParams);
392
+ $str .= $this->getRequestMethod() . ' ' . $path . " HTTP/1.1\n";
393
+
394
+ foreach ($this->getRequestHeaders() as $key => $val) {
395
+ $str .= $key . ': ' . $val . "\n";
396
+ }
397
+
398
+ if ($this->getPostBody()) {
399
+ $str .= "\n";
400
+ $str .= $this->getPostBody();
401
+ }
402
+
403
+ $headers = '';
404
+ foreach ($this->batchHeaders as $key => $val) {
405
+ $headers .= $key . ': ' . $val . "\n";
406
+ }
407
+
408
+ $headers .= "Content-ID: $id\n";
409
+ $str = $headers . "\n" . $str;
410
+
411
+ return $str;
412
+ }
413
+
414
+ /**
415
+ * Our own version of parse_str that allows for multiple variables
416
+ * with the same name.
417
+ * @param $string - the query string to parse
418
+ */
419
+ private function parseQuery($string)
420
+ {
421
+ $return = array();
422
+ $parts = explode("&", $string);
423
+ foreach ($parts as $part) {
424
+ list($key, $value) = explode('=', $part, 2);
425
+ $value = urldecode($value);
426
+ if (isset($return[$key])) {
427
+ if (!is_array($return[$key])) {
428
+ $return[$key] = array($return[$key]);
429
+ }
430
+ $return[$key][] = $value;
431
+ } else {
432
+ $return[$key] = $value;
433
+ }
434
+ }
435
+ return $return;
436
+ }
437
+
438
+ /**
439
+ * A version of build query that allows for multiple
440
+ * duplicate keys.
441
+ * @param $parts array of key value pairs
442
+ */
443
+ private function buildQuery($parts)
444
+ {
445
+ $return = array();
446
+ foreach ($parts as $key => $value) {
447
+ if (is_array($value)) {
448
+ foreach ($value as $v) {
449
+ $return[] = urlencode($key) . "=" . urlencode($v);
450
+ }
451
+ } else {
452
+ $return[] = urlencode($key) . "=" . urlencode($value);
453
+ }
454
+ }
455
+ return implode('&', $return);
456
+ }
457
+
458
+ /**
459
+ * If we're POSTing and have no body to send, we can send the query
460
+ * parameters in there, which avoids length issues with longer query
461
+ * params.
462
+ */
463
+ public function maybeMoveParametersToBody()
464
+ {
465
+ if ($this->getRequestMethod() == "POST" && empty($this->postBody)) {
466
+ $this->setRequestHeaders(
467
+ array(
468
+ "content-type" =>
469
+ "application/x-www-form-urlencoded; charset=UTF-8"
470
+ )
471
+ );
472
+ $this->setPostBody($this->buildQuery($this->queryParams));
473
+ $this->queryParams = array();
474
+ }
475
+ }
476
+ }
lib/Google/IO/Abstract.php CHANGED
@@ -1,312 +1,312 @@
1
- <?php
2
- /*
3
- * Copyright 2013 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- /**
19
- * Abstract IO base class
20
- */
21
-
22
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php';
23
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/IO/Exception.php';
24
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/CacheParser.php';
25
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/Request.php';
26
-
27
- abstract class IWP_google_IO_Abstract
28
- {
29
- const UNKNOWN_CODE = 0;
30
- const FORM_URLENCODED = 'application/x-www-form-urlencoded';
31
- const CONNECTION_ESTABLISHED = "HTTP/1.0 200 Connection established\r\n\r\n";
32
- private static $ENTITY_HTTP_METHODS = array("POST" => null, "PUT" => null);
33
-
34
- /** @var IWP_google_Client */
35
- protected $client;
36
-
37
- public function __construct(IWP_google_Client $client)
38
- {
39
- $this->client = $client;
40
- $timeout = $client->getClassConfig('IWP_google_IO_Abstract', 'request_timeout_seconds');
41
- if ($timeout > 0) {
42
- $this->setTimeout($timeout);
43
- }
44
- }
45
-
46
- /**
47
- * Executes a IWP_google_Http_Request and returns the resulting populated IWP_google_Http_Request
48
- * @param IWP_google_Http_Request $request
49
- * @return IWP_google_Http_Request $request
50
- */
51
- abstract public function executeRequest(IWP_google_Http_Request $request);
52
-
53
- /**
54
- * Set options that update the transport implementation's behavior.
55
- * @param $options
56
- */
57
- abstract public function setOptions($options);
58
-
59
- /**
60
- * Set the maximum request time in seconds.
61
- * @param $timeout in seconds
62
- */
63
- abstract public function setTimeout($timeout);
64
-
65
- /**
66
- * Get the maximum request time in seconds.
67
- * @return timeout in seconds
68
- */
69
- abstract public function getTimeout();
70
-
71
- /**
72
- * Determine whether "Connection Established" quirk is needed
73
- * @return boolean
74
- */
75
- abstract protected function needsQuirk();
76
-
77
- /**
78
- * @visible for testing.
79
- * Cache the response to an HTTP request if it is cacheable.
80
- * @param IWP_google_Http_Request $request
81
- * @return bool Returns true if the insertion was successful.
82
- * Otherwise, return false.
83
- */
84
- public function setCachedRequest(IWP_google_Http_Request $request)
85
- {
86
- // Determine if the request is cacheable.
87
- if (IWP_google_Http_CacheParser::isResponseCacheable($request)) {
88
- $this->client->getCache()->set($request->getCacheKey(), $request);
89
- return true;
90
- }
91
-
92
- return false;
93
- }
94
-
95
- /**
96
- * Execute an HTTP Request
97
- *
98
- * @param IWP_google_HttpRequest $request the http request to be executed
99
- * @return IWP_google_HttpRequest http request with the response http code,
100
- * response headers and response body filled in
101
- * @throws IWP_google_IO_Exception on curl or IO error
102
- */
103
- public function makeRequest(IWP_google_Http_Request $request)
104
- {
105
- // First, check to see if we have a valid cached version.
106
- $cached = $this->getCachedRequest($request);
107
- if ($cached !== false && $cached instanceof IWP_google_Http_Request) {
108
- if (!$this->checkMustRevalidateCachedRequest($cached, $request)) {
109
- return $cached;
110
- }
111
- }
112
-
113
- if (array_key_exists($request->getRequestMethod(), self::$ENTITY_HTTP_METHODS)) {
114
- $request = $this->processEntityRequest($request);
115
- }
116
-
117
- list($responseData, $responseHeaders, $respHttpCode) = $this->executeRequest($request);
118
-
119
- if ($respHttpCode == 304 && $cached) {
120
- // If the server responded NOT_MODIFIED, return the cached request.
121
- $this->updateCachedRequest($cached, $responseHeaders);
122
- return $cached;
123
- }
124
-
125
- if (!isset($responseHeaders['Date']) && !isset($responseHeaders['date'])) {
126
- $responseHeaders['Date'] = date("r");
127
- }
128
-
129
- $request->setResponseHttpCode($respHttpCode);
130
- $request->setResponseHeaders($responseHeaders);
131
- $request->setResponseBody($responseData);
132
- // Store the request in cache (the function checks to see if the request
133
- // can actually be cached)
134
- $this->setCachedRequest($request);
135
- return $request;
136
- }
137
-
138
- /**
139
- * @visible for testing.
140
- * @param IWP_google_Http_Request $request
141
- * @return IWP_google_Http_Request|bool Returns the cached object or
142
- * false if the operation was unsuccessful.
143
- */
144
- public function getCachedRequest(IWP_google_Http_Request $request)
145
- {
146
- if (false === IWP_google_Http_CacheParser::isRequestCacheable($request)) {
147
- return false;
148
- }
149
-
150
- return $this->client->getCache()->get($request->getCacheKey());
151
- }
152
-
153
- /**
154
- * @visible for testing
155
- * Process an http request that contains an enclosed entity.
156
- * @param IWP_google_Http_Request $request
157
- * @return IWP_google_Http_Request Processed request with the enclosed entity.
158
- */
159
- public function processEntityRequest(IWP_google_Http_Request $request)
160
- {
161
- $postBody = $request->getPostBody();
162
- $contentType = $request->getRequestHeader("content-type");
163
-
164
- // Set the default content-type as application/x-www-form-urlencoded.
165
- if (false == $contentType) {
166
- $contentType = self::FORM_URLENCODED;
167
- $request->setRequestHeaders(array('content-type' => $contentType));
168
- }
169
-
170
- // Force the payload to match the content-type asserted in the header.
171
- if ($contentType == self::FORM_URLENCODED && is_array($postBody)) {
172
- $postBody = http_build_query($postBody, '', '&');
173
- $request->setPostBody($postBody);
174
- }
175
-
176
- // Make sure the content-length header is set.
177
- if (!$postBody || is_string($postBody)) {
178
- $postsLength = strlen($postBody);
179
- $request->setRequestHeaders(array('content-length' => $postsLength));
180
- }
181
-
182
- return $request;
183
- }
184
-
185
- /**
186
- * Check if an already cached request must be revalidated, and if so update
187
- * the request with the correct ETag headers.
188
- * @param IWP_google_Http_Request $cached A previously cached response.
189
- * @param IWP_google_Http_Request $request The outbound request.
190
- * return bool If the cached object needs to be revalidated, false if it is
191
- * still current and can be re-used.
192
- */
193
- protected function checkMustRevalidateCachedRequest($cached, $request)
194
- {
195
- if (IWP_google_Http_CacheParser::mustRevalidate($cached)) {
196
- $addHeaders = array();
197
- if ($cached->getResponseHeader('etag')) {
198
- // [13.3.4] If an entity tag has been provided by the origin server,
199
- // we must use that entity tag in any cache-conditional request.
200
- $addHeaders['If-None-Match'] = $cached->getResponseHeader('etag');
201
- } elseif ($cached->getResponseHeader('date')) {
202
- $addHeaders['If-Modified-Since'] = $cached->getResponseHeader('date');
203
- }
204
-
205
- $request->setRequestHeaders($addHeaders);
206
- return true;
207
- } else {
208
- return false;
209
- }
210
- }
211
-
212
- /**
213
- * Update a cached request, using the headers from the last response.
214
- * @param IWP_google_HttpRequest $cached A previously cached response.
215
- * @param mixed Associative array of response headers from the last request.
216
- */
217
- protected function updateCachedRequest($cached, $responseHeaders)
218
- {
219
- if (isset($responseHeaders['connection'])) {
220
- $hopByHop = array_merge(
221
- self::$HOP_BY_HOP,
222
- explode(
223
- ',',
224
- $responseHeaders['connection']
225
- )
226
- );
227
-
228
- $endToEnd = array();
229
- foreach ($hopByHop as $key) {
230
- if (isset($responseHeaders[$key])) {
231
- $endToEnd[$key] = $responseHeaders[$key];
232
- }
233
- }
234
- $cached->setResponseHeaders($endToEnd);
235
- }
236
- }
237
-
238
- /**
239
- * Used by the IO lib and also the batch processing.
240
- *
241
- * @param $respData
242
- * @param $headerSize
243
- * @return array
244
- */
245
- public function parseHttpResponse($respData, $headerSize)
246
- {
247
- // only strip this header if the sub-class needs this quirk
248
- if ($this->needsQuirk() && stripos($respData, self::CONNECTION_ESTABLISHED) !== false) {
249
- $respData = str_ireplace(self::CONNECTION_ESTABLISHED, '', $respData);
250
- $headerSize -= strlen(self::CONNECTION_ESTABLISHED);
251
- }
252
-
253
- if ($headerSize) {
254
- $responseBody = substr($respData, $headerSize);
255
- $responseHeaders = substr($respData, 0, $headerSize);
256
- } else {
257
- list($responseHeaders, $responseBody) = explode("\r\n\r\n", $respData, 2);
258
- }
259
-
260
- $responseHeaders = $this->getHttpResponseHeaders($responseHeaders);
261
- return array($responseHeaders, $responseBody);
262
- }
263
-
264
- /**
265
- * Parse out headers from raw headers
266
- * @param rawHeaders array or string
267
- * @return array
268
- */
269
- public function getHttpResponseHeaders($rawHeaders)
270
- {
271
- if (is_array($rawHeaders)) {
272
- return $this->parseArrayHeaders($rawHeaders);
273
- } else {
274
- return $this->parseStringHeaders($rawHeaders);
275
- }
276
- }
277
-
278
- private function parseStringHeaders($rawHeaders)
279
- {
280
- $headers = array();
281
- $responseHeaderLines = explode("\r\n", $rawHeaders);
282
- foreach ($responseHeaderLines as $headerLine) {
283
- if ($headerLine && strpos($headerLine, ':') !== false) {
284
- list($header, $value) = explode(': ', $headerLine, 2);
285
- $header = strtolower($header);
286
- if (isset($responseHeaders[$header])) {
287
- $headers[$header] .= "\n" . $value;
288
- } else {
289
- $headers[$header] = $value;
290
- }
291
- }
292
- }
293
- return $headers;
294
- }
295
-
296
- private function parseArrayHeaders($rawHeaders)
297
- {
298
- $header_count = count($rawHeaders);
299
- $headers = array();
300
-
301
- for ($i = 0; $i < $header_count; $i++) {
302
- $header = $rawHeaders[$i];
303
- // Times will have colons in - so we just want the first match.
304
- $header_parts = explode(': ', $header, 2);
305
- if (count($header_parts) == 2) {
306
- $headers[$header_parts[0]] = $header_parts[1];
307
- }
308
- }
309
-
310
- return $headers;
311
- }
312
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2013 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ /**
19
+ * Abstract IO base class
20
+ */
21
+
22
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php';
23
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/IO/Exception.php';
24
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/CacheParser.php';
25
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/Request.php';
26
+
27
+ abstract class IWP_google_IO_Abstract
28
+ {
29
+ const UNKNOWN_CODE = 0;
30
+ const FORM_URLENCODED = 'application/x-www-form-urlencoded';
31
+ const CONNECTION_ESTABLISHED = "HTTP/1.0 200 Connection established\r\n\r\n";
32
+ private static $ENTITY_HTTP_METHODS = array("POST" => null, "PUT" => null);
33
+
34
+ /** @var IWP_google_Client */
35
+ protected $client;
36
+
37
+ public function __construct(IWP_google_Client $client)
38
+ {
39
+ $this->client = $client;
40
+ $timeout = $client->getClassConfig('IWP_google_IO_Abstract', 'request_timeout_seconds');
41
+ if ($timeout > 0) {
42
+ $this->setTimeout($timeout);
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Executes a IWP_google_Http_Request and returns the resulting populated IWP_google_Http_Request
48
+ * @param IWP_google_Http_Request $request
49
+ * @return IWP_google_Http_Request $request
50
+ */
51
+ abstract public function executeRequest(IWP_google_Http_Request $request);
52
+
53
+ /**
54
+ * Set options that update the transport implementation's behavior.
55
+ * @param $options
56
+ */
57
+ abstract public function setOptions($options);
58
+
59
+ /**
60
+ * Set the maximum request time in seconds.
61
+ * @param $timeout in seconds
62
+ */
63
+ abstract public function setTimeout($timeout);
64
+
65
+ /**
66
+ * Get the maximum request time in seconds.
67
+ * @return timeout in seconds
68
+ */
69
+ abstract public function getTimeout();
70
+
71
+ /**
72
+ * Determine whether "Connection Established" quirk is needed
73
+ * @return boolean
74
+ */
75
+ abstract protected function needsQuirk();
76
+
77
+ /**
78
+ * @visible for testing.
79
+ * Cache the response to an HTTP request if it is cacheable.
80
+ * @param IWP_google_Http_Request $request
81
+ * @return bool Returns true if the insertion was successful.
82
+ * Otherwise, return false.
83
+ */
84
+ public function setCachedRequest(IWP_google_Http_Request $request)
85
+ {
86
+ // Determine if the request is cacheable.
87
+ if (IWP_google_Http_CacheParser::isResponseCacheable($request)) {
88
+ $this->client->getCache()->set($request->getCacheKey(), $request);
89
+ return true;
90
+ }
91
+
92
+ return false;
93
+ }
94
+
95
+ /**
96
+ * Execute an HTTP Request
97
+ *
98
+ * @param IWP_google_HttpRequest $request the http request to be executed
99
+ * @return IWP_google_HttpRequest http request with the response http code,
100
+ * response headers and response body filled in
101
+ * @throws IWP_google_IO_Exception on curl or IO error
102
+ */
103
+ public function makeRequest(IWP_google_Http_Request $request)
104
+ {
105
+ // First, check to see if we have a valid cached version.
106
+ $cached = $this->getCachedRequest($request);
107
+ if ($cached !== false && $cached instanceof IWP_google_Http_Request) {
108
+ if (!$this->checkMustRevalidateCachedRequest($cached, $request)) {
109
+ return $cached;
110
+ }
111
+ }
112
+
113
+ if (array_key_exists($request->getRequestMethod(), self::$ENTITY_HTTP_METHODS)) {
114
+ $request = $this->processEntityRequest($request);
115
+ }
116
+
117
+ list($responseData, $responseHeaders, $respHttpCode) = $this->executeRequest($request);
118
+
119
+ if ($respHttpCode == 304 && $cached) {
120
+ // If the server responded NOT_MODIFIED, return the cached request.
121
+ $this->updateCachedRequest($cached, $responseHeaders);
122
+ return $cached;
123
+ }
124
+
125
+ if (!isset($responseHeaders['Date']) && !isset($responseHeaders['date'])) {
126
+ $responseHeaders['Date'] = date("r");
127
+ }
128
+
129
+ $request->setResponseHttpCode($respHttpCode);
130
+ $request->setResponseHeaders($responseHeaders);
131
+ $request->setResponseBody($responseData);
132
+ // Store the request in cache (the function checks to see if the request
133
+ // can actually be cached)
134
+ $this->setCachedRequest($request);
135
+ return $request;
136
+ }
137
+
138
+ /**
139
+ * @visible for testing.
140
+ * @param IWP_google_Http_Request $request
141
+ * @return IWP_google_Http_Request|bool Returns the cached object or
142
+ * false if the operation was unsuccessful.
143
+ */
144
+ public function getCachedRequest(IWP_google_Http_Request $request)
145
+ {
146
+ if (false === IWP_google_Http_CacheParser::isRequestCacheable($request)) {
147
+ return false;
148
+ }
149
+
150
+ return $this->client->getCache()->get($request->getCacheKey());
151
+ }
152
+
153
+ /**
154
+ * @visible for testing
155
+ * Process an http request that contains an enclosed entity.
156
+ * @param IWP_google_Http_Request $request
157
+ * @return IWP_google_Http_Request Processed request with the enclosed entity.
158
+ */
159
+ public function processEntityRequest(IWP_google_Http_Request $request)
160
+ {
161
+ $postBody = $request->getPostBody();
162
+ $contentType = $request->getRequestHeader("content-type");
163
+
164
+ // Set the default content-type as application/x-www-form-urlencoded.
165
+ if (false == $contentType) {
166
+ $contentType = self::FORM_URLENCODED;
167
+ $request->setRequestHeaders(array('content-type' => $contentType));
168
+ }
169
+
170
+ // Force the payload to match the content-type asserted in the header.
171
+ if ($contentType == self::FORM_URLENCODED && is_array($postBody)) {
172
+ $postBody = http_build_query($postBody, '', '&');
173
+ $request->setPostBody($postBody);
174
+ }
175
+
176
+ // Make sure the content-length header is set.
177
+ if (!$postBody || is_string($postBody)) {
178
+ $postsLength = strlen($postBody);
179
+ $request->setRequestHeaders(array('content-length' => $postsLength));
180
+ }
181
+
182
+ return $request;
183
+ }
184
+
185
+ /**
186
+ * Check if an already cached request must be revalidated, and if so update
187
+ * the request with the correct ETag headers.
188
+ * @param IWP_google_Http_Request $cached A previously cached response.
189
+ * @param IWP_google_Http_Request $request The outbound request.
190
+ * return bool If the cached object needs to be revalidated, false if it is
191
+ * still current and can be re-used.
192
+ */
193
+ protected function checkMustRevalidateCachedRequest($cached, $request)
194
+ {
195
+ if (IWP_google_Http_CacheParser::mustRevalidate($cached)) {
196
+ $addHeaders = array();
197
+ if ($cached->getResponseHeader('etag')) {
198
+ // [13.3.4] If an entity tag has been provided by the origin server,
199
+ // we must use that entity tag in any cache-conditional request.
200
+ $addHeaders['If-None-Match'] = $cached->getResponseHeader('etag');
201
+ } elseif ($cached->getResponseHeader('date')) {
202
+ $addHeaders['If-Modified-Since'] = $cached->getResponseHeader('date');
203
+ }
204
+
205
+ $request->setRequestHeaders($addHeaders);
206
+ return true;
207
+ } else {
208
+ return false;
209
+ }
210
+ }
211
+
212
+ /**
213
+ * Update a cached request, using the headers from the last response.
214
+ * @param IWP_google_HttpRequest $cached A previously cached response.
215
+ * @param mixed Associative array of response headers from the last request.
216
+ */
217
+ protected function updateCachedRequest($cached, $responseHeaders)
218
+ {
219
+ if (isset($responseHeaders['connection'])) {
220
+ $hopByHop = array_merge(
221
+ self::$HOP_BY_HOP,
222
+ explode(
223
+ ',',
224
+ $responseHeaders['connection']
225
+ )
226
+ );
227
+
228
+ $endToEnd = array();
229
+ foreach ($hopByHop as $key) {
230
+ if (isset($responseHeaders[$key])) {
231
+ $endToEnd[$key] = $responseHeaders[$key];
232
+ }
233
+ }
234
+ $cached->setResponseHeaders($endToEnd);
235
+ }
236
+ }
237
+
238
+ /**
239
+ * Used by the IO lib and also the batch processing.
240
+ *
241
+ * @param $respData
242
+ * @param $headerSize
243
+ * @return array
244
+ */
245
+ public function parseHttpResponse($respData, $headerSize)
246
+ {
247
+ // only strip this header if the sub-class needs this quirk
248
+ if ($this->needsQuirk() && stripos($respData, self::CONNECTION_ESTABLISHED) !== false) {
249
+ $respData = str_ireplace(self::CONNECTION_ESTABLISHED, '', $respData);
250
+ $headerSize -= strlen(self::CONNECTION_ESTABLISHED);
251
+ }
252
+
253
+ if ($headerSize) {
254
+ $responseBody = substr($respData, $headerSize);
255
+ $responseHeaders = substr($respData, 0, $headerSize);
256
+ } else {
257
+ list($responseHeaders, $responseBody) = explode("\r\n\r\n", $respData, 2);
258
+ }
259
+
260
+ $responseHeaders = $this->getHttpResponseHeaders($responseHeaders);
261
+ return array($responseHeaders, $responseBody);
262
+ }
263
+
264
+ /**
265
+ * Parse out headers from raw headers
266
+ * @param rawHeaders array or string
267
+ * @return array
268
+ */
269
+ public function getHttpResponseHeaders($rawHeaders)
270
+ {
271
+ if (is_array($rawHeaders)) {
272
+ return $this->parseArrayHeaders($rawHeaders);
273
+ } else {
274
+ return $this->parseStringHeaders($rawHeaders);
275
+ }
276
+ }
277
+
278
+ private function parseStringHeaders($rawHeaders)
279
+ {
280
+ $headers = array();
281
+ $responseHeaderLines = explode("\r\n", $rawHeaders);
282
+ foreach ($responseHeaderLines as $headerLine) {
283
+ if ($headerLine && strpos($headerLine, ':') !== false) {
284
+ list($header, $value) = explode(': ', $headerLine, 2);
285
+ $header = strtolower($header);
286
+ if (isset($responseHeaders[$header])) {
287
+ $headers[$header] .= "\n" . $value;
288
+ } else {
289
+ $headers[$header] = $value;
290
+ }
291
+ }
292
+ }
293
+ return $headers;
294
+ }
295
+
296
+ private function parseArrayHeaders($rawHeaders)
297
+ {
298
+ $header_count = count($rawHeaders);
299
+ $headers = array();
300
+
301
+ for ($i = 0; $i < $header_count; $i++) {
302
+ $header = $rawHeaders[$i];
303
+ // Times will have colons in - so we just want the first match.
304
+ $header_parts = explode(': ', $header, 2);
305
+ if (count($header_parts) == 2) {
306
+ $headers[$header_parts[0]] = $header_parts[1];
307
+ }
308
+ }
309
+
310
+ return $headers;
311
+ }
312
+ }
lib/Google/IO/Curl.php CHANGED
@@ -1,135 +1,135 @@
1
- <?php
2
- /*
3
- * Copyright 2014 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- /**
19
- * Curl based implementation of IWP_google_IO.
20
- *
21
- * @author Stuart Langley <slangley@google.com>
22
- */
23
-
24
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/IO/Abstract.php';
25
-
26
- class IWP_google_IO_Curl extends IWP_google_IO_Abstract
27
- {
28
- // hex for version 7.31.0
29
- const NO_QUIRK_VERSION = 0x071F00;
30
-
31
- private $options = array();
32
- /**
33
- * Execute an HTTP Request
34
- *
35
- * @param IWP_google_HttpRequest $request the http request to be executed
36
- * @return IWP_google_HttpRequest http request with the response http code,
37
- * response headers and response body filled in
38
- * @throws IWP_google_IO_Exception on curl or IO error
39
- */
40
- public function executeRequest(IWP_google_Http_Request $request)
41
- {
42
- $curl = curl_init();
43
-
44
- if ($request->getPostBody()) {
45
- curl_setopt($curl, CURLOPT_POSTFIELDS, $request->getPostBody());
46
- }
47
-
48
- $requestHeaders = $request->getRequestHeaders();
49
- if ($requestHeaders && is_array($requestHeaders)) {
50
- $curlHeaders = array();
51
- foreach ($requestHeaders as $k => $v) {
52
- $curlHeaders[] = "$k: $v";
53
- }
54
- curl_setopt($curl, CURLOPT_HTTPHEADER, $curlHeaders);
55
- }
56
-
57
- curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $request->getRequestMethod());
58
- curl_setopt($curl, CURLOPT_USERAGENT, $request->getUserAgent());
59
-
60
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
61
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
62
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
63
- curl_setopt($curl, CURLOPT_HEADER, true);
64
-
65
- curl_setopt($curl, CURLOPT_URL, $request->getUrl());
66
-
67
- if ($request->canGzip()) {
68
- curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate');
69
- }
70
-
71
- foreach ($this->options as $key => $var) {
72
- curl_setopt($curl, $key, $var);
73
- }
74
-
75
- if (!isset($this->options[CURLOPT_CAINFO])) {
76
- curl_setopt($curl, CURLOPT_CAINFO, dirname(__FILE__) . '/cacerts.pem');
77
- }
78
-
79
- $response = curl_exec($curl);
80
- if ($response === false) {
81
- throw new IWP_google_IO_Exception(curl_error($curl));
82
- }
83
- $headerSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
84
-
85
- $responseBody = substr($response, $headerSize);
86
- $responseHeaderString = substr($response, 0, $headerSize);
87
- $responseHeaders = $this->getHttpResponseHeaders($responseHeaderString);
88
- $responseCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
89
-
90
- return array($responseBody, $responseHeaders, $responseCode);
91
- }
92
-
93
- /**
94
- * Set options that update the transport implementation's behavior.
95
- * @param $options
96
- */
97
- public function setOptions($options)
98
- {
99
- $this->options = $options + $this->options;
100
- }
101
-
102
- /**
103
- * Set the maximum request time in seconds.
104
- * @param $timeout in seconds
105
- */
106
- public function setTimeout($timeout)
107
- {
108
- // Since this timeout is really for putting a bound on the time
109
- // we'll set them both to the same. If you need to specify a longer
110
- // CURLOPT_TIMEOUT, or a tigher CONNECTTIMEOUT, the best thing to
111
- // do is use the setOptions method for the values individually.
112
- $this->options[CURLOPT_CONNECTTIMEOUT] = $timeout;
113
- $this->options[CURLOPT_TIMEOUT] = $timeout;
114
- }
115
-
116
- /**
117
- * Get the maximum request time in seconds.
118
- * @return timeout in seconds
119
- */
120
- public function getTimeout()
121
- {
122
- return $this->options[CURLOPT_TIMEOUT];
123
- }
124
-
125
- /**
126
- * Determine whether "Connection Established" quirk is needed
127
- * @return boolean
128
- */
129
- protected function needsQuirk()
130
- {
131
- $ver = curl_version();
132
- $versionNum = $ver['version_number'];
133
- return $versionNum < IWP_google_IO_Curl::NO_QUIRK_VERSION;
134
- }
135
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ /**
19
+ * Curl based implementation of IWP_google_IO.
20
+ *
21
+ * @author Stuart Langley <slangley@google.com>
22
+ */
23
+
24
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/IO/Abstract.php';
25
+
26
+ class IWP_google_IO_Curl extends IWP_google_IO_Abstract
27
+ {
28
+ // hex for version 7.31.0
29
+ const NO_QUIRK_VERSION = 0x071F00;
30
+
31
+ private $options = array();
32
+ /**
33
+ * Execute an HTTP Request
34
+ *
35
+ * @param IWP_google_HttpRequest $request the http request to be executed
36
+ * @return IWP_google_HttpRequest http request with the response http code,
37
+ * response headers and response body filled in
38
+ * @throws IWP_google_IO_Exception on curl or IO error
39
+ */
40
+ public function executeRequest(IWP_google_Http_Request $request)
41
+ {
42
+ $curl = curl_init();
43
+
44
+ if ($request->getPostBody()) {
45
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $request->getPostBody());
46
+ }
47
+
48
+ $requestHeaders = $request->getRequestHeaders();
49
+ if ($requestHeaders && is_array($requestHeaders)) {
50
+ $curlHeaders = array();
51
+ foreach ($requestHeaders as $k => $v) {
52
+ $curlHeaders[] = "$k: $v";
53
+ }
54
+ curl_setopt($curl, CURLOPT_HTTPHEADER, $curlHeaders);
55
+ }
56
+
57
+ curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $request->getRequestMethod());
58
+ curl_setopt($curl, CURLOPT_USERAGENT, $request->getUserAgent());
59
+
60
+ curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
61
+ curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
62
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
63
+ curl_setopt($curl, CURLOPT_HEADER, true);
64
+
65
+ curl_setopt($curl, CURLOPT_URL, $request->getUrl());
66
+
67
+ if ($request->canGzip()) {
68
+ curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate');
69
+ }
70
+
71
+ foreach ($this->options as $key => $var) {
72
+ curl_setopt($curl, $key, $var);
73
+ }
74
+
75
+ if (!isset($this->options[CURLOPT_CAINFO])) {
76
+ curl_setopt($curl, CURLOPT_CAINFO, dirname(__FILE__) . '/cacerts.pem');
77
+ }
78
+
79
+ $response = curl_exec($curl);
80
+ if ($response === false) {
81
+ throw new IWP_google_IO_Exception(curl_error($curl));
82
+ }
83
+ $headerSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
84
+
85
+ $responseBody = substr($response, $headerSize);
86
+ $responseHeaderString = substr($response, 0, $headerSize);
87
+ $responseHeaders = $this->getHttpResponseHeaders($responseHeaderString);
88
+ $responseCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
89
+
90
+ return array($responseBody, $responseHeaders, $responseCode);
91
+ }
92
+
93
+ /**
94
+ * Set options that update the transport implementation's behavior.
95
+ * @param $options
96
+ */
97
+ public function setOptions($options)
98
+ {
99
+ $this->options = $options + $this->options;
100
+ }
101
+
102
+ /**
103
+ * Set the maximum request time in seconds.
104
+ * @param $timeout in seconds
105
+ */
106
+ public function setTimeout($timeout)
107
+ {
108
+ // Since this timeout is really for putting a bound on the time
109
+ // we'll set them both to the same. If you need to specify a longer
110
+ // CURLOPT_TIMEOUT, or a tigher CONNECTTIMEOUT, the best thing to
111
+ // do is use the setOptions method for the values individually.
112
+ $this->options[CURLOPT_CONNECTTIMEOUT] = $timeout;
113
+ $this->options[CURLOPT_TIMEOUT] = $timeout;
114
+ }
115
+
116
+ /**
117
+ * Get the maximum request time in seconds.
118
+ * @return timeout in seconds
119
+ */
120
+ public function getTimeout()
121
+ {
122
+ return $this->options[CURLOPT_TIMEOUT];
123
+ }
124
+
125
+ /**
126
+ * Determine whether "Connection Established" quirk is needed
127
+ * @return boolean
128
+ */
129
+ protected function needsQuirk()
130
+ {
131
+ $ver = curl_version();
132
+ $versionNum = $ver['version_number'];
133
+ return $versionNum < IWP_google_IO_Curl::NO_QUIRK_VERSION;
134
+ }
135
+ }
lib/Google/IO/Exception.php CHANGED
@@ -1,22 +1,22 @@
1
- <?php
2
- /*
3
- * Copyright 2013 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Exception.php';
19
-
20
- class IWP_google_IO_Exception extends IWP_google_Exception
21
- {
22
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2013 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Exception.php';
19
+
20
+ class IWP_google_IO_Exception extends IWP_google_Exception
21
+ {
22
+ }
lib/Google/IO/Stream.php CHANGED
@@ -1,182 +1,182 @@
1
- <?php
2
- /*
3
- * Copyright 2013 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- /**
19
- * Http Streams based implementation of IWP_google_IO.
20
- *
21
- * @author Stuart Langley <slangley@google.com>
22
- */
23
-
24
- require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/IO/Abstract.php';
25
-
26
- class IWP_google_IO_Stream extends IWP_google_IO_Abstract
27
- {
28
- const TIMEOUT = "timeout";
29
- const ZLIB = "compress.zlib://";
30
- private $options = array();
31
-
32
- private static $DEFAULT_HTTP_CONTEXT = array(
33
- "follow_location" => 0,
34
- "ignore_errors" => 1,
35
- );
36
-
37
- private static $DEFAULT_SSL_CONTEXT = array(
38
- "verify_peer" => true,
39
- );
40
-
41
- /**
42
- * Execute an HTTP Request
43
- *
44
- * @param IWP_google_HttpRequest $request the http request to be executed
45
- * @return IWP_google_HttpRequest http request with the response http code,
46
- * response headers and response body filled in
47
- * @throws IWP_google_IO_Exception on curl or IO error
48
- */
49
- public function executeRequest(IWP_google_Http_Request $request)
50
- {
51
- $default_options = stream_context_get_options(stream_context_get_default());
52
-
53
- $requestHttpContext = array_key_exists('http', $default_options) ?
54
- $default_options['http'] : array();
55
-
56
- if ($request->getPostBody()) {
57
- $requestHttpContext["content"] = $request->getPostBody();
58
- }
59
-
60
- $requestHeaders = $request->getRequestHeaders();
61
- if ($requestHeaders && is_array($requestHeaders)) {
62
- $headers = "";
63
- foreach ($requestHeaders as $k => $v) {
64
- $headers .= "$k: $v\r\n";
65
- }
66
- $requestHttpContext["header"] = $headers;
67
- }
68
-
69
- $requestHttpContext["method"] = $request->getRequestMethod();
70
- $requestHttpContext["user_agent"] = $request->getUserAgent();
71
-
72
- $requestSslContext = array_key_exists('ssl', $default_options) ?
73
- $default_options['ssl'] : array();
74
-
75
- if (!array_key_exists("cafile", $requestSslContext)) {
76
- $requestSslContext["cafile"] = dirname(__FILE__) . '/cacerts.pem';
77
- }
78
-
79
- $options = array(
80
- "http" => array_merge(
81
- self::$DEFAULT_HTTP_CONTEXT,
82
- $requestHttpContext
83
- ),
84
- "ssl" => array_merge(
85
- self::$DEFAULT_SSL_CONTEXT,
86
- $requestSslContext
87
- )
88
- );
89
-
90
- $context = stream_context_create($options);
91
-
92
- $url = $request->getUrl();
93
-
94
- if ($request->canGzip()) {
95
- $url = self::ZLIB . $url;
96
- }
97
-
98
- // Not entirely happy about this, but supressing the warning from the
99
- // fopen seems like the best situation here - we can't do anything
100
- // useful with it, and failure to connect is a legitimate run
101
- // time situation.
102
- @$fh = fopen($url, 'r', false, $context);
103
-
104
- $response_data = false;
105
- $respHttpCode = self::UNKNOWN_CODE;
106
- if ($fh) {
107
- if (isset($this->options[self::TIMEOUT])) {
108
- stream_set_timeout($fh, $this->options[self::TIMEOUT]);
109
- }
110
-
111
- $response_data = stream_get_contents($fh);
112
- fclose($fh);
113
-
114
- $respHttpCode = $this->getHttpResponseCode($http_response_header);
115
- }
116
-
117
- if (false === $response_data) {
118
- throw new IWP_google_IO_Exception(
119
- sprintf(
120
- "HTTP Error: Unable to connect: '%s'",
121
- $respHttpCode
122
- ),
123
- $respHttpCode
124
- );
125
- }
126
-
127
- $responseHeaders = $this->getHttpResponseHeaders($http_response_header);
128
-
129
- return array($response_data, $responseHeaders, $respHttpCode);
130
- }
131
-
132
- /**
133
- * Set options that update the transport implementation's behavior.
134
- * @param $options
135
- */
136
- public function setOptions($options)
137
- {
138
- $this->options = $options + $this->options;
139
- }
140
-
141
- /**
142
- * Set the maximum request time in seconds.
143
- * @param $timeout in seconds
144
- */
145
- public function setTimeout($timeout)
146
- {
147
- $this->options[self::TIMEOUT] = $timeout;
148
- }
149
-
150
- /**
151
- * Get the maximum request time in seconds.
152
- * @return timeout in seconds
153
- */
154
- public function getTimeout()
155
- {
156
- return $this->options[self::TIMEOUT];
157
- }
158
-
159
- /**
160
- * Determine whether "Connection Established" quirk is needed
161
- * @return boolean
162
- */
163
- protected function needsQuirk()
164
- {
165
- // Stream needs the special quirk
166
- return true;
167
- }
168
-
169
- protected function getHttpResponseCode($response_headers)
170
- {
171
- $header_count = count($response_headers);
172
-
173
- for ($i = 0; $i < $header_count; $i++) {
174
- $header = $response_headers[$i];
175
- if (strncasecmp("HTTP", $header, strlen("HTTP")) == 0) {
176
- $response = explode(' ', $header);
177
- return $response[1];
178
- }
179
- }
180
- return self::UNKNOWN_CODE;
181
- }
182
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2013 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ /**
19
+ * Http Streams based implementation of IWP_google_IO.
20
+ *
21
+ * @author Stuart Langley <slangley@google.com>
22
+ */
23
+
24
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/IO/Abstract.php';
25
+
26
+ class IWP_google_IO_Stream extends IWP_google_IO_Abstract
27
+ {
28
+ const TIMEOUT = "timeout";
29
+ const ZLIB = "compress.zlib://";
30
+ private $options = array();
31
+
32
+ private static $DEFAULT_HTTP_CONTEXT = array(
33
+ "follow_location" => 0,
34
+ "ignore_errors" => 1,
35
+ );
36
+
37
+ private static $DEFAULT_SSL_CONTEXT = array(
38
+ "verify_peer" => true,
39
+ );
40
+
41
+ /**
42
+ * Execute an HTTP Request
43
+ *
44
+ * @param IWP_google_HttpRequest $request the http request to be executed
45
+ * @return IWP_google_HttpRequest http request with the response http code,
46
+ * response headers and response body filled in
47
+ * @throws IWP_google_IO_Exception on curl or IO error
48
+ */
49
+ public function executeRequest(IWP_google_Http_Request $request)
50
+ {
51
+ $default_options = stream_context_get_options(stream_context_get_default());
52
+
53
+ $requestHttpContext = array_key_exists('http', $default_options) ?
54
+ $default_options['http'] : array();
55
+
56
+ if ($request->getPostBody()) {
57
+ $requestHttpContext["content"] = $request->getPostBody();
58
+ }
59
+
60
+ $requestHeaders = $request->getRequestHeaders();
61
+ if ($requestHeaders && is_array($requestHeaders)) {
62
+ $headers = "";
63
+ foreach ($requestHeaders as $k => $v) {
64
+ $headers .= "$k: $v\r\n";
65
+ }
66
+ $requestHttpContext["header"] = $headers;
67
+ }
68
+
69
+ $requestHttpContext["method"] = $request->getRequestMethod();
70
+ $requestHttpContext["user_agent"] = $request->getUserAgent();
71
+
72
+ $requestSslContext = array_key_exists('ssl', $default_options) ?
73
+ $default_options['ssl'] : array();
74
+
75
+ if (!array_key_exists("cafile", $requestSslContext)) {
76
+ $requestSslContext["cafile"] = dirname(__FILE__) . '/cacerts.pem';
77
+ }
78
+
79
+ $options = array(
80
+ "http" => array_merge(
81
+ self::$DEFAULT_HTTP_CONTEXT,
82
+ $requestHttpContext
83
+ ),
84
+ "ssl" => array_merge(
85
+ self::$DEFAULT_SSL_CONTEXT,
86
+ $requestSslContext
87
+ )
88
+ );
89
+
90
+ $context = stream_context_create($options);
91
+
92
+ $url = $request->getUrl();
93
+
94
+ if ($request->canGzip()) {
95
+ $url = self::ZLIB . $url;
96
+ }
97
+
98
+ // Not entirely happy about this, but supressing the warning from the
99
+ // fopen seems like the best situation here - we can't do anything
100
+ // useful with it, and failure to connect is a legitimate run
101
+ // time situation.
102
+ @$fh = fopen($url, 'r', false, $context);
103
+
104
+ $response_data = false;
105
+ $respHttpCode = self::UNKNOWN_CODE;
106
+ if ($fh) {
107
+ if (isset($this->options[self::TIMEOUT])) {
108
+ stream_set_timeout($fh, $this->options[self::TIMEOUT]);
109
+ }
110
+
111
+ $response_data = stream_get_contents($fh);
112
+ fclose($fh);
113
+
114
+ $respHttpCode = $this->getHttpResponseCode($http_response_header);
115
+ }
116
+
117
+ if (false === $response_data) {
118
+ throw new IWP_google_IO_Exception(
119
+ sprintf(
120
+ "HTTP Error: Unable to connect: '%s'",
121
+ $respHttpCode
122
+ ),
123
+ $respHttpCode
124
+ );
125
+ }
126
+
127
+ $responseHeaders = $this->getHttpResponseHeaders($http_response_header);
128
+
129
+ return array($response_data, $responseHeaders, $respHttpCode);
130
+ }
131
+
132
+ /**
133
+ * Set options that update the transport implementation's behavior.
134
+ * @param $options
135
+ */
136
+ public function setOptions($options)
137
+ {
138
+ $this->options = $options + $this->options;
139
+ }
140
+
141
+ /**
142
+ * Set the maximum request time in seconds.
143
+ * @param $timeout in seconds
144
+ */
145
+ public function setTimeout($timeout)
146
+ {
147
+ $this->options[self::TIMEOUT] = $timeout;
148
+ }
149
+
150
+ /**
151
+ * Get the maximum request time in seconds.
152
+ * @return timeout in seconds
153
+ */
154
+ public function getTimeout()
155
+ {
156
+ return $this->options[self::TIMEOUT];
157
+ }
158
+
159
+ /**
160
+ * Determine whether "Connection Established" quirk is needed
161
+ * @return boolean
162
+ */
163
+ protected function needsQuirk()
164
+ {
165
+ // Stream needs the special quirk
166
+ return true;
167
+ }
168
+
169
+ protected function getHttpResponseCode($response_headers)
170
+ {
171
+ $header_count = count($response_headers);
172
+
173
+ for ($i = 0; $i < $header_count; $i++) {
174
+ $header = $response_headers[$i];
175
+ if (strncasecmp("HTTP", $header, strlen("HTTP")) == 0) {
176
+ $response = explode(' ', $header);
177
+ return $response[1];
178
+ }
179
+ }
180
+ return self::UNKNOWN_CODE;
181
+ }
182
+ }
lib/Google/IO/cacerts.pem CHANGED
@@ -1,2183 +1,2183 @@
1
- # Issuer: CN=GTE CyberTrust Global Root O=GTE Corporation OU=GTE CyberTrust Solutions, Inc.
2
- # Subject: CN=GTE CyberTrust Global Root O=GTE Corporation OU=GTE CyberTrust Solutions, Inc.
3
- # Label: "GTE CyberTrust Global Root"
4
- # Serial: 421
5
- # MD5 Fingerprint: ca:3d:d3:68:f1:03:5c:d0:32:fa:b8:2b:59:e8:5a:db
6
- # SHA1 Fingerprint: 97:81:79:50:d8:1c:96:70:cc:34:d8:09:cf:79:44:31:36:7e:f4:74
7
- # SHA256 Fingerprint: a5:31:25:18:8d:21:10:aa:96:4b:02:c7:b7:c6:da:32:03:17:08:94:e5:fb:71:ff:fb:66:67:d5:e6:81:0a:36
8
- -----BEGIN CERTIFICATE-----
9
- MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYD
10
- VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
11
- bHV0aW9ucywgSW5jLjEjMCEGA1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJv
12
- b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV
13
- UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
14
- cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds
15
- b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH
16
- iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS
17
- r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4
18
- 04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3r
19
- GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9
20
- 3PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0P
21
- lZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/
22
- -----END CERTIFICATE-----
23
-
24
- # Issuer: CN=Thawte Server CA O=Thawte Consulting cc OU=Certification Services Division
25
- # Subject: CN=Thawte Server CA O=Thawte Consulting cc OU=Certification Services Division
26
- # Label: "Thawte Server CA"
27
- # Serial: 1
28
- # MD5 Fingerprint: c5:70:c4:a2:ed:53:78:0c:c8:10:53:81:64:cb:d0:1d
29
- # SHA1 Fingerprint: 23:e5:94:94:51:95:f2:41:48:03:b4:d5:64:d2:a3:a3:f5:d8:8b:8c
30
- # SHA256 Fingerprint: b4:41:0b:73:e2:e6:ea:ca:47:fb:c4:2f:8f:a4:01:8a:f4:38:1d:c5:4c:fa:a8:44:50:46:1e:ed:09:45:4d:e9
31
- -----BEGIN CERTIFICATE-----
32
- MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx
33
- FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
34
- VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
35
- biBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm
36
- MCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTYwODAx
37
- MDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT
38
- DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3
39
- dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNl
40
- cyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3
41
- DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD
42
- gY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl/Kj0R1HahbUgdJSGHg91
43
- yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg71CcEJRCX
44
- L+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGj
45
- EzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG
46
- 7oWDTSEwjsrZqG9JGubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6e
47
- QNuozDJ0uW8NxuOzRAvZim+aKZuZGCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZ
48
- qdq5snUb9kLy78fyGPmJvKP/iiMucEc=
49
- -----END CERTIFICATE-----
50
-
51
- # Issuer: CN=Thawte Premium Server CA O=Thawte Consulting cc OU=Certification Services Division
52
- # Subject: CN=Thawte Premium Server CA O=Thawte Consulting cc OU=Certification Services Division
53
- # Label: "Thawte Premium Server CA"
54
- # Serial: 1
55
- # MD5 Fingerprint: 06:9f:69:79:16:66:90:02:1b:8c:8c:a2:c3:07:6f:3a
56
- # SHA1 Fingerprint: 62:7f:8d:78:27:65:63:99:d2:7d:7f:90:44:c9:fe:b3:f3:3e:fa:9a
57
- # SHA256 Fingerprint: ab:70:36:36:5c:71:54:aa:29:c2:c2:9f:5d:41:91:16:3b:16:2a:22:25:01:13:57:d5:6d:07:ff:a7:bc:1f:72
58
- -----BEGIN CERTIFICATE-----
59
- MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx
60
- FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJ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
78
- # Issuer: O=Equifax OU=Equifax Secure Certificate Authority
79
- # Subject: O=Equifax OU=Equifax Secure Certificate Authority
80
- # Label: "Equifax Secure CA"
81
- # Serial: 903804111
82
- # MD5 Fingerprint: 67:cb:9d:c0:13:24:8a:82:9b:b2:17:1e:d1:1b:ec:d4
83
- # SHA1 Fingerprint: d2:32:09:ad:23:d3:14:23:21:74:e4:0d:7f:9d:62:13:97:86:63:3a
84
- # SHA256 Fingerprint: 08:29:7a:40:47:db:a2:36:80:c7:31:db:6e:31:76:53:ca:78:48:e1:be:bd:3a:0b:01:79:a7:07:f9:2c:f1:78
85
- -----BEGIN CERTIFICATE-----
86
- MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
87
- UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
88
- dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
89
- MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
90
- dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
91
- AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
92
- BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
93
- cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
94
- AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
95
- MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
96
- aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
97
- ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
98
- IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
99
- MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
100
- A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
101
- 7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
102
- 1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
103
- -----END CERTIFICATE-----
104
-
105
- # Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
106
- # Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
107
- # Label: "Verisign Class 3 Public Primary Certification Authority"
108
- # Serial: 149843929435818692848040365716851702463
109
- # MD5 Fingerprint: 10:fc:63:5d:f6:26:3e:0d:f3:25:be:5f:79:cd:67:67
110
- # SHA1 Fingerprint: 74:2c:31:92:e6:07:e4:24:eb:45:49:54:2b:e1:bb:c5:3e:61:74:e2
111
- # SHA256 Fingerprint: e7:68:56:34:ef:ac:f6:9a:ce:93:9a:6b:25:5b:7b:4f:ab:ef:42:93:5b:50:a2:65:ac:b5:cb:60:27:e4:4e:70
112
- -----BEGIN CERTIFICATE-----
113
- MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
114
- A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
115
- cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
116
- MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
117
- BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
118
- YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
119
- ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
120
- BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
121
- I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
122
- CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
123
- lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
124
- AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
125
- -----END CERTIFICATE-----
126
-
127
- # Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority - G2/(c) 1998 VeriSign, Inc. - For authorized use only/VeriSign Trust Network
128
- # Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority - G2/(c) 1998 VeriSign, Inc. - For authorized use only/VeriSign Trust Network
129
- # Label: "Verisign Class 3 Public Primary Certification Authority - G2"
130
- # Serial: 167285380242319648451154478808036881606
131
- # MD5 Fingerprint: a2:33:9b:4c:74:78:73:d4:6c:e7:c1:f3:8d:cb:5c:e9
132
- # SHA1 Fingerprint: 85:37:1c:a6:e5:50:14:3d:ce:28:03:47:1b:de:3a:09:e8:f8:77:0f
133
- # SHA256 Fingerprint: 83:ce:3c:12:29:68:8a:59:3d:48:5f:81:97:3c:0f:91:95:43:1e:da:37:cc:5e:36:43:0e:79:c7:a8:88:63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
150
- F6YM40AIOw7n60RzKprxaZLvcRTDOaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpY
151
- oJ2daZH9
152
- -----END CERTIFICATE-----
153
-
154
- # Issuer: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA
155
- # Subject: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA
156
- # Label: "GlobalSign Root CA"
157
- # Serial: 4835703278459707669005204
158
- # MD5 Fingerprint: 3e:45:52:15:09:51:92:e1:b7:5d:37:9f:b1:87:29:8a
159
- # SHA1 Fingerprint: b1:bc:96:8b:d4:f4:9d:62:2a:a8:9a:81:f2:15:01:52:a4:1d:82:9c
160
- # SHA256 Fingerprint: eb:d4:10:40:e4:bb:3e:c7:42:c9:e3:81:d3:1e:f2:a4:1a:48:b6:68:5c:96:e7:ce:f3:c1:df:6c:d4:33:1c:99
161
- -----BEGIN CERTIFICATE-----
162
- MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkG
163
- A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
164
- b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw
165
- MDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
166
- YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT
167
- aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ
168
- jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp
169
- xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp
170
- 1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG
171
- snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ
172
- U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8
173
- 9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E
174
- BTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0B
175
- AQUFAAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOz
176
- yj1hTdNGCbM+w6DjY1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE
177
- 38NflNUVyRRBnMRddWQVDf9VMOyGj/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymP
178
- AbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXUad
179
- DKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME
180
- HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
181
- -----END CERTIFICATE-----
182
-
183
- # Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R2
184
- # Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R2
185
- # Label: "GlobalSign Root CA - R2"
186
- # Serial: 4835703278459682885658125
187
- # MD5 Fingerprint: 94:14:77:7e:3e:5e:fd:8f:30:bd:41:b0:cf:e7:d0:30
188
- # SHA1 Fingerprint: 75:e0:ab:b6:13:85:12:27:1c:04:f8:5f:dd:de:38:e4:b7:24:2e:fe
189
- # SHA256 Fingerprint: ca:42:dd:41:74:5f:d0:b8:1e:b9:02:36:2c:f9:d8:bf:71:9d:a1:bd:1b:1e:fc:94:6f:5b:4c:99:f4:2c:1b:9e
190
- -----BEGIN CERTIFICATE-----
191
- MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G
192
- A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp
193
- Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1
194
- MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG
195
- A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
196
- hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL
197
- v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8
198
- eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq
199
- tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd
200
- C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa
201
- zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB
202
- mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH
203
- V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n
204
- bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG
205
- 3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs
206
- J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO
207
- 291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS
208
- ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd
209
- AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
210
- TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
211
- -----END CERTIFICATE-----
212
-
213
- # Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 1 Policy Validation Authority
214
- # Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 1 Policy Validation Authority
215
- # Label: "ValiCert Class 1 VA"
216
- # Serial: 1
217
- # MD5 Fingerprint: 65:58:ab:15:ad:57:6c:1e:a8:a7:b5:69:ac:bf:ff:eb
218
- # SHA1 Fingerprint: e5:df:74:3c:b6:01:c4:9b:98:43:dc:ab:8c:e8:6a:81:10:9f:e4:8e
219
- # SHA256 Fingerprint: f4:c1:49:55:1a:30:13:a3:5b:c7:bf:fe:17:a7:f3:44:9b:c1:ab:5b:5a:0a:e7:4b:06:c2:3b:90:00:4c:01:04
220
- -----BEGIN CERTIFICATE-----
221
- MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
222
- IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
223
- BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
224
- aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
225
- 9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIyMjM0OFoXDTE5MDYy
226
- NTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
227
- azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
228
- YXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
229
- Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
230
- cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9Y
231
- LqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIiGQj4/xEjm84H9b9pGib+
232
- TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCmDuJWBQ8Y
233
- TfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0
234
- LBwGlN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLW
235
- I8sogTLDAHkY7FkXicnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPw
236
- nXS3qT6gpf+2SQMT2iLM7XGCK5nPOrf1LXLI
237
- -----END CERTIFICATE-----
238
-
239
- # Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 2 Policy Validation Authority
240
- # Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 2 Policy Validation Authority
241
- # Label: "ValiCert Class 2 VA"
242
- # Serial: 1
243
- # MD5 Fingerprint: a9:23:75:9b:ba:49:36:6e:31:c2:db:f2:e7:66:ba:87
244
- # SHA1 Fingerprint: 31:7a:2a:d0:7f:2b:33:5e:f5:a1:c3:4e:4b:57:e8:b7:d8:f1:fc:a6
245
- # SHA256 Fingerprint: 58:d0:17:27:9c:d4:dc:63:ab:dd:b1:96:a6:c9:90:6c:30:c4:e0:87:83:ea:e8:c1:60:99:54:d6:93:55:59:6b
246
- -----BEGIN CERTIFICATE-----
247
- MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
248
- IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
249
- BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
250
- aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
251
- 9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMTk1NFoXDTE5MDYy
252
- NjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
253
- azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
254
- YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
255
- Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
256
- cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOnHK5avIWZJV16vY
257
- dA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl6zfN1SLUzm1NZ9
258
- WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7RfZHM047QS
259
- v4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9v
260
- UJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTu
261
- IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC
262
- W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd
263
- -----END CERTIFICATE-----
264
-
265
- # Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 3 Policy Validation Authority
266
- # Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 3 Policy Validation Authority
267
- # Label: "RSA Root Certificate 1"
268
- # Serial: 1
269
- # MD5 Fingerprint: a2:6f:53:b7:ee:40:db:4a:68:e7:fa:18:d9:10:4b:72
270
- # SHA1 Fingerprint: 69:bd:8c:f4:9c:d3:00:fb:59:2e:17:93:ca:55:6a:f3:ec:aa:35:fb
271
- # SHA256 Fingerprint: bc:23:f9:8a:31:3c:b9:2d:e3:bb:fc:3a:5a:9f:44:61:ac:39:49:4c:4a:e1:5a:9e:9d:f1:31:e9:9b:73:01:9a
272
- -----BEGIN CERTIFICATE-----
273
- MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
274
- IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
275
- BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
276
- aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
277
- 9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMjIzM1oXDTE5MDYy
278
- NjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
279
- azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
280
- YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
281
- Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
282
- cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjmFGWHOjVsQaBalfD
283
- cnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td3zZxFJmP3MKS8edgkpfs
284
- 2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89HBFx1cQqY
285
- JJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliE
286
- Zwgs3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJ
287
- n0WuPIqpsHEzXcjFV9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/A
288
- PhmcGcwTTYJBtYze4D1gCCAPRX5ron+jjBXu
289
- -----END CERTIFICATE-----
290
-
291
- # Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
292
- # Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
293
- # Label: "Verisign Class 3 Public Primary Certification Authority - G3"
294
- # Serial: 206684696279472310254277870180966723415
295
- # MD5 Fingerprint: cd:68:b6:a7:c7:c4:ce:75:e0:1d:4f:57:44:61:92:09
296
- # SHA1 Fingerprint: 13:2d:0d:45:53:4b:69:97:cd:b2:d5:c3:39:e2:55:76:60:9b:5c:c6
297
- # SHA256 Fingerprint: eb:04:cf:5e:b1:f3:9a:fa:76:2f:2b:b1:20:f2:96:cb:a5:20:c1:b9:7d:b1:58:95:65:b8:1c:b9:a1:7b:72:44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aaiMxTJ5Xpj055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWu
315
- imi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAERSWwauSCPc/L8my/uRan2Te
316
- 2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5fj267Cz3qWhMe
317
- DGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
318
- /Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565p
319
- F4ErWjfJXir0xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGt
320
- TxzhT5yvDwyd93gN2PQ1VoDat20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
321
- -----END CERTIFICATE-----
322
-
323
- # Issuer: CN=VeriSign Class 4 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
324
- # Subject: CN=VeriSign Class 4 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
325
- # Label: "Verisign Class 4 Public Primary Certification Authority - G3"
326
- # Serial: 314531972711909413743075096039378935511
327
- # MD5 Fingerprint: db:c8:f2:27:2e:b1:ea:6a:29:23:5d:fe:56:3e:33:df
328
- # SHA1 Fingerprint: c8:ec:8c:87:92:69:cb:4b:ab:39:e9:8d:7e:57:67:f3:14:95:73:9d
329
- # SHA256 Fingerprint: e3:89:36:0d:0f:db:ae:b3:d2:50:58:4b:47:30:31:4e:22:2f:39:c1:56:a0:20:14:4e:8d:96:05:61:79:15:06
330
- -----BEGIN CERTIFICATE-----
331
- MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
332
- CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVN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BXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXttmhwwjIDLk5Mq
349
- g6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm
350
- fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c
351
- 2NU8Qh0XwRJdRTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/
352
- bLvSHgCwIe34QWKCudiyxLtGUPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==
353
- -----END CERTIFICATE-----
354
-
355
- # Issuer: CN=Entrust.net Secure Server Certification Authority O=Entrust.net OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
356
- # Subject: CN=Entrust.net Secure Server Certification Authority O=Entrust.net OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
357
- # Label: "Entrust.net Secure Server CA"
358
- # Serial: 927650371
359
- # MD5 Fingerprint: df:f2:80:73:cc:f1:e6:61:73:fc:f5:42:e9:c5:7c:ee
360
- # SHA1 Fingerprint: 99:a6:9b:e6:1a:fe:88:6b:4d:2b:82:00:7c:b8:54:fc:31:7e:15:39
361
- # SHA256 Fingerprint: 62:f2:40:27:8c:56:4c:4d:d8:bf:7d:9d:4f:6f:36:6e:a8:94:d2:2f:5f:34:d9:89:a9:83:ac:ec:2f:ff:ed:50
362
- -----BEGIN CERTIFICATE-----
363
- MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC
364
- VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u
365
- ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc
366
- KGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1U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ZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0
383
- MFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi
384
- E1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa
385
- MAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI
386
- hvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN
387
- 95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9n9cd
388
- 2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI=
389
- -----END CERTIFICATE-----
390
-
391
- # Issuer: CN=Entrust.net Certification Authority (2048) O=Entrust.net OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
392
- # Subject: CN=Entrust.net Certification Authority (2048) O=Entrust.net OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
393
- # Label: "Entrust.net Premium 2048 Secure Server CA"
394
- # Serial: 946059622
395
- # MD5 Fingerprint: ba:21:ea:20:d6:dd:db:8f:c1:57:8b:40:ad:a1:fc:fc
396
- # SHA1 Fingerprint: 80:1d:62:d0:7b:44:9d:5c:5c:03:5c:98:ea:61:fa:44:3c:2a:58:fe
397
- # SHA256 Fingerprint: d1:c3:39:ea:27:84:eb:87:0f:93:4f:c5:63:4e:4a:a9:ad:55:05:01:64:01:f2:64:65:d3:7a:57:46:63:35:9f
398
- -----BEGIN CERTIFICATE-----
399
- MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML
400
- RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5l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AQQMA4bCFY1LjA6NC4wAwIEkDANBgkqhkiG9w0BAQUFAAOCAQEA
417
- WUesIYSKF8mciVMeuoCFGsY8Tj6xnLZ8xpJdGGQC49MGCBFhfGPjK50xA3B20qMo
418
- oPS7mmNz7W3lKtvtFKkrxjYR0CvrB4ul2p5cGZ1WEvVUKcgF7bISKo30Axv/55IQ
419
- h7A6tcOdBTcSo8f0FbnVpDkWm1M6I5HxqIKiaohowXkCIryqptau37AUX7iH0N18
420
- f3v/rxzP5tsHrV7bhZ3QKw0z2wTR5klAEyt2+z7pnIkPFc4YsIV4IU9rTw76NmfN
421
- B/L/CNDi3tm/Kq+4h4YhPATKt5Rof8886ZjXOP/swNlQ8C5LWK5Gb9Auw2DaclVy
422
- vUxFnmG6v4SBkgPR0ml8xQ==
423
- -----END CERTIFICATE-----
424
-
425
- # Issuer: CN=Baltimore CyberTrust Root O=Baltimore OU=CyberTrust
426
- # Subject: CN=Baltimore CyberTrust Root O=Baltimore OU=CyberTrust
427
- # Label: "Baltimore CyberTrust Root"
428
- # Serial: 33554617
429
- # MD5 Fingerprint: ac:b6:94:a5:9c:17:e0:d7:91:52:9b:b1:97:06:a6:e4
430
- # SHA1 Fingerprint: d4:de:20:d0:5e:66:fc:53:fe:1a:50:88:2c:78:db:28:52:ca:e4:74
431
- # SHA256 Fingerprint: 16:af:57:a9:f6:76:b0:ab:12:60:95:aa:5e:ba:de:f2:2a:b3:11:19:d6:44:ac:95:cd:4b:93:db:f3:f2:6a:eb
432
- -----BEGIN CERTIFICATE-----
433
- MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ
434
- RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD
435
- VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX
436
- DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y
437
- ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy
438
- VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr
439
- mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr
440
- IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK
441
- mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu
442
- XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy
443
- dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye
444
- jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1
445
- BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3
446
- DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92
447
- 9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx
448
- jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0
449
- Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz
450
- ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS
451
- R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
452
- -----END CERTIFICATE-----
453
-
454
- # Issuer: CN=Equifax Secure Global eBusiness CA-1 O=Equifax Secure Inc.
455
- # Subject: CN=Equifax Secure Global eBusiness CA-1 O=Equifax Secure Inc.
456
- # Label: "Equifax Secure Global eBusiness CA"
457
- # Serial: 1
458
- # MD5 Fingerprint: 8f:5d:77:06:27:c4:98:3c:5b:93:78:e7:d7:7d:9b:cc
459
- # SHA1 Fingerprint: 7e:78:4a:10:1c:82:65:cc:2d:e1:f1:6d:47:b4:40:ca:d9:0a:19:45
460
- # SHA256 Fingerprint: 5f:0b:62:ea:b5:e3:53:ea:65:21:65:16:58:fb:b6:53:59:f4:43:28:0a:4a:fb:d1:04:d7:7d:10:f9:f0:4c:07
461
- -----BEGIN CERTIFICATE-----
462
- MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEc
463
- MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBT
464
- ZWN1cmUgR2xvYmFsIGVCdXNpbmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIw
465
- MDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0VxdWlmYXggU2Vj
466
- dXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEdsb2JhbCBlQnVzaW5l
467
- c3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRVPEnC
468
- UdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc
469
- 58O/gGzNqfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/
470
- o5brhTMhHD4ePmBudpxnhcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAH
471
- MA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUvqigdHJQa0S3ySPY+6j/s1dr
472
- aGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hsMA0GCSqGSIb3DQEBBAUA
473
- A4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okENI7SS+RkA
474
- Z70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv
475
- 8qIYNMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV
476
- -----END CERTIFICATE-----
477
-
478
- # Issuer: CN=Equifax Secure eBusiness CA-1 O=Equifax Secure Inc.
479
- # Subject: CN=Equifax Secure eBusiness CA-1 O=Equifax Secure Inc.
480
- # Label: "Equifax Secure eBusiness CA 1"
481
- # Serial: 4
482
- # MD5 Fingerprint: 64:9c:ef:2e:44:fc:c6:8f:52:07:d0:51:73:8f:cb:3d
483
- # SHA1 Fingerprint: da:40:18:8b:91:89:a3:ed:ee:ae:da:97:fe:2f:9d:f5:b7:d1:8a:41
484
- # SHA256 Fingerprint: cf:56:ff:46:a4:a1:86:10:9d:d9:65:84:b5:ee:b5:8a:51:0c:42:75:b0:e5:f9:4f:40:bb:ae:86:5e:19:f6:73
485
- -----BEGIN CERTIFICATE-----
486
- MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEc
487
- MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBT
488
- ZWN1cmUgZUJ1c2luZXNzIENBLTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQw
489
- MDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5j
490
- LjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENBLTEwgZ8wDQYJ
491
- KoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ1MRo
492
- RvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBu
493
- WqDZQu4aIZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKw
494
- Env+j6YDAgMBAAGjZjBkMBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTAD
495
- AQH/MB8GA1UdIwQYMBaAFEp4MlIR21kWNl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRK
496
- eDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQFAAOBgQB1W6ibAxHm6VZM
497
- zfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5lSE/9dR+
498
- WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN
499
- /Bf+KpYrtWKmpj29f5JZzVoqgrI3eQ==
500
- -----END CERTIFICATE-----
501
-
502
- # Issuer: O=Equifax Secure OU=Equifax Secure eBusiness CA-2
503
- # Subject: O=Equifax Secure OU=Equifax Secure eBusiness CA-2
504
- # Label: "Equifax Secure eBusiness CA 2"
505
- # Serial: 930140085
506
- # MD5 Fingerprint: aa:bf:bf:64:97:da:98:1d:6f:c6:08:3a:95:70:33:ca
507
- # SHA1 Fingerprint: 39:4f:f6:85:0b:06:be:52:e5:18:56:cc:10:e1:80:e8:82:b3:85:cc
508
- # SHA256 Fingerprint: 2f:27:4e:48:ab:a4:ac:7b:76:59:33:10:17:75:50:6d:c3:0e:e3:8e:f6:ac:d5:c0:49:32:cf:e0:41:23:42:20
509
- -----BEGIN CERTIFICATE-----
510
- MIIDIDCCAomgAwIBAgIEN3DPtTANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
511
- UzEXMBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2Vj
512
- dXJlIGVCdXNpbmVzcyBDQS0yMB4XDTk5MDYyMzEyMTQ0NVoXDTE5MDYyMzEyMTQ0
513
- NVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkVxdWlmYXggU2VjdXJlMSYwJAYD
514
- VQQLEx1FcXVpZmF4IFNlY3VyZSBlQnVzaW5lc3MgQ0EtMjCBnzANBgkqhkiG9w0B
515
- AQEFAAOBjQAwgYkCgYEA5Dk5kx5SBhsoNviyoynF7Y6yEb3+6+e0dMKP/wXn2Z0G
516
- vxLIPw7y1tEkshHe0XMJitSxLJgJDR5QRrKDpkWNYmi7hRsgcDKqQM2mll/EcTc/
517
- BPO3QSQ5BxoeLmFYoBIL5aXfxavqN3HMHMg3OrmXUqesxWoklE6ce8/AatbfIb0C
518
- AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEX
519
- MBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2VjdXJl
520
- IGVCdXNpbmVzcyBDQS0yMQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTkw
521
- NjIzMTIxNDQ1WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUUJ4L6q9euSBIplBq
522
- y/3YIHqngnYwHQYDVR0OBBYEFFCeC+qvXrkgSKZQasv92CB6p4J2MAwGA1UdEwQF
523
- MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
524
- A4GBAAyGgq3oThr1jokn4jVYPSm0B482UJW/bsGe68SQsoWou7dC4A8HOd/7npCy
525
- 0cE+U58DRLB+S/Rv5Hwf5+Kx5Lia78O9zt4LMjTZ3ijtM2vE1Nc9ElirfQkty3D1
526
- E4qUoSek1nDFbZS1yX2doNLGCEnZZpum0/QL3MUmV+GRMOrN
527
- -----END CERTIFICATE-----
528
-
529
- # Issuer: CN=AddTrust Class 1 CA Root O=AddTrust AB OU=AddTrust TTP Network
530
- # Subject: CN=AddTrust Class 1 CA Root O=AddTrust AB OU=AddTrust TTP Network
531
- # Label: "AddTrust Low-Value Services Root"
532
- # Serial: 1
533
- # MD5 Fingerprint: 1e:42:95:02:33:92:6b:b9:5f:c0:7f:da:d6:b2:4b:fc
534
- # SHA1 Fingerprint: cc:ab:0e:a0:4c:23:01:d6:69:7b:dd:37:9f:cd:12:eb:24:e3:94:9d
535
- # SHA256 Fingerprint: 8c:72:09:27:9a:c0:4e:27:5e:16:d0:7f:d3:b7:75:e8:01:54:b5:96:80:46:e3:1f:52:dd:25:76:63:24:e9:a7
536
- -----BEGIN CERTIFICATE-----
537
- MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEU
538
- MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
539
- b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwHhcNMDAwNTMw
540
- MTAzODMxWhcNMjAwNTMwMTAzODMxWjBlMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
541
- QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYD
542
- VQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUA
543
- A4IBDwAwggEKAoIBAQCWltQhSWDia+hBBwzexODcEyPNwTXH+9ZOEQpnXvUGW2ul
544
- CDtbKRY654eyNAbFvAWlA3yCyykQruGIgb3WntP+LVbBFc7jJp0VLhD7Bo8wBN6n
545
- tGO0/7Gcrjyvd7ZWxbWroulpOj0OM3kyP3CCkplhbY0wCI9xP6ZIVxn4JdxLZlyl
546
- dI+Yrsj5wAYi56xz36Uu+1LcsRVlIPo1Zmne3yzxbrww2ywkEtvrNTVokMsAsJch
547
- PXQhI2U0K7t4WaPW4XY5mqRJjox0r26kmqPZm9I4XJuiGMx1I4S+6+JNM3GOGvDC
548
- +Mcdoq0Dlyz4zyXG9rgkMbFjXZJ/Y/AlyVMuH79NAgMBAAGjgdIwgc8wHQYDVR0O
549
- BBYEFJWxtPCUtr3H2tERCSG+wa9J/RB7MAsGA1UdDwQEAwIBBjAPBgNVHRMBAf8E
550
- BTADAQH/MIGPBgNVHSMEgYcwgYSAFJWxtPCUtr3H2tERCSG+wa9J/RB7oWmkZzBl
551
- MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFk
552
- ZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENB
553
- IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBACxtZBsfzQ3duQH6lmM0MkhHma6X
554
- 7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0PhiVYrqW9yTkkz
555
- 43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY
556
- eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJl
557
- pz/+0WatC7xrmYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOA
558
- WiFeIc9TVPC6b4nbqKqVz4vjccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk=
559
- -----END CERTIFICATE-----
560
-
561
- # Issuer: CN=AddTrust External CA Root O=AddTrust AB OU=AddTrust External TTP Network
562
- # Subject: CN=AddTrust External CA Root O=AddTrust AB OU=AddTrust External TTP Network
563
- # Label: "AddTrust External Root"
564
- # Serial: 1
565
- # MD5 Fingerprint: 1d:35:54:04:85:78:b0:3f:42:42:4d:bf:20:73:0a:3f
566
- # SHA1 Fingerprint: 02:fa:f3:e2:91:43:54:68:60:78:57:69:4d:f5:e4:5b:68:85:18:68
567
- # SHA256 Fingerprint: 68:7f:a4:51:38:22:78:ff:f0:c8:b1:1f:8d:43:d5:76:67:1c:6e:b2:bc:ea:b4:13:fb:83:d9:65:d0:6d:2f:f2
568
- -----BEGIN CERTIFICATE-----
569
- MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU
570
- MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs
571
- IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
572
- MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux
573
- FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h
574
- bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v
575
- dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt
576
- H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9
577
- uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX
578
- mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX
579
- a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN
580
- E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0
581
- WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD
582
- VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0
583
- Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU
584
- cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx
585
- IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN
586
- AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH
587
- YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
588
- 6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
589
- Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
590
- c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
591
- mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
592
- -----END CERTIFICATE-----
593
-
594
- # Issuer: CN=AddTrust Public CA Root O=AddTrust AB OU=AddTrust TTP Network
595
- # Subject: CN=AddTrust Public CA Root O=AddTrust AB OU=AddTrust TTP Network
596
- # Label: "AddTrust Public Services Root"
597
- # Serial: 1
598
- # MD5 Fingerprint: c1:62:3e:23:c5:82:73:9c:03:59:4b:2b:e9:77:49:7f
599
- # SHA1 Fingerprint: 2a:b6:28:48:5e:78:fb:f3:ad:9e:79:10:dd:6b:df:99:72:2c:96:e5
600
- # SHA256 Fingerprint: 07:91:ca:07:49:b2:07:82:aa:d3:c7:d7:bd:0c:df:c9:48:58:35:84:3e:b2:d7:99:60:09:ce:43:ab:6c:69:27
601
- -----BEGIN CERTIFICATE-----
602
- MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEU
603
- MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTF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r0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL+YPoRNWyQSW/
620
- iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao
621
- GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh
622
- 4SINhwBk/ox9Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQm
623
- XiLsks3/QppEIW1cxeMiHV9HEufOX1362KqxMy3ZdvJOOjMMK7MtkAY=
624
- -----END CERTIFICATE-----
625
-
626
- # Issuer: CN=AddTrust Qualified CA Root O=AddTrust AB OU=AddTrust TTP Network
627
- # Subject: CN=AddTrust Qualified CA Root O=AddTrust AB OU=AddTrust TTP Network
628
- # Label: "AddTrust Qualified Certificates Root"
629
- # Serial: 1
630
- # MD5 Fingerprint: 27:ec:39:47:cd:da:5a:af:e2:9a:01:65:21:a9:4c:bb
631
- # SHA1 Fingerprint: 4d:23:78:ec:91:95:39:b5:00:7f:75:8f:03:3b:21:1e:c5:4d:8b:cf
632
- # SHA256 Fingerprint: 80:95:21:08:05:db:4b:bc:35:5e:44:28:d8:fd:6e:c2:cd:e3:ab:5f:b9:7a:99:42:98:8e:b8:f4:dc:d0:60:16
633
- -----BEGIN CERTIFICATE-----
634
- MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEU
635
- MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
636
- b3JrMSMwIQYDVQQDExpBZGRUcnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1
637
- MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcxCzAJBgNVBAYTAlNFMRQwEgYDVQQK
638
- EwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQI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wMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9Y
655
- iQBCYz95OdBEsIJuQRno3eDBiFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5no
656
- xqE=
657
- -----END CERTIFICATE-----
658
-
659
- # Issuer: CN=Entrust Root Certification Authority O=Entrust, Inc. OU=www.entrust.net/CPS is incorporated by reference/(c) 2006 Entrust, Inc.
660
- # Subject: CN=Entrust Root Certification Authority O=Entrust, Inc. OU=www.entrust.net/CPS is incorporated by reference/(c) 2006 Entrust, Inc.
661
- # Label: "Entrust Root Certification Authority"
662
- # Serial: 1164660820
663
- # MD5 Fingerprint: d6:a5:c3:ed:5d:dd:3e:00:c1:3d:87:92:1f:1d:3f:e4
664
- # SHA1 Fingerprint: b3:1e:b1:b7:40:e3:6c:84:02:da:dc:37:d4:4d:f5:d4:67:49:52:f9
665
- # SHA256 Fingerprint: 73:c1:76:43:4f:1b:c6:d5:ad:f4:5b:0e:76:e7:27:28:7c:8d:e5:76:16:c1:e6:e6:14:1a:2b:2c:bc:7d:8e:4c
666
- -----BEGIN CERTIFICATE-----
667
- MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMC
668
- VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0
669
- Lm5ldC9DUFMgaXMgaW5jb3Jwb3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMW
670
- KGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsGA1UEAxMkRW50cnVzdCBSb290IENl
671
- cnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0MloXDTI2MTEyNzIw
672
- NTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMTkw
673
- NwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29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cCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTSW3iDVuycNsMm4hH2Z0kdkquM++v/
690
- eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0tHuu2guQOHXvgR1m
691
- 0vdXcDazv/wor3ElhVsT/h5/WrQ8
692
- -----END CERTIFICATE-----
693
-
694
- # Issuer: CN=GeoTrust Global CA O=GeoTrust Inc.
695
- # Subject: CN=GeoTrust Global CA O=GeoTrust Inc.
696
- # Label: "GeoTrust Global CA"
697
- # Serial: 144470
698
- # MD5 Fingerprint: f7:75:ab:29:fb:51:4e:b7:77:5e:ff:05:3c:99:8e:f5
699
- # SHA1 Fingerprint: de:28:f4:a4:ff:e5:b9:2f:a3:c5:03:d1:a3:49:a7:f9:96:2a:82:12
700
- # SHA256 Fingerprint: ff:85:6a:2d:25:1d:cd:88:d3:66:56:f4:50:12:67:98:cf:ab:aa:de:40:79:9c:72:2d:e4:d2:b5:db:36:a7:3a
701
- -----BEGIN CERTIFICATE-----
702
- MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
703
- MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
704
- YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
705
- EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
706
- R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
707
- 9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
708
- fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
709
- iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
710
- 1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
711
- bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
712
- MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
713
- ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
714
- uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
715
- Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
716
- tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
717
- PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
718
- hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
719
- 5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
720
- -----END CERTIFICATE-----
721
-
722
- # Issuer: CN=GeoTrust Global CA 2 O=GeoTrust Inc.
723
- # Subject: CN=GeoTrust Global CA 2 O=GeoTrust Inc.
724
- # Label: "GeoTrust Global CA 2"
725
- # Serial: 1
726
- # MD5 Fingerprint: 0e:40:a7:6c:de:03:5d:8f:d1:0f:e4:d1:8d:f9:6c:a9
727
- # SHA1 Fingerprint: a9:e9:78:08:14:37:58:88:f2:05:19:b0:6d:2b:0d:2b:60:16:90:7d
728
- # SHA256 Fingerprint: ca:2d:82:a0:86:77:07:2f:8a:b6:76:4f:f0:35:67:6c:fe:3e:5e:32:5e:01:21:72:df:3f:92:09:6d:b7:9b:85
729
- -----BEG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UprbqLOzRldRtxIR0sFAqwlpW41uryZfspuk/qkZN0
746
- abby/+Ea0AzRdoXLiiW9l14sbxWZJue2Kf8i7MkCx1YAzUm5s2x7UwQa4qjJqhIF
747
- I8LO57sEAszAR6LkxCkvW0VXiVHuPOtSCP8HNR6fNWpHSlaY0VqFH4z1Ir+rzoPz
748
- 4iIprn2DQKi6bA==
749
- -----END CERTIFICATE-----
750
-
751
- # Issuer: CN=GeoTrust Universal CA O=GeoTrust Inc.
752
- # Subject: CN=GeoTrust Universal CA O=GeoTrust Inc.
753
- # Label: "GeoTrust Universal CA"
754
- # Serial: 1
755
- # MD5 Fingerprint: 92:65:58:8b:a2:1a:31:72:73:68:5c:b4:a5:7a:07:48
756
- # SHA1 Fingerprint: e6:21:f3:35:43:79:05:9a:4b:68:30:9d:8a:2f:74:22:15:87:ec:79
757
- # SHA256 Fingerprint: a0:45:9b:9f:63:b2:25:59:f5:fa:5d:4c:6d:b3:f9:f7:2f:f1:93:42:03:35:78:f0:73:bf:1d:1b:46:cb:b9:12
758
- -----BEGIN CERTIFICATE-----
759
- MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEW
760
- MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVy
761
- c2FsIENBMB4XDTA0MDMwNDA1MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UE
762
- BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xHjAcBgNVBAMTFUdlb1RydXN0
763
- IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKYV
764
- VaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9tJPi8
765
- cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTT
766
- QjOgNB0e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xQ4K5RirqN
782
- Pnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxFKyDuSN/n3QmOGKja
783
- QI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2DFKW
784
- koRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9
785
- ER/frslKxfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQt
786
- DF4JbAiXfKM9fJP/P6EUp8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/Sfuvm
787
- bJxPgWp6ZKy7PtXny3YuxadIwVyQD8vIP/rmMuGNG2+k5o7Y+SlIis5z/iw=
788
- -----END CERTIFICATE-----
789
-
790
- # Issuer: CN=GeoTrust Universal CA 2 O=GeoTrust Inc.
791
- # Subject: CN=GeoTrust Universal CA 2 O=GeoTrust Inc.
792
- # Label: "GeoTrust Universal CA 2"
793
- # Serial: 1
794
- # MD5 Fingerprint: 34:fc:b8:d0:36:db:9e:14:b3:c2:f2:db:8f:e4:94:c7
795
- # SHA1 Fingerprint: 37:9a:19:7b:41:85:45:35:0c:a6:03:69:f3:3c:2e:af:47:4f:20:79
796
- # SHA256 Fingerprint: a0:23:4f:3b:c8:52:7c:a5:62:8e:ec:81:ad:5d:69:89:5d:a5:68:0d:c9:1d:1c:b8:47:7f:33:f8:78:b9:5b:0b
797
- -----BEGIN CERTIFICATE-----
798
- MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEW
799
- MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVy
800
- c2FsIENBIDIwHhcNMDQwMzA0MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYD
801
- VQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAx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lVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQ
818
- L1EuxBRa3ugZ4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgr
819
- Fg5fNuH8KrUwJM/gYwx7WBr+mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSo
820
- ag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpqA1Ihn0CoZ1Dy81of398j9tx4TuaY
821
- T1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpgY+RdM4kX2TGq2tbz
822
- GDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiPpm8m
823
- 1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJV
824
- OCiNUW7dFGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH
825
- 6aLcr34YEoP9VhdBLtUpgn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwX
826
- QMAJKOSLakhT2+zNVVXxxvjpoixMptEmX36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
827
- -----END CERTIFICATE-----
828
-
829
- # Issuer: CN=America Online Root Certification Authority 1 O=America Online Inc.
830
- # Subject: CN=America Online Root Certification Authority 1 O=America Online Inc.
831
- # Label: "America Online Root Certification Authority 1"
832
- # Serial: 1
833
- # MD5 Fingerprint: 14:f1:08:ad:9d:fa:64:e2:89:e7:1c:cf:a8:ad:7d:5e
834
- # SHA1 Fingerprint: 39:21:c1:15:c1:5d:0e:ca:5c:cb:5b:c4:f0:7d:21:d8:05:0b:56:6a
835
- # SHA256 Fingerprint: 77:40:73:12:c6:3a:15:3d:5b:c0:0b:4e:51:75:9c:df:da:c2:37:dc:2a:33:b6:79:46:e9:8e:9b:fa:68:0a:e3
836
- -----BEGIN CERTIFICATE-----
837
- MIIDpDCCAoygA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b
853
- LjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft3OJvx8Fi8eNy1gTIdGcL+oir
854
- oQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43gKd8hdIaC2y+C
855
- MMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds
856
- sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7
857
- -----END CERTIFICATE-----
858
-
859
- # Issuer: CN=America Online Root Certification Authority 2 O=America Online Inc.
860
- # Subject: CN=America Online Root Certification Authority 2 O=America Online Inc.
861
- # Label: "America Online Root Certification Authority 2"
862
- # Serial: 1
863
- # MD5 Fingerprint: d6:ed:3c:ca:e2:66:0f:af:10:43:0d:77:9b:04:09:bf
864
- # SHA1 Fingerprint: 85:b5:ff:67:9b:0c:79:96:1f:c8:6e:44:22:00:46:13:db:17:92:84
865
- # SHA256 Fingerprint: 7d:3b:46:5a:60:14:e5:26:c0:af:fc:ee:21:27:d2:31:17:27:ad:81:1c:26:84:2d:00:6a:f3:73:06:cc:80:bd
866
- -----BEGIN CERTIFICATE-----
867
- MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEc
868
- MBoGA1UEChMTQW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBP
869
- bmxpbmUgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2
870
- MDAwMFoXDTM3MDkyOTE0MDgwMFowYzELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0Ft
871
- ZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2EgT25saW5lIFJvb3Qg
872
- Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIP
873
- ADCCAgoCggIBAMxBRR3pPU0Q9oyxQcngXssN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KVqdPzW+5X1R+FXgJXUjhx5c3LqdsKyzadsXg8n33gy8
890
- CNyRnqjQ1xU3c6U1uPx+xURABsPr+CKAXEfOAuMRn0T//ZoyzH1kUQ7rVyZ2OuMe
891
- IjzCpjbdGe+n/BLzJsBZMYVMnNjP36TMzCmT/5RtdlwTCJfy7aULTd3oyWgOZtMA
892
- DjMSW7yV5TKQqLPGbIOtd+6Lfn6xqavT4fG2wLHqiMDn05DpKJKUe2h7lyoKZy2F
893
- AjgQ5ANh1NolNscIWC2hp1GvMApJ9aZphwctREZ2jirlmjvXGKL8nDgQzMY70rUX
894
- Om/9riW99XJZZLF0KjhfGEzfz3EEWjbUvy+ZnOjZurGV5gJLIaFb1cFPj65pbVPb
895
- AZO1XB4Y3WRayhgoPmMEEf0cjQAPuDffZ4qdZqkCapH/E8ovXYO8h5Ns3CRRFgQl
896
- Zvqz2cK6Kb6aSDiCmfS/O0oxGfm/jiEzFMpPVF/7zvuPcX/9XhmgD0uRuMRUvAaw
897
- RY8mkaKO/qk=
898
- -----END CERTIFICATE-----
899
-
900
- # Issuer: CN=AAA Certificate Services O=Comodo CA Limited
901
- # Subject: CN=AAA Certificate Services O=Comodo CA Limited
902
- # Label: "Comodo AAA Services root"
903
- # Serial: 1
904
- # MD5 Fingerprint: 49:79:04:b0:eb:87:19:ac:47:b0:bc:11:51:9b:74:d0
905
- # SHA1 Fingerprint: d1:eb:23:a4:6d:17:d6:8f:d9:25:64:c2:f1:f1:60:17:64:d8:e3:49
906
- # SHA256 Fingerprint: d7:a7:a0:fb:5d:7e:27:31:d7:71:e9:48:4e:bc:de:f7:1d:5f:0c:3e:0a:29:48:78:2b:c8:3e:e0:ea:69:9e:f4
907
- -----BEGIN CERTIFICATE-----
908
- MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb
909
- MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
910
- G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ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q
926
- GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
927
- Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2
928
- G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi
929
- l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3
930
- smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
931
- -----END CERTIFICATE-----
932
-
933
- # Issuer: CN=Secure Certificate Services O=Comodo CA Limited
934
- # Subject: CN=Secure Certificate Services O=Comodo CA Limited
935
- # Label: "Comodo Secure Services root"
936
- # Serial: 1
937
- # MD5 Fingerprint: d3:d9:bd:ae:9f:ac:67:24:b3:c8:1b:52:e1:b9:a9:bd
938
- # SHA1 Fingerprint: 4a:65:d5:f4:1d:ef:39:b8:b8:90:4a:4a:d3:64:81:33:cf:c7:a1:d1
939
- # SHA256 Fingerprint: bd:81:ce:3b:4f:65:91:d1:1a:67:b5:fc:7a:47:fd:ef:25:52:1b:f9:aa:4e:18:b9:e3:df:2e:34:a7:80:3b:e8
940
- -----BEGIN CERTIFICATE-----
941
- MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEb
942
- MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
943
- GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRp
944
- ZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVow
945
- fjELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4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Wi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJ
962
- aD61JlfutuC23bkpgHl9j6PwpCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDl
963
- izeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1HRR3B7Hzs/Sk=
964
- -----END CERTIFICATE-----
965
-
966
- # Issuer: CN=Trusted Certificate Services O=Comodo CA Limited
967
- # Subject: CN=Trusted Certificate Services O=Comodo CA Limited
968
- # Label: "Comodo Trusted Services root"
969
- # Serial: 1
970
- # MD5 Fingerprint: 91:1b:3f:6e:cd:9e:ab:ee:07:fe:1f:71:d2:b3:61:27
971
- # SHA1 Fingerprint: e1:9f:e3:0e:8b:84:60:9e:80:9b:17:0d:72:a8:c5:ba:6e:14:09:bd
972
- # SHA256 Fingerprint: 3f:06:e5:56:81:d4:96:f5:be:16:9e:b5:38:9f:9f:2b:8f:f6:1e:17:08:df:68:81:72:48:49:cd:5d:27:cb:69
973
- -----BEGIN CERTIFICATE-----
974
- MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEb
975
- MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
976
- GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0
977
- aWZpY2F0ZSBTZXJ2aWNlczAeFw0wNDAxMDEwMDAwMDBaFw0yODEyMzEyMzU5NTla
978
- MH8xCzAJBgNVBAYTAkdCMRswGQYDVQQIDBJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
979
- BgNVBAcMB1NhbGZvcmQxGjAYBgNVBAoMEUNvbW9kbyBDQSBMaW1pdGVkMSUwIwYD
980
- VQQDDBxUcnVzdGVkIENlcnRpZmljYXRlIFNlcnZpY2VzMIIBIjANBgkqhkiG9w0B
981
- AQEFAAOCAQ8AMIIBCgKCAQEA33FvNlhTWvI2VFeAxHQIIO0Yfyod5jWaHiWsnOWW
982
- fnJSoBVC21ndZHoa0Lh73TkVvFVIxO06AOoxEbrycXQaZ7jPM8yoMa+j49d/vzMt
983
- TGo87IvDktJTdyR0nAducPy9C1t2ul/y/9c3S0pgePfw+spwtOpZqqPOSC+pw7IL
984
- fhdyFgymBwwbOM/JYrc/oJOlh0Hyt3BAd9i+FHzjqMB6juljatEPmsbS9Is6FARW
985
- 1O24zG71++IsWL1/T2sr92AkWCTOJu80kTrV44HQsvAEAtdbtz6SrGsSivnkBbA7
986
- kUlcsutT6vifR4buv5XAwAaf0lteERv0xwQ1KdJVXOTt6wIDAQABo4HJMIHGMB0G
987
- A1UdDgQWBBTFe1i97doladL3WRaoszLAeydb9DAOBgNVHQ8BAf8EBAMCAQYwDwYD
988
- VR0TAQH/BAUwAwEB/zCBgwYDVR0fBHwwejA8oDqgOIY2aHR0cDovL2NybC5jb21v
989
- ZG9jYS5jb20vVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMuY3JsMDqgOKA2hjRo
990
- dHRwOi8vY3JsLmNvbW9kby5uZXQvVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMu
991
- Y3JsMA0GCSqGSIb3DQEBBQUAA4IBAQDIk4E7ibSvuIQSTI3S8NtwuleGFTQQuS9/
992
- HrCoiWChisJ3DFBKmwCL2Iv0QeLQg4pKHBQGsKNoBXAxMKdTmw7pSqBYaWcOrp32
993
- pSxBvzwGa+RZzG0Q8ZZvH9/0BAKkn0U+yNj6NkZEUD+Cl5EfKNsYEYwq5GWDVxIS
994
- jBc/lDb+XbDABHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+
995
- xqFx7D+gIIxmOom0jtTYsU0lR+4viMi14QVFwL4Ucd56/Y57fU0IlqUSc/Atyjcn
996
- dBInTMu2l+nZrghtWjlA3QVHdWpaIbOjGM9O9y5Xt5hwXsjEeLBi
997
- -----END CERTIFICATE-----
998
-
999
- # Issuer: CN=UTN - DATACorp SGC O=The USERTRUST Network OU=http://www.usertrust.com
1000
- # Subject: CN=UTN - DATACorp SGC O=The USERTRUST Network OU=http://www.usertrust.com
1001
- # Label: "UTN DATACorp SGC Root CA"
1002
- # Serial: 91374294542884689855167577680241077609
1003
- # MD5 Fingerprint: b3:a5:3e:77:21:6d:ac:4a:c0:c9:fb:d5:41:3d:ca:06
1004
- # SHA1 Fingerprint: 58:11:9f:0e:12:82:87:ea:50:fd:d9:87:45:6f:4f:78:dc:fa:d6:d4
1005
- # SHA256 Fingerprint: 85:fb:2f:91:dd:12:27:5a:01:45:b6:36:53:4f:84:02:4a:d6:8b:69:b8:ee:88:68:4f:f7:11:37:58:05:b3:48
1006
- -----BEGIN CERTIFICATE-----
1007
- MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCB
1008
- kzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
1009
- Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
1010
- dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZBgNVBAMTElVUTiAtIERBVEFDb3Jw
1011
- IFNHQzAeFw05OTA2MjQxODU3MjFaFw0xOTA2MjQxOTA2MzBaMIGTMQswCQYDVQQG
1012
- EwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYD
1013
- VQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cu
1014
- dXNlcnRydXN0LmNvbTEbMBkGA1UEAxMSVVROIC0gREFUQUNvcnAgU0dDMIIBIjAN
1015
- BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3+5YEKIrblXEjr8uRgnn4AgPLit6
1016
- E5Qbvfa2gI5lBZMAHryv4g+OGQ0SR+ysraP6LnD43m77VkIVni5c7yPeIbkFdicZ
1017
- D0/Ww5y0vpQZY/KmEQrrU0icvvIpOxboGqBMpsn0GFlowHDyUwDAXlCCpVZvNvlK
1018
- 4ESGoE1O1kduSUrLZ9emxAW5jh70/P/N5zbgnAVssjMiFdC04MwXwLLA9P4yPykq
1019
- lXvY8qdOD1R8oQ2AswkDwf9c3V6aPryuvEeKaq5xyh+xKrhfQgUL7EYw0XILyulW
1020
- bfXv33i+Ybqypa4ETLyorGkVl73v67SMvzX41MPRKA5cOp9wGDMgd8SirwIDAQAB
1021
- o4GrMIGoMAsGA1UdDwQEAwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRT
1022
- MtGzz3/64PGgXYVOktKeRR20TzA9BgNVHR8ENjA0MDKgMKAuhixodHRwOi8vY3Js
1023
- LnVzZXJ0cnVzdC5jb20vVVROLURBVEFDb3JwU0dDLmNybDAqBgNVHSUEIzAhBggr
1024
- BgEFBQcDAQYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0GCSqGSIb3DQEBBQUAA4IB
1025
- AQAnNZcAiosovcYzMB4p/OL31ZjUQLtgyr+rFywJNn9Q+kHcrpY6CiM+iVnJowft
1026
- Gzet/Hy+UUla3joKVAgWRcKZsYfNjGjgaQPpxE6YsjuMFrMOoAyYUJuTqXAJyCyj
1027
- j98C5OBxOvG0I3KgqgHf35g+FFCgMSa9KOlaMCZ1+XtgHI3zzVAmbQQnmt/VDUVH
1028
- KWss5nbZqSl9Mt3JNjy9rjXxEZ4du5A/EkdOjtd+D2JzHVImOBwYSf0wdJrE5SIv
1029
- 2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwPDPafepE39peC4N1xaf92P2BNPM/3
1030
- mfnGV/TJVTl4uix5yaaIK/QI
1031
- -----END CERTIFICATE-----
1032
-
1033
- # Issuer: CN=UTN-USERFirst-Hardware O=The USERTRUST Network OU=http://www.usertrust.com
1034
- # Subject: CN=UTN-USERFirst-Hardware O=The USERTRUST Network OU=http://www.usertrust.com
1035
- # Label: "UTN USERFirst Hardware Root CA"
1036
- # Serial: 91374294542884704022267039221184531197
1037
- # MD5 Fingerprint: 4c:56:41:e5:0d:bb:2b:e8:ca:a3:ed:18:08:ad:43:39
1038
- # SHA1 Fingerprint: 04:83:ed:33:99:ac:36:08:05:87:22:ed:bc:5e:46:00:e3:be:f9:d7
1039
- # SHA256 Fingerprint: 6e:a5:47:41:d0:04:66:7e:ed:1b:48:16:63:4a:a3:a7:9e:6e:4b:96:95:0f:82:79:da:fc:8d:9b:d8:81:21:37
1040
- -----BEGIN CERTIFICATE-----
1041
- MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCB
1042
- lzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
1043
- Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
1044
- dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3Qt
1045
- SGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgxOTIyWjCBlzELMAkG
1046
- A1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEe
1047
- MBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8v
1048
- d3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdh
1049
- cmUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx98M4P7Sof885glFn
1050
- 0G2f0v9Y8+efK+wNiVSZuTiZFvfgIXlIwrthdBKWHTxqctU8EGc6Oe0rE81m65UJ
1051
- M6Rsl7HoxuzBdXmcRl6Nq9Bq/bkqVRcQVLMZ8Jr28bFdtqdt++BxF2uiiPsA3/4a
1052
- MXcMmgF6sTLjKwEHOG7DpV4jvEWbe1DByTCP2+UretNb+zNAHqDVmBe8i4fDidNd
1053
- oI6yqqr2jmmIBsX6iSHzCJ1pLgkzmykNRg+MzEk0sGlRvfkGzWitZky8PqxhvQqI
1054
- DsjfPe58BEydCl5rkdbux+0ojatNh4lz0G6k0B4WixThdkQDf2Os5M1JnMWS9Ksy
1055
- oUhbAgMBAAGjgbkwgbYwCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYD
1056
- VR0OBBYEFKFyXyYbKJhDlV0HN9WFlp1L0sNFMEQGA1UdHwQ9MDswOaA3oDWGM2h0
1057
- dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNFUkZpcnN0LUhhcmR3YXJlLmNy
1058
- bDAxBgNVHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUFBwMGBggrBgEF
1059
- BQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM
1060
- //bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28Gpgoiskli
1061
- CE7/yMgUsogWXecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gE
1062
- CJChicsZUN/KHAG8HQQZexB2lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t
1063
- 3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kniCrVWFCVH/A7HFe7fRQ5YiuayZSS
1064
- KqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67nfhmqA==
1065
- -----END CERTIFICATE-----
1066
-
1067
- # Issuer: CN=XRamp Global Certification Authority O=XRamp Security Services Inc OU=www.xrampsecurity.com
1068
- # Subject: CN=XRamp Global Certification Authority O=XRamp Security Services Inc OU=www.xrampsecurity.com
1069
- # Label: "XRamp Global CA Root"
1070
- # Serial: 107108908803651509692980124233745014957
1071
- # MD5 Fingerprint: a1:0b:44:b3:ca:10:d8:00:6e:9d:0f:d8:0f:92:0a:d1
1072
- # SHA1 Fingerprint: b8:01:86:d1:eb:9c:86:a5:41:04:cf:30:54:f3:4c:52:b7:e5:58:c6
1073
- # SHA256 Fingerprint: ce:cd:dc:90:50:99:d8:da:df:c5:b1:d2:09:b7:37:cb:e2:c1:8c:fb:2c:10:c0:ff:0b:cf:0d:32:86:fc:1a:a2
1074
- -----BEGIN CERTIFICATE-----
1075
- MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCB
1076
- gjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEk
1077
- MCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRY
1078
- UmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQxMTAxMTcx
1079
- NDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3
1080
- dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2Vy
1081
- dmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB
1082
- dXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS6
1083
- 38eMpSe2OAtp87ZOqCwuIR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCP
1084
- KZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMxfoArtYzAQDsRhtDLooY2YKTVMIJt2W7Q
1085
- DxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FEzG+gSqmUsE3a56k0enI4
1086
- qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqsAxcZZPRa
1087
- JSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNVi
1088
- PvryxS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0P
1089
- BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASs
1090
- jVy16bYbMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0
1091
- eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQEwDQYJKoZIhvcNAQEFBQAD
1092
- ggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc/Kh4ZzXxHfAR
1093
- vbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt
1094
- qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLa
1095
- IR9NmXmd4c8nnxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSy
1096
- i6mx5O+aGtA9aZnuqCij4Tyz8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQ
1097
- O+7ETPTsJ3xCwnR8gooJybQDJbw=
1098
- -----END CERTIFICATE-----
1099
-
1100
- # Issuer: O=The Go Daddy Group, Inc. OU=Go Daddy Class 2 Certification Authority
1101
- # Subject: O=The Go Daddy Group, Inc. OU=Go Daddy Class 2 Certification Authority
1102
- # Label: "Go Daddy Class 2 CA"
1103
- # Serial: 0
1104
- # MD5 Fingerprint: 91:de:06:25:ab:da:fd:32:17:0c:bb:25:17:2a:84:67
1105
- # SHA1 Fingerprint: 27:96:ba:e6:3f:18:01:e2:77:26:1b:a0:d7:77:70:02:8f:20:ee:e4
1106
- # SHA256 Fingerprint: c3:84:6b:f2:4b:9e:93:ca:64:27:4c:0e:c6:7c:1e:cc:5e:02:4f:fc:ac:d2:d7:40:19:35:0e:81:fe:54:6a:e4
1107
- -----BEGIN CERTIFICATE-----
1108
- MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEh
1109
- MB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBE
1110
- YWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3
1111
- MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkGA1UEBhMCVVMxITAfBgNVBAoTGFRo
1112
- ZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28gRGFkZHkgQ2xhc3Mg
1113
- MiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQADggEN
1114
- ADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCA
1115
- PVYYYwhv2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6w
1116
- wdhFJ2+qN1j3hybX2C32qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXi
1117
- EqITLdiOr18SPaAIBQi2XKVlOARFmR6jYGB0xUGlcmIbYsUfb18aQr4CUWWoriMY
1118
- avx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmYvLEHZ6IVDd2gWMZEewo+
1119
- YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0OBBYEFNLE
1120
- sNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h
1121
- /t2oatTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5
1122
- IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmlj
1123
- YXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
1124
- ggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wimPQoZ+YeAEW5p5JYXMP80kWNy
1125
- OO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7P
1126
- TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
1127
- HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER
1128
- dEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf
1129
- ReYNnyicsbkqWletNw+vHX/bvZ8=
1130
- -----END CERTIFICATE-----
1131
-
1132
- # Issuer: O=Starfield Technologies, Inc. OU=Starfield Class 2 Certification Authority
1133
- # Subject: O=Starfield Technologies, Inc. OU=Starfield Class 2 Certification Authority
1134
- # Label: "Starfield Class 2 CA"
1135
- # Serial: 0
1136
- # MD5 Fingerprint: 32:4a:4b:bb:c8:63:69:9b:be:74:9a:c6:dd:1d:46:24
1137
- # SHA1 Fingerprint: ad:7e:1c:28:b0:64:ef:8f:60:03:40:20:14:c3:d0:e3:37:0e:b5:8a
1138
- # SHA256 Fingerprint: 14:65:fa:20:53:97:b8:76:fa:a6:f0:a9:95:8e:55:90:e4:0f:cc:7f:aa:4f:b7:c2:c8:67:75:21:fb:5f:b6:58
1139
- -----BEGIN CERTIFICATE-----
1140
- MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl
1141
- MCMGA1UEChMcU3RhcmZpZWx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157
- L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D
1158
- eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
1159
- xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp
1160
- VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY
1161
- WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q=
1162
- -----END CERTIFICATE-----
1163
-
1164
- # Issuer: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
1165
- # Subject: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
1166
- # Label: "StartCom Certification Authority"
1167
- # Serial: 1
1168
- # MD5 Fingerprint: 22:4d:8f:8a:fc:f7:35:c2:bb:57:34:90:7b:8b:22:16
1169
- # SHA1 Fingerprint: 3e:2b:f7:f2:03:1b:96:f3:8c:e6:c4:d8:a8:5d:3e:2d:58:47:6a:0f
1170
- # SHA256 Fingerprint: c7:66:a9:be:f2:d4:07:1c:86:3a:31:aa:49:20:e8:13:b2:d1:98:60:8c:b7:b7:cf:e2:11:43:b8:36:df:09:ea
1171
- -----BEGIN CERTIFICATE-----
1172
- MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEW
1173
- MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg
1174
- Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh
1175
- dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM2WhcNMzYwOTE3MTk0NjM2WjB9
1176
- MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRk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q/3JR44iZB3fsNrarnDy0RLrHiQi+fHLB5L
1208
- EUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZEoalHmdkrQYu
1209
- L6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq
1210
- yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuC
1211
- O3NJo2pXh5Tl1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6V
1212
- um0ABj6y6koQOdjQK/W/7HW/lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkySh
1213
- NOsF/5oirpt9P/FlUQqmMGqz9IgcgA38corog14=
1214
- -----END CERTIFICATE-----
1215
-
1216
- # Issuer: CN=DigiCert Assured ID Root CA O=DigiCert Inc OU=www.digicert.com
1217
- # Subject: CN=DigiCert Assured ID Root CA O=DigiCert Inc OU=www.digicert.com
1218
- # Label: "DigiCert Assured ID Root CA"
1219
- # Serial: 17154717934120587862167794914071425081
1220
- # MD5 Fingerprint: 87:ce:0b:7b:2a:0e:49:00:e1:58:71:9b:37:a8:93:72
1221
- # SHA1 Fingerprint: 05:63:b8:63:0d:62:d7:5a:bb:c8:ab:1e:4b:df:b5:a8:99:b2:4d:43
1222
- # SHA256 Fingerprint: 3e:90:99:b5:01:5e:8f:48:6c:00:bc:ea:9d:11:1e:e7:21:fa:ba:35:5a:89:bc:f1:df:69:56:1e:3d:c6:32:5c
1223
- -----BEGIN CERTIFICATE-----
1224
- MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBl
1225
- MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
1226
- d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJv
1227
- b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77DZypoEd+A5wwzZr8TDRRu838fYxAe
1243
- +o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g==
1244
- -----END CERTIFICATE-----
1245
-
1246
- # Issuer: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com
1247
- # Subject: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com
1248
- # Label: "DigiCert Global Root CA"
1249
- # Serial: 10944719598952040374951832963794454346
1250
- # MD5 Fingerprint: 79:e4:a9:84:0d:7d:3a:96:d7:c0:4f:e2:43:4c:89:2e
1251
- # SHA1 Fingerprint: a8:98:5d:3a:65:e5:e5:c4:b2:d7:d6:6d:40:c6:dd:2f:b1:9c:54:36
1252
- # SHA256 Fingerprint: 43:48:a0:e9:44:4c:78:cb:26:5e:05:8d:5e:89:44:b4:d8:4f:96:62:bd:26:db:25:7f:89:34:a4:43:c7:01:61
1253
- -----BEGIN CERTIFICATE-----
1254
- MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh
1255
- MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
1256
- d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD
1257
- QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT
1258
- MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
1259
- b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG
1260
- 9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB
1261
- CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97
1262
- nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt
1263
- 43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P
1264
- T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4
1265
- gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO
1266
- BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR
1267
- TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw
1268
- DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr
1269
- hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg
1270
- 06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF
1271
- PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls
1272
- YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
1273
- CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
1274
- -----END CERTIFICATE-----
1275
-
1276
- # Issuer: CN=DigiCert High Assurance EV Root CA O=DigiCert Inc OU=www.digicert.com
1277
- # Subject: CN=DigiCert High Assurance EV Root CA O=DigiCert Inc OU=www.digicert.com
1278
- # Label: "DigiCert High Assurance EV Root CA"
1279
- # Serial: 3553400076410547919724730734378100087
1280
- # MD5 Fingerprint: d4:74:de:57:5c:39:b2:d3:9c:85:83:c5:c0:65:49:8a
1281
- # SHA1 Fingerprint: 5f:b7:ee:06:33:e2:59:db:ad:0c:4c:9a:e6:d3:8f:1a:61:c7:dc:25
1282
- # SHA256 Fingerprint: 74:31:e5:f4:c3:c1:ce:46:90:77:4f:0b:61:e0:54:40:88:3b:a9:a0:1e:d0:0b:a6:ab:d7:80:6e:d3:b1:18:cf
1283
- -----BEGIN CERTIFICATE-----
1284
- MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs
1285
- MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
1286
- d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j
1287
- ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL
1288
- MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3
1289
- LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug
1290
- RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm
1291
- +9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW
1292
- PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM
1293
- xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB
1294
- Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3
1295
- hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg
1296
- EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF
1297
- MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA
1298
- FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec
1299
- nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z
1300
- eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF
1301
- hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2
1302
- Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
1303
- vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep
1304
- +OkuE6N36B9K
1305
- -----END CERTIFICATE-----
1306
-
1307
- # Issuer: CN=GeoTrust Primary Certification Authority O=GeoTrust Inc.
1308
- # Subject: CN=GeoTrust Primary Certification Authority O=GeoTrust Inc.
1309
- # Label: "GeoTrust Primary Certification Authority"
1310
- # Serial: 32798226551256963324313806436981982369
1311
- # MD5 Fingerprint: 02:26:c3:01:5e:08:30:37:43:a9:d0:7d:cf:37:e6:bf
1312
- # SHA1 Fingerprint: 32:3c:11:8e:1b:f7:b8:b6:52:54:e2:e2:10:0d:d6:02:90:37:f0:96
1313
- # SHA256 Fingerprint: 37:d5:10:06:c5:12:ea:ab:62:64:21:f1:ec:8c:92:01:3f:c5:f8:2a:e9:8e:e5:33:eb:46:19:b8:de:b4:d0:6c
1314
- -----BEGIN CERTIFICATE-----
1315
- MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBY
1316
- MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3Q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fj
1332
- UjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG1riR/aYNKxoU
1333
- AT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk=
1334
- -----END CERTIFICATE-----
1335
-
1336
- # Issuer: CN=thawte Primary Root CA O=thawte, Inc. OU=Certification Services Division/(c) 2006 thawte, Inc. - For authorized use only
1337
- # Subject: CN=thawte Primary Root CA O=thawte, Inc. OU=Certification Services Division/(c) 2006 thawte, Inc. - For authorized use only
1338
- # Label: "thawte Primary Root CA"
1339
- # Serial: 69529181992039203566298953787712940909
1340
- # MD5 Fingerprint: 8c:ca:dc:0b:22:ce:f5:be:72:ac:41:1a:11:a8:d8:12
1341
- # SHA1 Fingerprint: 91:c6:d6:ee:3e:8a:c8:63:84:e5:48:c2:99:29:5c:75:6c:81:7b:81
1342
- # SHA256 Fingerprint: 8d:72:2f:81:a9:c1:13:c0:79:1d:f1:36:a2:96:6d:b2:6c:95:0a:97:1d:b4:6b:41:99:f4:ea:54:b7:8b:fb:9f
1343
- -----BEGIN CERTIFICATE-----
1344
- MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCB
1345
- qTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf
1346
- Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw
1347
- MDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNV
1348
- BAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3MDAwMDAwWhcNMzYw
1349
- NzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5j
1350
- LjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aW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VaMaA==
1367
- -----END CERTIFICATE-----
1368
-
1369
- # Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G5 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2006 VeriSign, Inc. - For authorized use only
1370
- # Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G5 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2006 VeriSign, Inc. - For authorized use only
1371
- # Label: "VeriSign Class 3 Public Primary Certification Authority - G5"
1372
- # Serial: 33037644167568058970164719475676101450
1373
- # MD5 Fingerprint: cb:17:e4:31:67:3e:e2:09:fe:45:57:93:f3:0a:fa:1c
1374
- # SHA1 Fingerprint: 4e:b6:d5:78:49:9b:1c:cf:5f:58:1e:ad:56:be:3d:9b:67:44:a5:e5
1375
- # SHA256 Fingerprint: 9a:cf:ab:7e:43:c8:d8:80:d0:6b:26:2a:94:de:ee:e4:b4:65:99:89:c3:d0:ca:f1:9b:af:64:05:e4:1a:b7:df
1376
- -----BEGIN CERTIFICATE-----
1377
- MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCB
1378
- yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
1379
- ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp
1380
- U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW
1381
- ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0
1382
- aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL
1383
- MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW
1384
- ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOA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0kF6BWlK
1400
- WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ
1401
- 4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N
1402
- hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
1403
- -----END CERTIFICATE-----
1404
-
1405
- # Issuer: CN=COMODO Certification Authority O=COMODO CA Limited
1406
- # Subject: CN=COMODO Certification Authority O=COMODO CA Limited
1407
- # Label: "COMODO Certification Authority"
1408
- # Serial: 104350513648249232941998508985834464573
1409
- # MD5 Fingerprint: 5c:48:dc:f7:42:72:ec:56:94:6d:1c:cc:71:35:80:75
1410
- # SHA1 Fingerprint: 66:31:bf:9e:f7:4f:9e:b6:c9:d5:a6:0c:ba:6a:be:d1:f7:bd:ef:7b
1411
- # SHA256 Fingerprint: 0c:2c:d6:3d:f7:80:6f:a3:99:ed:e8:09:11:6b:57:5b:f8:79:89:f0:65:18:f9:80:8c:86:05:03:17:8b:af:66
1412
- -----BEGIN CERTIFICATE-----
1413
- MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCB
1414
- gTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
1415
- A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNV
1416
- BAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEyMDEwMDAw
1417
- MDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3Jl
1418
- YXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFDT01P
1419
- RE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT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B
1435
- ZQ==
1436
- -----END CERTIFICATE-----
1437
-
1438
- # Issuer: CN=Network Solutions Certificate Authority O=Network Solutions L.L.C.
1439
- # Subject: CN=Network Solutions Certificate Authority O=Network Solutions L.L.C.
1440
- # Label: "Network Solutions Certificate Authority"
1441
- # Serial: 116697915152937497490437556386812487904
1442
- # MD5 Fingerprint: d3:f3:a6:16:c0:fa:6b:1d:59:b1:2d:96:4d:0e:11:2e
1443
- # SHA1 Fingerprint: 74:f8:a3:c3:ef:e7:b3:90:06:4b:83:90:3c:21:64:60:20:e5:df:ce
1444
- # SHA256 Fingerprint: 15:f0:ba:00:a3:ac:7a:f3:ac:88:4c:07:2b:10:11:a0:77:bd:77:c0:97:f4:01:64:b2:f8:59:8a:bd:83:86:0c
1445
- -----BEGIN CERTIFICATE-----
1446
- MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBi
1447
- MQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
1448
- MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3Jp
1449
- dHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMxMjM1OTU5WjBiMQswCQYDVQQGEwJV
1450
- UzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydO
1451
- ZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0GCSqG
1452
- SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwz
1453
- c7MEL7xxjOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPP
1454
- OCwGJgl6cvf6UDL4wpPTaaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rl
1455
- mGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXTcrA/vGp97Eh/jcOrqnErU2lBUzS1sLnF
1456
- BgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc/Qzpf14Dl847ABSHJ3A4
1457
- qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMBAAGjgZcw
1458
- gZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIB
1459
- BjAPBgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwu
1460
- bmV0c29sc3NsLmNvbS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3Jp
1461
- dHkuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc8
1462
- 6fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q4LqILPxFzBiwmZVRDuwduIj/
1463
- h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/GGUsyfJj4akH
1464
- /nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
1465
- wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHN
1466
- pGxlaKFJdlxDydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
1467
- -----END CERTIFICATE-----
1468
-
1469
- # Issuer: CN=COMODO ECC Certification Authority O=COMODO CA Limited
1470
- # Subject: CN=COMODO ECC Certification Authority O=COMODO CA Limited
1471
- # Label: "COMODO ECC Certification Authority"
1472
- # Serial: 41578283867086692638256921589707938090
1473
- # MD5 Fingerprint: 7c:62:ff:74:9d:31:53:5e:68:4a:d5:78:aa:1e:bf:23
1474
- # SHA1 Fingerprint: 9f:74:4e:9f:2b:4d:ba:ec:0f:31:2c:50:b6:56:3b:8e:2d:93:c3:11
1475
- # SHA256 Fingerprint: 17:93:92:7a:06:14:54:97:89:ad:ce:2f:8f:34:f7:f0:b6:6d:0f:3a:e3:a3:b8:4d:21:ec:15:db:ba:4f:ad:c7
1476
- -----BEGIN CERTIFICATE-----
1477
- MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTEL
1478
- MAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
1479
- BxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMT
1480
- IkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDgwMzA2MDAw
1481
- MDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdy
1482
- ZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09N
1483
- T0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlv
1484
- biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSR
1485
- FtSrYpn1PlILBs5BAH+X4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0J
1486
- cfRK9ChQtP6IHG4/bC8vCVlbpVsLM5niwz2J+Wos77LTBumjQjBAMB0GA1UdDgQW
1487
- BBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/
1488
- BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VGFAkK+qDm
1489
- fQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdv
1490
- GDeAU/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=
1491
- -----END CERTIFICATE-----
1492
-
1493
- # Issuer: CN=TC TrustCenter Class 2 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 2 CA
1494
- # Subject: CN=TC TrustCenter Class 2 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 2 CA
1495
- # Label: "TC TrustCenter Class 2 CA II"
1496
- # Serial: 941389028203453866782103406992443
1497
- # MD5 Fingerprint: ce:78:33:5c:59:78:01:6e:18:ea:b9:36:a0:b9:2e:23
1498
- # SHA1 Fingerprint: ae:50:83:ed:7c:f4:5c:bc:8f:61:c6:21:fe:68:5d:79:42:21:15:6e
1499
- # SHA256 Fingerprint: e6:b8:f8:76:64:85:f8:07:ae:7f:8d:ac:16:70:46:1f:07:c0:a1:3e:ef:3a:1f:f7:17:53:8d:7a:ba:d3:91:b4
1500
- -----BEGIN CERTIFICATE-----
1501
- MIIEqjCCA5KgAwIBAgIOLmoAAQACH9dSISwRXDswDQYJKoZIhvcNAQEFBQAwdjEL
1502
- MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNV
1503
- BAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDIgQ0ExJTAjBgNVBAMTHFRDIFRydXN0
1504
- Q2VudGVyIENsYXNzIDIgQ0EgSUkwHhcNMDYwMTEyMTQzODQzWhcNMjUxMjMxMjI1
1505
- OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIgR21i
1506
- SDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQTElMCMGA1UEAxMc
1507
- VEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQAD
1508
- ggEPADCCAQoCggEBAKuAh5uO8MN8h9foJIIRszzdQ2Lu+MNF2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A4CQze28suVyrZZ0srHbqNZn1l7kPJOzHdiEoZa5X6AeI
1525
- dUpWoNIFOqTmjZKILPPy4cHGYdtBxceb9w4aUUXCYWvcZCcXjFq32nQozZfkvQ==
1526
- -----END CERTIFICATE-----
1527
-
1528
- # Issuer: CN=TC TrustCenter Class 3 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 3 CA
1529
- # Subject: CN=TC TrustCenter Class 3 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 3 CA
1530
- # Label: "TC TrustCenter Class 3 CA II"
1531
- # Serial: 1506523511417715638772220530020799
1532
- # MD5 Fingerprint: 56:5f:aa:80:61:12:17:f6:67:21:e6:2b:6d:61:56:8e
1533
- # SHA1 Fingerprint: 80:25:ef:f4:6e:70:c8:d4:72:24:65:84:fe:40:3b:8a:8d:6a:db:f5
1534
- # SHA256 Fingerprint: 8d:a0:84:fc:f9:9c:e0:77:22:f8:9b:32:05:93:98:06:fa:5c:b8:11:e1:c8:13:f6:a1:08:c7:d3:36:b3:40:8e
1535
- -----BEGIN CERTIFICATE-----
1536
- MIIEqjCCA5KgAwIBAgIOSkcAAQAC5aBd1j8AUb8wDQYJKoZIhvcNAQEFBQAwdjEL
1537
- MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNV
1538
- BAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDMgQ0ExJTAjBgNVBAMTHFRDIFRydXN0
1539
- Q2VudGVyIENsYXNzIDMgQ0EgSUkwHhcNMDYwMTEyMTQ0MTU3WhcNMjUxMjMxMjI1
1540
- OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIgR21i
1541
- SDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQTElMCMGA1UEAxMc
1542
- VEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQSBJSTCCASIwDQYJKoZIhvcNAQE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9M1ZwvJbL2NV9IJqDnxrcOfHFcqMRA/07QlIp2+gB
1559
- 95tejNaNhk4Z+rwcvsUhpYeeeC422wlxo3I0+GzjBgnyXlal092Y+tTmBvTwtiBj
1560
- S+opvaqCZh77gaqnN60TGOaSw4HBM7uIHqHn4rS9MWwOUT1v+5ZWgOI2F9Hc5A==
1561
- -----END CERTIFICATE-----
1562
-
1563
- # Issuer: CN=TC TrustCenter Universal CA I O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
1564
- # Subject: CN=TC TrustCenter Universal CA I O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
1565
- # Label: "TC TrustCenter Universal CA I"
1566
- # Serial: 601024842042189035295619584734726
1567
- # MD5 Fingerprint: 45:e1:a5:72:c5:a9:36:64:40:9e:f5:e4:58:84:67:8c
1568
- # SHA1 Fingerprint: 6b:2f:34:ad:89:58:be:62:fd:b0:6b:5c:ce:bb:9d:d9:4f:4e:39:f3
1569
- # SHA256 Fingerprint: eb:f3:c0:2a:87:89:b1:fb:7d:51:19:95:d6:63:b7:29:06:d9:13:ce:0d:5e:10:56:8a:8a:77:e2:58:61:67:e7
1570
- -----BEGIN CERTIFICATE-----
1571
- MIID3TCCAsWgAwIBAgIOHaIAAQAC7LdggHiNtgYwDQYJKoZIhvcNAQEFBQAweTEL
1572
- MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNV
1573
- BAsTG1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQTEmMCQGA1UEAxMdVEMgVHJ1
1574
- c3RDZW50ZXIgVW5pdmVyc2FsIENBIEkwHhcNMDYwMzIyMTU1NDI4WhcNMjUxMjMx
1575
- MjI1OTU5WjB5MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIg
1576
- R21iSDEkMCIGA1UECxMbVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBMSYwJAYD
1577
- VQQDEx1U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root O=Cybertrust, Inc
1595
- # Subject: CN=Cybertrust Global Root O=Cybertrust, Inc
1596
- # Label: "Cybertrust Global Root"
1597
- # Serial: 4835703278459682877484360
1598
- # MD5 Fingerprint: 72:e4:4a:87:e3:69:40:80:77:ea:bc:e3:f4:ff:f0:e1
1599
- # SHA1 Fingerprint: 5f:43:e5:b1:bf:f8:78:8c:ac:1c:c7:ca:4a:9a:c6:22:2b:cc:34:c6
1600
- # SHA256 Fingerprint: 96:0a:df:00:63:e9:63:56:75:0c:29:65:dd:0a:08:67:da:0b:9c:bd:6e:77:71:4a:ea:fb:23:49:ab:39:3d:a3
1601
- -----BEGIN CERTIFICATE-----
1602
- MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYG
1603
- A1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2Jh
1604
- bCBSb290MB4XDTA2MTIxNTA4MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UE
1605
- ChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBS
1606
- b290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+Mi8vRRQZhP/8NN5
1607
- 7CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW0ozS
1608
- J8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2y
1609
- HLtgwEZLAfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iP
1610
- t3sMpTjr3kfb1V05/Iin89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNz
1611
- FtApD0mpSPCzqrdsxacwOUBdrsTiXSZT8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAY
1612
- XSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/
1613
- MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2MDSgMqAw
1614
- hi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3Js
1615
- MB8GA1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUA
1616
- A4IBAQBW7wojoFROlZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMj
1617
- Wqd8BfP9IjsO0QbE2zZMcwSO5bAi5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUx
1618
- XOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2hO0j9n0Hq0V+09+zv+mKts2o
1619
- omcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+TX3EJIrduPuoc
1620
- A06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW
1621
- WL1WMRJOEcgh4LMRkWXbtKaIOM5V
1622
- -----END CERTIFICATE-----
1623
-
1624
- # Issuer: CN=GeoTrust Primary Certification Authority - G3 O=GeoTrust Inc. OU=(c) 2008 GeoTrust Inc. - For authorized use only
1625
- # Subject: CN=GeoTrust Primary Certification Authority - G3 O=GeoTrust Inc. OU=(c) 2008 GeoTrust Inc. - For authorized use only
1626
- # Label: "GeoTrust Primary Certification Authority - G3"
1627
- # Serial: 28809105769928564313984085209975885599
1628
- # MD5 Fingerprint: b5:e8:34:36:c9:10:44:58:48:70:6d:2e:83:d4:b8:05
1629
- # SHA1 Fingerprint: 03:9e:ed:b8:0b:e7:a0:3c:69:53:89:3b:20:d2:d9:32:3a:4c:2a:fd
1630
- # SHA256 Fingerprint: b4:78:b8:12:25:0d:f8:78:63:5c:2a:a7:ec:7d:15:5e:aa:62:5e:e8:29:16:e2:cd:29:43:61:88:6c:d1:fb:d4
1631
- -----BEGIN CERTIFICATE-----
1632
- MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCB
1633
- mDELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsT
1634
- MChjKSAyMDA4IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s
1635
- eTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhv
1636
- cml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIzNTk1OVowgZgxCzAJ
1637
- BgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg
1638
- MjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0
1639
- BgNVBAMTLUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
1640
- LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz
1641
- +uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5jK/BGvESyiaHAKAxJcCGVn2TAppMSAmUm
1642
- hsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdEc5IiaacDiGydY8hS2pgn
1643
- 5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3CIShwiP/W
1644
- JmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exAL
1645
- DmKudlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZC
1646
- huOl1UcCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw
1647
- HQYDVR0OBBYEFMR5yo6hTgMdHNxr2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IB
1648
- AQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9cr5HqQ6XErhK8WTTOd8lNNTB
1649
- zU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbEAp7aDHdlDkQN
1650
- kv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD
1651
- AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUH
1652
- SJsMC8tJP33st/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2G
1653
- spki4cErx5z481+oghLrGREt
1654
- -----END CERTIFICATE-----
1655
-
1656
- # Issuer: CN=thawte Primary Root CA - G2 O=thawte, Inc. OU=(c) 2007 thawte, Inc. - For authorized use only
1657
- # Subject: CN=thawte Primary Root CA - G2 O=thawte, Inc. OU=(c) 2007 thawte, Inc. - For authorized use only
1658
- # Label: "thawte Primary Root CA - G2"
1659
- # Serial: 71758320672825410020661621085256472406
1660
- # MD5 Fingerprint: 74:9d:ea:60:24:c4:fd:22:53:3e:cc:3a:72:d9:29:4f
1661
- # SHA1 Fingerprint: aa:db:bc:22:23:8f:c4:01:a1:27:bb:38:dd:f4:1d:db:08:9e:f0:12
1662
- # SHA256 Fingerprint: a4:31:0d:50:af:18:a6:44:71:90:37:2a:86:af:af:8b:95:1f:fb:43:1d:83:7f:1e:56:88:b4:59:71:ed:15:57
1663
- -----BEGIN CERTIFICATE-----
1664
- MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDEL
1665
- MAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMp
1666
- IDIwMDcgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAi
1667
- BgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMjAeFw0wNzExMDUwMDAw
1668
- MDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh
1669
- d3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBGb3Ig
1670
- YXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9v
1671
- dCBDQSAtIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/
1672
- BebfowJPDQfGAFG6DAJSLSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6
1673
- papu+7qzcMBniKI11KOasf2twu8x+qi58/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8E
1674
- BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUmtgAMADna3+FGO6Lts6K
1675
- DPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUNG4k8VIZ3
1676
- KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41ox
1677
- XZ3Krr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg==
1678
- -----END CERTIFICATE-----
1679
-
1680
- # Issuer: CN=thawte Primary Root CA - G3 O=thawte, Inc. OU=Certification Services Division/(c) 2008 thawte, Inc. - For authorized use only
1681
- # Subject: CN=thawte Primary Root CA - G3 O=thawte, Inc. OU=Certification Services Division/(c) 2008 thawte, Inc. - For authorized use only
1682
- # Label: "thawte Primary Root CA - G3"
1683
- # Serial: 127614157056681299805556476275995414779
1684
- # MD5 Fingerprint: fb:1b:5d:43:8a:94:cd:44:c6:76:f2:43:4b:47:e7:31
1685
- # SHA1 Fingerprint: f1:8b:53:8d:1b:e9:03:b6:a6:f0:56:43:5b:17:15:89:ca:f3:6b:f2
1686
- # SHA256 Fingerprint: 4b:03:f4:58:07:ad:70:f2:1b:fc:2c:ae:71:c9:fd:e4:60:4c:06:4c:f5:ff:b6:86:ba:e5:db:aa:d7:fd:d3:4c
1687
- -----BEGIN CERTIFICATE-----
1688
- MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCB
1689
- rjELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf
1690
- Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw
1691
- MDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNV
1692
- BAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0wODA0MDIwMDAwMDBa
1693
- Fw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhhd3Rl
1694
- LCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9u
1695
- MTgwNgYDVQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXpl
1696
- ZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEcz
1697
- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsr8nLPvb2FvdeHsbnndm
1698
- gcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2AtP0LMqmsywCPLLEHd5N/8
1699
- YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC+BsUa0Lf
1700
- b1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS9
1701
- 9irY7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2S
1702
- zhkGcuYMXDhpxwTWvGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUk
1703
- OQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV
1704
- HQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJKoZIhvcNAQELBQADggEBABpA
1705
- 2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweKA3rD6z8KLFIW
1706
- oCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu
1707
- t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7c
1708
- KUGRIjxpp7sC8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fM
1709
- m7v/OeZWYdMKp8RcTGB7BXcmer/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZu
1710
- MdRAGmI0Nj81Aa6sY6A=
1711
- -----END CERTIFICATE-----
1712
-
1713
- # Issuer: CN=GeoTrust Primary Certification Authority - G2 O=GeoTrust Inc. OU=(c) 2007 GeoTrust Inc. - For authorized use only
1714
- # Subject: CN=GeoTrust Primary Certification Authority - G2 O=GeoTrust Inc. OU=(c) 2007 GeoTrust Inc. - For authorized use only
1715
- # Label: "GeoTrust Primary Certification Authority - G2"
1716
- # Serial: 80682863203381065782177908751794619243
1717
- # MD5 Fingerprint: 01:5e:d8:6b:bd:6f:3d:8e:a1:31:f8:12:e0:98:73:6a
1718
- # SHA1 Fingerprint: 8d:17:84:d5:37:f3:03:7d:ec:70:fe:57:8b:51:9a:99:e6:10:d7:b0
1719
- # SHA256 Fingerprint: 5e:db:7a:c4:3b:82:a0:6a:87:61:e8:d7:be:49:79:eb:f2:61:1f:7d:d7:9b:f9:1c:1c:6b:56:6a:21:9e:d7:66
1720
- -----BEGIN CERTIFICATE-----
1721
- MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDEL
1722
- MAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChj
1723
- KSAyMDA3IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2
1724
- MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
1725
- eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1OVowgZgxCzAJBgNV
1726
- BAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykgMjAw
1727
- NyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNV
1728
- BAMTLUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH
1729
- MjB2MBAGByqGSM49AgEGBSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcL
1730
- So17VDs6bl8VAsBQps8lL33KSLjHUGMcKiEIfJo22Av+0SbFWDEwKCXzXV2juLal
1731
- tJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO
1732
- BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+EVXVMAoG
1733
- CCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGT
1734
- qQ7mndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBucz
1735
- rD6ogRLQy7rQkgu2npaqBA+K
1736
- -----END CERTIFICATE-----
1737
-
1738
- # Issuer: CN=VeriSign Universal Root Certification Authority O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2008 VeriSign, Inc. - For authorized use only
1739
- # Subject: CN=VeriSign Universal Root Certification Authority O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2008 VeriSign, Inc. - For authorized use only
1740
- # Label: "VeriSign Universal Root Certification Authority"
1741
- # Serial: 85209574734084581917763752644031726877
1742
- # MD5 Fingerprint: 8e:ad:b5:01:aa:4d:81:e4:8c:1d:d1:e1:14:00:95:19
1743
- # SHA1 Fingerprint: 36:79:ca:35:66:87:72:30:4d:30:a5:fb:87:3b:0f:a7:7b:b7:0d:54
1744
- # SHA256 Fingerprint: 23:99:56:11:27:a5:71:25:de:8c:ef:ea:61:0d:df:2f:a0:78:b5:c8:06:7f:4e:82:82:90:bf:b8:60:e8:4b:3c
1745
- -----BEGIN CERTIFICATE-----
1746
- MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCB
1747
- vTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
1748
- ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJp
1749
- U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MTgwNgYDVQQDEy9W
1750
- ZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe
1751
- Fw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJVUzEX
1752
- MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0
1753
- IE5ldH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6N9Rvk97ahfYtTxP/jgdFcrGJ2BtMQo2pSXpXDrrB2+
1769
- BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+PwGZsY6rp2aQW9IHR
1770
- lRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4mJO3
1771
- 7M2CYfE45k+XmCpajQ==
1772
- -----END CERTIFICATE-----
1773
-
1774
- # Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G4 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2007 VeriSign, Inc. - For authorized use only
1775
- # Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G4 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2007 VeriSign, Inc. - For authorized use only
1776
- # Label: "VeriSign Class 3 Public Primary Certification Authority - G4"
1777
- # Serial: 63143484348153506665311985501458640051
1778
- # MD5 Fingerprint: 3a:52:e1:e7:fd:6f:3a:e3:6f:f3:6f:99:1b:f9:22:41
1779
- # SHA1 Fingerprint: 22:d5:d8:df:8f:02:31:d1:8d:f7:9d:b7:cf:8a:2d:64:c9:3f:6c:3a
1780
- # SHA256 Fingerprint: 69:dd:d7:ea:90:bb:57:c9:3e:13:5d:c8:5e:a6:fc:d5:48:0b:60:32:39:bd:c4:54:fc:75:8b:2a:26:cf:7f:79
1781
- -----BEGIN CERTIFICATE-----
1782
- MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjEL
1783
- MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW
1784
- ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2ln
1785
- biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp
1786
- U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y
1787
- aXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjELMAkG
1788
- A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJp
1789
- U2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwg
1790
- SW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2ln
1791
- biBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5
1792
- IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8Utpkmw4tXNherJI9/gHm
1793
- GUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGzrl0Bp3ve
1794
- fLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUw
1795
- AwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJ
1796
- aW1hZ2UvZ2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYj
1797
- aHR0cDovL2xvZ28udmVyaXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMW
1798
- kf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMDA2gAMGUCMGYhDBgmYFo4e1ZC
1799
- 4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIxAJw9SDkjOVga
1800
- FRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
1801
- -----END CERTIFICATE-----
1802
-
1803
- # Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
1804
- # Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
1805
- # Label: "Verisign Class 3 Public Primary Certification Authority"
1806
- # Serial: 80507572722862485515306429940691309246
1807
- # MD5 Fingerprint: ef:5a:f1:33:ef:f1:cd:bb:51:02:ee:12:14:4b:96:c4
1808
- # SHA1 Fingerprint: a1:db:63:93:91:6f:17:e4:18:55:09:40:04:15:c7:02:40:b0:ae:6b
1809
- # SHA256 Fingerprint: a4:b6:b3:99:6f:c2:f3:06:b3:fd:86:81:bd:63:41:3d:8c:50:09:cc:4f:a3:29:c2:cc:f0:e2:fa:1b:14:03:05
1810
- -----BEGIN CERTIFICATE-----
1811
- MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkG
1812
- A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
1813
- cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
1814
- MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
1815
- BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
1816
- YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
1817
- ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
1818
- BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
1819
- I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
1820
- CSqGSIb3DQEBBQUAA4GBABByUqkFFBkyCEHwxWsKzH4PIRnN5GfcX6kb5sroc50i
1821
- 2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWXbj9T/UWZYB2oK0z5XqcJ
1822
- 2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/D/xwzoiQ
1823
- -----END CERTIFICATE-----
1824
-
1825
- # Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
1826
- # Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
1827
- # Label: "GlobalSign Root CA - R3"
1828
- # Serial: 4835703278459759426209954
1829
- # MD5 Fingerprint: c5:df:b8:49:ca:05:13:55:ee:2d:ba:1a:c3:3e:b0:28
1830
- # SHA1 Fingerprint: d6:9b:56:11:48:f0:1c:77:c5:45:78:c1:09:26:df:5b:85:69:76:ad
1831
- # SHA256 Fingerprint: cb:b5:22:d7:b7:f1:27:ad:6a:01:13:86:5b:df:1c:d4:10:2e:7d:07:59:af:63:5a:7c:f4:72:0d:c9:63:c5:3b
1832
- -----BEGIN CERTIFICATE-----
1833
- MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G
1834
- A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp
1835
- Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4
1836
- MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG
1837
- A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
1838
- hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8
1839
- RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT
1840
- gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm
1841
- KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd
1842
- QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ
1843
- XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw
1844
- DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o
1845
- LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU
1846
- RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp
1847
- jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK
1848
- 6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX
1849
- mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs
1850
- Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH
1851
- WD9f
1852
- -----END CERTIFICATE-----
1853
-
1854
- # Issuer: CN=TC TrustCenter Universal CA III O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
1855
- # Subject: CN=TC TrustCenter Universal CA III O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
1856
- # Label: "TC TrustCenter Universal CA III"
1857
- # Serial: 2010889993983507346460533407902964
1858
- # MD5 Fingerprint: 9f:dd:db:ab:ff:8e:ff:45:21:5f:f0:6c:9d:8f:fe:2b
1859
- # SHA1 Fingerprint: 96:56:cd:7b:57:96:98:95:d0:e1:41:46:68:06:fb:b8:c6:11:06:87
1860
- # SHA256 Fingerprint: 30:9b:4a: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MAMB
1876
- Af8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRW5+FbJUOA4PaM4XG8juWAL8RI
1877
- 4jANBgkqhkiG9w0BAQUFAAOCAQEAg8ev6n9NCjw5sWi+e22JLumzCecYV42Fmhfz
1878
- dkJQEw/HkG8zrcVJYCtsSVgZ1OK+t7+rSbyUyKu+KGwWaODIl0YgoGhnYIg5IFHY
1879
- aAERzqf2EQf27OysGh+yZm5WZ2B6dF7AbZc2rrUNXWZzwCUyRdhKBgePxLcHsU0G
1880
- DeGl6/R1yrqc0L2z0zIkTO5+4nYES0lT2PLpVDP85XEfPRRclkvxOvIAu2y0+pZV
1881
- CIgJwcyRGSmwIC3/yzikQOEXvnlhgP8HA4ZMTnsGnxGGjYnuJ8Tb4rwZjgvDwxPH
1882
- LQNjO9Po5KIqwoIIlBZU8O8fJ5AluA0OKBtHd0e9HKgl8ZS0Zg==
1883
- -----END CERTIFICATE-----
1884
-
1885
- # Issuer: CN=Go Daddy Root Certificate Authority - G2 O=GoDaddy.com, Inc.
1886
- # Subject: CN=Go Daddy Root Certificate Authority - G2 O=GoDaddy.com, Inc.
1887
- # Label: "Go Daddy Root Certificate Authority - G2"
1888
- # Serial: 0
1889
- # MD5 Fingerprint: 80:3a:bc:22:c1:e6:fb:8d:9b:3b:27:4a:32:1b:9a:01
1890
- # SHA1 Fingerprint: 47:be:ab:c9:22:ea:e8:0e:78:78:34:62:a7:9f:45:c2:54:fd:e6:8b
1891
- # SHA256 Fingerprint: 45:14:0b:32:47:eb:9c:c8:c5:b4:f0:d7:b5:30:91:f7:32:92:08:9e:6e:5a:63:e2:74:9d:d3:ac:a9:19:8e:da
1892
- -----BEGIN CERTIFICATE-----
1893
- MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx
1894
- EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoT
1895
- EUdvRGFkZ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/QYVN8Gb5DKj7Tjo
1911
- 2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO
1912
- LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI
1913
- 4uJEvlz36hz1
1914
- -----END CERTIFICATE-----
1915
-
1916
- # Issuer: CN=Starfield Root Certificate Authority - G2 O=Starfield Technologies, Inc.
1917
- # Subject: CN=Starfield Root Certificate Authority - G2 O=Starfield Technologies, Inc.
1918
- # Label: "Starfield Root Certificate Authority - G2"
1919
- # Serial: 0
1920
- # MD5 Fingerprint: d6:39:81:c6:52:7e:96:69:fc:fc:ca:66:ed:05:f2:96
1921
- # SHA1 Fingerprint: b5:1c:06:7c:ee:2b:0c:3d:f8:55:ab:2d:92:f4:fe:39:d4:e7:0f:0e
1922
- # SHA256 Fingerprint: 2c:e1:cb:0b:f9:d2:f9:e1:02:99:3f:be:21:51:52:c3:b2:dd:0c:ab:de:1c:68:e5:31:9b:83:91:54:db:b7:f5
1923
- -----BEGIN CERTIFICATE-----
1924
- MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMx
1925
- EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
1926
- HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVs
1927
- ZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAw
1928
- MFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6
1929
- b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQgVGVj
1930
- aG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZp
1931
- Y2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
1932
- ggEBAL3twQP89o/8ArFvW59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMg
1933
- nLRJdzIpVv257IzdIvpy3Cdhl+72WoTsbhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1
1934
- HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNkN3mSwOxGXn/hbVNMYq/N
1935
- Hwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7NfZTD4p7dN
1936
- dloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0
1937
- HZbUJtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO
1938
- BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0G
1939
- CSqGSIb3DQEBCwUAA4IBAQARWfolTwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjU
1940
- sHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx4mcujJUDJi5DnUox9g61DLu3
1941
- 4jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUwF5okxBDgBPfg
1942
- 8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K
1943
- pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1
1944
- mMpYjn0q7pBZc2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0
1945
- -----END CERTIFICATE-----
1946
-
1947
- # Issuer: CN=Starfield Services Root Certificate Authority - G2 O=Starfield Technologies, Inc.
1948
- # Subject: CN=Starfield Services Root Certificate Authority - G2 O=Starfield Technologies, Inc.
1949
- # Label: "Starfield Services Root Certificate Authority - G2"
1950
- # Serial: 0
1951
- # MD5 Fingerprint: 17:35:74:af:7b:61:1c:eb:f4:f9:3c:e2:ee:40:f9:a2
1952
- # SHA1 Fingerprint: 92:5a:8f:8d:2c:6d:04:e0:66:5f:59:6a:ff:22:d8:63:e8:25:6f:3f
1953
- # SHA256 Fingerprint: 56:8d:69:05:a2:c8:87:08:a4:b3:02:51:90:ed:cf:ed:b1:97:4a:60:6a:13:c6:e5:29:0f:cb:2a:e6:3e:da:b5
1954
- -----BEGIN CERTIFICATE-----
1955
- MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMx
1956
- EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
1957
- HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVs
1958
- ZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
1959
- MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNVBAYTAlVTMRAwDgYD
1960
- VQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFy
1961
- ZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2Vy
1962
- dmljZXMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
1963
- hvcNAQEBBQADggEPADCCAQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20p
1964
- OsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm2
1965
- 8xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4PahHQUw2eeBGg6345AWh1K
1966
- Ts9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLPLJGmpufe
1967
- hRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk
1968
- 6mFBrMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAw
1969
- DwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+q
1970
- AdcwKziIorhtSpzyEZGDMA0GCSqGSIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMI
1971
- bw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPPE95Dz+I0swSdHynVv/heyNXB
1972
- ve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTyxQGjhdByPq1z
1973
- qwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd
1974
- iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn
1975
- 0q23KXB56jzaYyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCN
1976
- sSi6
1977
- -----END CERTIFICATE-----
1978
-
1979
- # Issuer: CN=AffirmTrust Commercial O=AffirmTrust
1980
- # Subject: CN=AffirmTrust Commercial O=AffirmTrust
1981
- # Label: "AffirmTrust Commercial"
1982
- # Serial: 8608355977964138876
1983
- # MD5 Fingerprint: 82:92:ba:5b:ef:cd:8a:6f:a6:3d:55:f9:84:f6:d6:b7
1984
- # SHA1 Fingerprint: f9:b5:b6:32:45:5f:9c:be:ec:57:5f:80:dc:e9:6e:2c:c7:b2:78:b7
1985
- # SHA256 Fingerprint: 03:76:ab:1d:54:c5:f9:80:3c:e4:b2:e2:01:a0:ee:7e:ef:7b:57:b6:36:e8:a9:3c:9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Z110w/YETifLCBivt
2002
- Z8SOyUOyXGsViQK8YvxO8rUzqrJv0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9g
2003
- N53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0khsUlHRUe072o0EclNmsxZt9YC
2004
- nlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8=
2005
- -----END CERTIFICATE-----
2006
-
2007
- # Issuer: CN=AffirmTrust Networking O=AffirmTrust
2008
- # Subject: CN=AffirmTrust Networking O=AffirmTrust
2009
- # Label: "AffirmTrust Networking"
2010
- # Serial: 8957382827206547757
2011
- # MD5 Fingerprint: 42:65:ca:be:01:9a:9a:4c:a9:8c:41:49:cd:c0:d5:7f
2012
- # SHA1 Fingerprint: 29:36:21:02:8b:20:ed:02:f5:66:c5:32:d1:d6:ed:90:9f:45:00:2f
2013
- # SHA256 Fingerprint: 0a:81:ec:5a:92:97:77:f1:45:90:4a:f3:8d:5d:50:9f:66:b5:e2:c5:8f:cd:b5:31:05:8b:0e:17:f3:f0:b4:1b
2014
- -----BEGIN CERTIFICATE-----
2015
- MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UE
2016
- BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz
2017
- dCBOZXR3b3JraW5nMB4XDTEwMDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDEL
2018
- MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp
2019
- cm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
2020
- AQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SEHi3y
2021
- YJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbua
2022
- kCNrmreIdIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRL
2023
- QESxG9fhwoXA3hA/Pe24/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp
2024
- 6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gbh+0t+nvujArjqWaJGctB+d1ENmHP4ndG
2025
- yH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNVHQ4EFgQUBx/S55zawm6i
2026
- QLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ
2027
- KoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfO
2028
- tDIuUFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzu
2029
- QY0x2+c06lkh1QF612S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZ
2030
- Lgo/bNjR9eUJtGxUAArgFU2HdW23WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4u
2031
- olu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9/ZFvgrG+CJPbFEfxojfHRZ48
2032
- x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s=
2033
- -----END CERTIFICATE-----
2034
-
2035
- # Issuer: CN=AffirmTrust Premium O=AffirmTrust
2036
- # Subject: CN=AffirmTrust Premium O=AffirmTrust
2037
- # Label: "AffirmTrust Premium"
2038
- # Serial: 7893706540734352110
2039
- # MD5 Fingerprint: c4:5d:0e:48:b6:ac:28:30:4e:0a:bc:f9:38:16:87:57
2040
- # SHA1 Fingerprint: d8:a6:33:2c:e0:03:6f:b1:85:f6:63:4f:7d:6a:06:65:26:32:28:27
2041
- # SHA256 Fingerprint: 70:a7:3f:7f:37:6b:60:07:42:48:90:45:34:b1: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xgaVY5/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TX
2058
- OwF0lkLgAOIua+rF7nKsu7/+6qqo+Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYE
2059
- FJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/
2060
- BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByvMiPIs0laUZx2
2061
- KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg
2062
- Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B
2063
- 8OWycvpEgjNC6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQ
2064
- MKSOyARiqcTtNd56l+0OOF6SL5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc
2065
- 0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK+4w1IX2COPKpVJEZNZOUbWo6xbLQ
2066
- u4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmVBtWVyuEklut89pMF
2067
- u+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFgIxpH
2068
- YoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8
2069
- GKa1qF60g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaO
2070
- RtGdFNrHF+QFlozEJLUbzxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6e
2071
- KeC2uAloGRwYQw==
2072
- -----END CERTIFICATE-----
2073
-
2074
- # Issuer: CN=AffirmTrust Premium ECC O=AffirmTrust
2075
- # Subject: CN=AffirmTrust Premium ECC O=AffirmTrust
2076
- # Label: "AffirmTrust Premium ECC"
2077
- # Serial: 8401224907861490260
2078
- # MD5 Fingerprint: 64:b0:09:55:cf:b1:d5:99:e2:be:13:ab:a6:5d:ea:4d
2079
- # SHA1 Fingerprint: b8:23:6b:00:2f:1d:16:86:53:01:55:6c:11:a4:37:ca:eb:ff:c3:bb
2080
- # SHA256 Fingerprint: bd:71:fd:f6:da:97:e4:cf:62:d1:64:7a:dd:25:81:b0:7d:79:ad:f8:39:7e:b4:ec:ba:9c:5e:84:88:82:14:23
2081
- -----BEGIN CERTIFICATE-----
2082
- MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMC
2083
- VVMxFDASBgNVBAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQ
2084
- cmVtaXVtIEVDQzAeFw0xMDAxMjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJ
2085
- BgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1UcnVzdDEgMB4GA1UEAwwXQWZmaXJt
2086
- VHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQNMF4bFZ0D
2087
- 0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQN8O9
2088
- ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0G
2089
- A1UdDgQWBBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4G
2090
- A1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/Vs
2091
- aobgxCd05DhT1wV/GzTjxi+zygk8N53X57hG8f2h4nECMEJZh0PUUd+60wkyWs6I
2092
- flc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKMeQ==
2093
- -----END CERTIFICATE-----
2094
-
2095
- # Issuer: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
2096
- # Subject: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
2097
- # Label: "StartCom Certification Authority"
2098
- # Serial: 45
2099
- # MD5 Fingerprint: c9:3b:0d:84:41:fc:a4:76:79:23:08:57:de:10:19:16
2100
- # SHA1 Fingerprint: a3:f1:33:3f:e2:42:bf:cf:c5:d1:4e:8f:39:42:98:40:68:10:d1:a0
2101
- # SHA256 Fingerprint: e1:78:90:ee:09:a3:fb:f4:f4:8b:9c:41:4a:17:d6:37:b7:a5:06:47:e9:bc:75:23:22:72:7f:cc:17:42:a9:11
2102
- -----BEGIN CERTIFICATE-----
2103
- MIIHhzCCBW+gAwIBAgIBLTANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJJTDEW
2104
- MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg
2105
- Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh
2106
- dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM3WhcNMzYwOTE3MTk0NjM2WjB9
2107
- MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMi
2108
- U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh
2109
- cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA
2110
- A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk
2111
- pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf
2112
- OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TTQE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
2144
- -----END CERTIFICATE-----
2145
-
2146
- # Issuer: CN=StartCom Certification Authority G2 O=StartCom Ltd.
2147
- # Subject: CN=StartCom Certification Authority G2 O=StartCom Ltd.
2148
- # Label: "StartCom Certification Authority G2"
2149
- # Serial: 59
2150
- # MD5 Fingerprint: 78:4b:fb:9e:64:82:0a:d3:b8:4c:62:f3:64:f2:90:64
2151
- # SHA1 Fingerprint: 31:f1:fd:68:22:63:20:ee:c6:3b:3f:9d:ea:4a:3e:53:7c:7c:39:17
2152
- # SHA256 Fingerprint: c7:ba:65:67:de:93:a7:98:ae:1f:aa:79:1e:71:2d:37:8f:ae:1f:93:c4:39:7f:ea:44:1b:b7:cb:e6:fd:59:95
2153
- -----BEGIN CERTIFICATE-----
2154
- MIIFYzCCA0ugAwIBAgIBOzANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJJTDEW
2155
- MBQGA1UEChMNU3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlm
2156
- aWNhdGlvbiBBdXRob3JpdHkgRzIwHhcNMTAwMTAxMDEwMDAxWhcNMzkxMjMxMjM1
2157
- OTAxWjBTMQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjEsMCoG
2158
- A1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgRzIwggIiMA0G
2159
- CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2iTZbB7cgNr2Cu+EWIAOVeq8Oo1XJ
2160
- JZlKxdBWQYeQTSFgpBSHO839sj60ZwNq7eEPS8CRhXBF4EKe3ikj1AENoBB5uNsD
2161
- vfOpL9HG4A/LnooUCri99lZi8cVytjIl2bLzvWXFDSxu1ZJvGIsAQRSCb0AgJnoo
2162
- D/Uefyf3lLE3PbfHkffiAez9lInhzG7TNtYKGXmu1zSCZf98Qru23QumNK9LYP5/
2163
- Q0kGi4xDuFby2X8hQxfqp0iVAXV16iulQ5XqFYSd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K6vM8EOTmy6p6ahfzLbOOCxchcKK5HsamMm7YnUeMx0HgX4a/6ManY5Ka5l
2180
- IxKVCCIcl85bBu4M4ru8H0ST9tg4RQUh7eStqxK2A6RCLi3ECToDZ2mEmuFZkIoo
2181
- hdVddLHRDiBYmxOlsGOm7XtH/UVVMKTumtTm4ofvmMkyghEpIrwACjFeLQ/Ajulr
2182
- so8uBtjRkcfGEvRM/TAXw8HaOFvjqermobp573PYtlNXLfbQ4ddI
2183
- -----END CERTIFICATE-----
1
+ # Issuer: CN=GTE CyberTrust Global Root O=GTE Corporation OU=GTE CyberTrust Solutions, Inc.
2
+ # Subject: CN=GTE CyberTrust Global Root O=GTE Corporation OU=GTE CyberTrust Solutions, Inc.
3
+ # Label: "GTE CyberTrust Global Root"
4
+ # Serial: 421
5
+ # MD5 Fingerprint: ca:3d:d3:68:f1:03:5c:d0:32:fa:b8:2b:59:e8:5a:db
6
+ # SHA1 Fingerprint: 97:81:79:50:d8:1c:96:70:cc:34:d8:09:cf:79:44:31:36:7e:f4:74
7
+ # SHA256 Fingerprint: a5:31:25:18:8d:21:10:aa:96:4b:02:c7:b7:c6:da:32:03:17:08:94:e5:fb:71:ff:fb:66:67:d5:e6:81:0a:36
8
+ -----BEGIN CERTIFICATE-----
9
+ MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYD
10
+ VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
11
+ bHV0aW9ucywgSW5jLjEjMCEGA1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJv
12
+ b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV
13
+ UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
14
+ cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds
15
+ b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH
16
+ iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS
17
+ r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4
18
+ 04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3r
19
+ GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9
20
+ 3PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0P
21
+ lZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/
22
+ -----END CERTIFICATE-----
23
+
24
+ # Issuer: CN=Thawte Server CA O=Thawte Consulting cc OU=Certification Services Division
25
+ # Subject: CN=Thawte Server CA O=Thawte Consulting cc OU=Certification Services Division
26
+ # Label: "Thawte Server CA"
27
+ # Serial: 1
28
+ # MD5 Fingerprint: c5:70:c4:a2:ed:53:78:0c:c8:10:53:81:64:cb:d0:1d
29
+ # SHA1 Fingerprint: 23:e5:94:94:51:95:f2:41:48:03:b4:d5:64:d2:a3:a3:f5:d8:8b:8c
30
+ # SHA256 Fingerprint: b4:41:0b:73:e2:e6:ea:ca:47:fb:c4:2f:8f:a4:01:8a:f4:38:1d:c5:4c:fa:a8:44:50:46:1e:ed:09:45:4d:e9
31
+ -----BEGIN CERTIFICATE-----
32
+ MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx
33
+ FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
34
+ VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
35
+ biBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm
36
+ MCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTYwODAx
37
+ MDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT
38
+ DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3
39
+ dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNl
40
+ cyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3
41
+ DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD
42
+ gY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl/Kj0R1HahbUgdJSGHg91
43
+ yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg71CcEJRCX
44
+ L+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGj
45
+ EzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG
46
+ 7oWDTSEwjsrZqG9JGubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6e
47
+ QNuozDJ0uW8NxuOzRAvZim+aKZuZGCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZ
48
+ qdq5snUb9kLy78fyGPmJvKP/iiMucEc=
49
+ -----END CERTIFICATE-----
50
+
51
+ # Issuer: CN=Thawte Premium Server CA O=Thawte Consulting cc OU=Certification Services Division
52
+ # Subject: CN=Thawte Premium Server CA O=Thawte Consulting cc OU=Certification Services Division
53
+ # Label: "Thawte Premium Server CA"
54
+ # Serial: 1
55
+ # MD5 Fingerprint: 06:9f:69:79:16:66:90:02:1b:8c:8c:a2:c3:07:6f:3a
56
+ # SHA1 Fingerprint: 62:7f:8d:78:27:65:63:99:d2:7d:7f:90:44:c9:fe:b3:f3:3e:fa:9a
57
+ # SHA256 Fingerprint: ab:70:36:36:5c:71:54:aa:29:c2:c2:9f:5d:41:91:16:3b:16:2a:22:25:01:13:57:d5:6d:07:ff:a7:bc:1f:72
58
+ -----BEGIN CERTIFICATE-----
59
+ MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx
60
+ FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
61
+ VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
62
+ biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy
63
+ dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t
64
+ MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB
65
+ MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG
66
+ A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp
67
+ b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl
68
+ cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv
69
+ bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE
70
+ VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ
71
+ ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR
72
+ uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG
73
+ 9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI
74
+ hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM
75
+ pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg==
76
+ -----END CERTIFICATE-----
77
+
78
+ # Issuer: O=Equifax OU=Equifax Secure Certificate Authority
79
+ # Subject: O=Equifax OU=Equifax Secure Certificate Authority
80
+ # Label: "Equifax Secure CA"
81
+ # Serial: 903804111
82
+ # MD5 Fingerprint: 67:cb:9d:c0:13:24:8a:82:9b:b2:17:1e:d1:1b:ec:d4
83
+ # SHA1 Fingerprint: d2:32:09:ad:23:d3:14:23:21:74:e4:0d:7f:9d:62:13:97:86:63:3a
84
+ # SHA256 Fingerprint: 08:29:7a:40:47:db:a2:36:80:c7:31:db:6e:31:76:53:ca:78:48:e1:be:bd:3a:0b:01:79:a7:07:f9:2c:f1:78
85
+ -----BEGIN CERTIFICATE-----
86
+ MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
87
+ UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
88
+ dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
89
+ MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
90
+ dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
91
+ AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
92
+ BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
93
+ cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
94
+ AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
95
+ MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
96
+ aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
97
+ ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
98
+ IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
99
+ MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
100
+ A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
101
+ 7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
102
+ 1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
103
+ -----END CERTIFICATE-----
104
+
105
+ # Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
106
+ # Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
107
+ # Label: "Verisign Class 3 Public Primary Certification Authority"
108
+ # Serial: 149843929435818692848040365716851702463
109
+ # MD5 Fingerprint: 10:fc:63:5d:f6:26:3e:0d:f3:25:be:5f:79:cd:67:67
110
+ # SHA1 Fingerprint: 74:2c:31:92:e6:07:e4:24:eb:45:49:54:2b:e1:bb:c5:3e:61:74:e2
111
+ # SHA256 Fingerprint: e7:68:56:34:ef:ac:f6:9a:ce:93:9a:6b:25:5b:7b:4f:ab:ef:42:93:5b:50:a2:65:ac:b5:cb:60:27:e4:4e:70
112
+ -----BEGIN CERTIFICATE-----
113
+ MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
114
+ A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
115
+ cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
116
+ MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
117
+ BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
118
+ YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
119
+ ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
120
+ BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
121
+ I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
122
+ CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
123
+ lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
124
+ AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
125
+ -----END CERTIFICATE-----
126
+
127
+ # Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority - G2/(c) 1998 VeriSign, Inc. - For authorized use only/VeriSign Trust Network
128
+ # Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority - G2/(c) 1998 VeriSign, Inc. - For authorized use only/VeriSign Trust Network
129
+ # Label: "Verisign Class 3 Public Primary Certification Authority - G2"
130
+ # Serial: 167285380242319648451154478808036881606
131
+ # MD5 Fingerprint: a2:33:9b:4c:74:78:73:d4:6c:e7:c1:f3:8d:cb:5c:e9
132
+ # SHA1 Fingerprint: 85:37:1c:a6:e5:50:14:3d:ce:28:03:47:1b:de:3a:09:e8:f8:77:0f
133
+ # SHA256 Fingerprint: 83:ce:3c:12:29:68:8a:59:3d:48:5f:81:97:3c:0f:91:95:43:1e:da:37:cc:5e:36:43:0e:79:c7:a8:88:63:8b
134
+ -----BEGIN CERTIFICATE-----
135
+ MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
136
+ BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
137
+ c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
138
+ MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
139
+ emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
140
+ DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
141
+ FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMg
142
+ UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
143
+ YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
144
+ MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
145
+ AQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCOFoUgRm1HP9SFIIThbbP4
146
+ pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71lSk8UOg0
147
+ 13gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwID
148
+ AQABMA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSk
149
+ U01UbSuvDV1Ai2TT1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7i
150
+ F6YM40AIOw7n60RzKprxaZLvcRTDOaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpY
151
+ oJ2daZH9
152
+ -----END CERTIFICATE-----
153
+
154
+ # Issuer: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA
155
+ # Subject: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA
156
+ # Label: "GlobalSign Root CA"
157
+ # Serial: 4835703278459707669005204
158
+ # MD5 Fingerprint: 3e:45:52:15:09:51:92:e1:b7:5d:37:9f:b1:87:29:8a
159
+ # SHA1 Fingerprint: b1:bc:96:8b:d4:f4:9d:62:2a:a8:9a:81:f2:15:01:52:a4:1d:82:9c
160
+ # SHA256 Fingerprint: eb:d4:10:40:e4:bb:3e:c7:42:c9:e3:81:d3:1e:f2:a4:1a:48:b6:68:5c:96:e7:ce:f3:c1:df:6c:d4:33:1c:99
161
+ -----BEGIN CERTIFICATE-----
162
+ MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZI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bEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXUad
179
+ DKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME
180
+ HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
181
+ -----END CERTIFICATE-----
182
+
183
+ # Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R2
184
+ # Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R2
185
+ # Label: "GlobalSign Root CA - R2"
186
+ # Serial: 4835703278459682885658125
187
+ # MD5 Fingerprint: 94:14:77:7e:3e:5e:fd:8f:30:bd:41:b0:cf:e7:d0:30
188
+ # SHA1 Fingerprint: 75:e0:ab:b6:13:85:12:27:1c:04:f8:5f:dd:de:38:e4:b7:24:2e:fe
189
+ # SHA256 Fingerprint: ca:42:dd:41:74:5f:d0:b8:1e:b9:02:36:2c:f9:d8:bf:71:9d:a1:bd:1b:1e:fc:94:6f:5b:4c:99:f4:2c:1b:9e
190
+ -----BEGIN CERTIFICATE-----
191
+ MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G
192
+ A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp
193
+ Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1
194
+ MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG
195
+ A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
196
+ hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL
197
+ v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8
198
+ eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq
199
+ tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd
200
+ C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa
201
+ zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB
202
+ mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH
203
+ V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n
204
+ bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG
205
+ 3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs
206
+ J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO
207
+ 291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS
208
+ ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd
209
+ AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
210
+ TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
211
+ -----END CERTIFICATE-----
212
+
213
+ # Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 1 Policy Validation Authority
214
+ # Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 1 Policy Validation Authority
215
+ # Label: "ValiCert Class 1 VA"
216
+ # Serial: 1
217
+ # MD5 Fingerprint: 65:58:ab:15:ad:57:6c:1e:a8:a7:b5:69:ac:bf:ff:eb
218
+ # SHA1 Fingerprint: e5:df:74:3c:b6:01:c4:9b:98:43:dc:ab:8c:e8:6a:81:10:9f:e4:8e
219
+ # SHA256 Fingerprint: f4:c1:49:55:1a:30:13:a3:5b:c7:bf:fe:17:a7:f3:44:9b:c1:ab:5b:5a:0a:e7:4b:06:c2:3b:90:00:4c:01:04
220
+ -----BEGIN CERTIFICATE-----
221
+ MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
222
+ IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
223
+ BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
224
+ aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
225
+ 9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIyMjM0OFoXDTE5MDYy
226
+ NTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
227
+ azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
228
+ YXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
229
+ Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
230
+ cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9Y
231
+ LqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIiGQj4/xEjm84H9b9pGib+
232
+ TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCmDuJWBQ8Y
233
+ TfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0
234
+ LBwGlN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLW
235
+ I8sogTLDAHkY7FkXicnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPw
236
+ nXS3qT6gpf+2SQMT2iLM7XGCK5nPOrf1LXLI
237
+ -----END CERTIFICATE-----
238
+
239
+ # Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 2 Policy Validation Authority
240
+ # Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 2 Policy Validation Authority
241
+ # Label: "ValiCert Class 2 VA"
242
+ # Serial: 1
243
+ # MD5 Fingerprint: a9:23:75:9b:ba:49:36:6e:31:c2:db:f2:e7:66:ba:87
244
+ # SHA1 Fingerprint: 31:7a:2a:d0:7f:2b:33:5e:f5:a1:c3:4e:4b:57:e8:b7:d8:f1:fc:a6
245
+ # SHA256 Fingerprint: 58:d0:17:27:9c:d4:dc:63:ab:dd:b1:96:a6:c9:90:6c:30:c4:e0:87:83:ea:e8:c1:60:99:54:d6:93:55:59:6b
246
+ -----BEGIN CERTIFICATE-----
247
+ MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
248
+ IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
249
+ BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
250
+ aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
251
+ 9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMTk1NFoXDTE5MDYy
252
+ NjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
253
+ azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
254
+ YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
255
+ Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
256
+ cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOnHK5avIWZJV16vY
257
+ dA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl6zfN1SLUzm1NZ9
258
+ WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7RfZHM047QS
259
+ v4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9v
260
+ UJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTu
261
+ IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC
262
+ W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd
263
+ -----END CERTIFICATE-----
264
+
265
+ # Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 3 Policy Validation Authority
266
+ # Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 3 Policy Validation Authority
267
+ # Label: "RSA Root Certificate 1"
268
+ # Serial: 1
269
+ # MD5 Fingerprint: a2:6f:53:b7:ee:40:db:4a:68:e7:fa:18:d9:10:4b:72
270
+ # SHA1 Fingerprint: 69:bd:8c:f4:9c:d3:00:fb:59:2e:17:93:ca:55:6a:f3:ec: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S0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJ
287
+ n0WuPIqpsHEzXcjFV9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/A
288
+ PhmcGcwTTYJBtYze4D1gCCAPRX5ron+jjBXu
289
+ -----END CERTIFICATE-----
290
+
291
+ # Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
292
+ # Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
293
+ # Label: "Verisign Class 3 Public Primary Certification Authority - G3"
294
+ # Serial: 206684696279472310254277870180966723415
295
+ # MD5 Fingerprint: cd:68:b6:a7:c7:c4:ce:75:e0:1d:4f:57:44:61:92:09
296
+ # SHA1 Fingerprint: 13:2d:0d:45:53:4b:69:97:cd:b2:d5:c3:39:e2:55:76:60:9b:5c:c6
297
+ # SHA256 Fingerprint: eb:04:cf:5e:b1:f3:9a:fa:76:2f:2b:b1:20:f2:96:cb:a5:20:c1:b9:7d:b1:58:95:65:b8:1c:b9:a1:7b:72:44
298
+ -----BEGIN CERTIFICATE-----
299
+ MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
300
+ CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
301
+ cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
302
+ LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
303
+ aWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
304
+ dHkgLSBHMzAeFw05OTEwMDEwMDA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t
320
+ TxzhT5yvDwyd93gN2PQ1VoDat20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
321
+ -----END CERTIFICATE-----
322
+
323
+ # Issuer: CN=VeriSign Class 4 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
324
+ # Subject: CN=VeriSign Class 4 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
325
+ # Label: "Verisign Class 4 Public Primary Certification Authority - G3"
326
+ # Serial: 314531972711909413743075096039378935511
327
+ # MD5 Fingerprint: db:c8:f2:27:2e:b1:ea:6a:29:23:5d:fe:56:3e:33:df
328
+ # SHA1 Fingerprint: c8:ec:8c:87:92:69:cb:4b:ab:39:e9:8d:7e:57:67:f3:14:95:73:9d
329
+ # SHA256 Fingerprint: e3:89:36:0d:0f:db:ae:b3:d2:50:58:4b:47:30:31:4e:22:2f:39:c1:56:a0:20:14:4e:8d:96:05:61:79:15:06
330
+ -----BEGIN CERTIFICATE-----
331
+ MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
332
+ CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
333
+ cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
334
+ LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
335
+ aWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
336
+ dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
337
+ VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBA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
+ # Issuer: CN=Entrust.net Secure Server Certification Authority O=Entrust.net OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
356
+ # Subject: CN=Entrust.net Secure Server Certification Authority O=Entrust.net OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
357
+ # Label: "Entrust.net Secure Server CA"
358
+ # Serial: 927650371
359
+ # MD5 Fingerprint: df:f2:80:73:cc:f1:e6:61:73:fc:f5:42:e9:c5:7c:ee
360
+ # SHA1 Fingerprint: 99:a6:9b:e6:1a:fe:88:6b:4d:2b:82:00:7c:b8:54:fc:31:7e:15:39
361
+ # SHA256 Fingerprint: 62:f2:40:27:8c:56:4c:4d:d8:bf:7d:9d:4f:6f:36:6e:a8:94:d2:2f:5f:34:d9:89:a9:83:ac:ec:2f:ff:ed:50
362
+ -----BEGIN CERTIFICATE-----
363
+ MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC
364
+ VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u
365
+ ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc
366
+ KGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5u
367
+ ZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1
368
+ MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UE
369
+ ChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5j
370
+ b3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF
371
+ bnRydXN0Lm5ldCBMaW1pdGVkMTowOA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Ji174z4xRAN
387
+ 95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9n9cd
388
+ 2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI=
389
+ -----END CERTIFICATE-----
390
+
391
+ # Issuer: CN=Entrust.net Certification Authority (2048) O=Entrust.net OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
392
+ # Subject: CN=Entrust.net Certification Authority (2048) O=Entrust.net OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
393
+ # Label: "Entrust.net Premium 2048 Secure Server CA"
394
+ # Serial: 946059622
395
+ # MD5 Fingerprint: ba:21:ea:20:d6:dd:db:8f:c1:57:8b:40:ad:a1:fc:fc
396
+ # SHA1 Fingerprint: 80:1d:62:d0:7b:44:9d:5c:5c:03:5c:98:ea:61:fa:44:3c:2a:58:fe
397
+ # SHA256 Fingerprint: d1:c3:39:ea:27:84:eb:87:0f:93:4f:c5:63:4e:4a:a9:ad:55:05:01:64:01:f2:64:65:d3:7a:57:46:63:35:9f
398
+ -----BEGIN CERTIFICATE-----
399
+ MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML
400
+ RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBp
401
+ bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5
402
+ IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRp
403
+ ZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQxNzUwNTFaFw0xOTEy
404
+ MjQxODIwNTFaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4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3QKw0z2wTR5klAEyt2+z7pnIkPFc4YsIV4IU9rTw76NmfN
421
+ B/L/CNDi3tm/Kq+4h4YhPATKt5Rof8886ZjXOP/swNlQ8C5LWK5Gb9Auw2DaclVy
422
+ vUxFnmG6v4SBkgPR0ml8xQ==
423
+ -----END CERTIFICATE-----
424
+
425
+ # Issuer: CN=Baltimore CyberTrust Root O=Baltimore OU=CyberTrust
426
+ # Subject: CN=Baltimore CyberTrust Root O=Baltimore OU=CyberTrust
427
+ # Label: "Baltimore CyberTrust Root"
428
+ # Serial: 33554617
429
+ # MD5 Fingerprint: ac:b6:94:a5:9c:17:e0:d7:91:52:9b:b1:97:06:a6:e4
430
+ # SHA1 Fingerprint: d4:de:20:d0:5e:66:fc:53:fe:1a:50:88:2c:78:db:28:52:ca:e4:74
431
+ # SHA256 Fingerprint: 16:af:57:a9:f6:76:b0:ab:12:60:95:aa:5e:ba:de:f2:2a:b3:11:19:d6:44:ac:95:cd:4b:93:db:f3:f2:6a:eb
432
+ -----BEGIN CERTIFICATE-----
433
+ MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ
434
+ RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD
435
+ VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX
436
+ DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y
437
+ ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy
438
+ VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr
439
+ mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr
440
+ IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK
441
+ mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu
442
+ XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy
443
+ dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye
444
+ jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1
445
+ BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3
446
+ DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92
447
+ 9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx
448
+ jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0
449
+ Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz
450
+ ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS
451
+ R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
452
+ -----END CERTIFICATE-----
453
+
454
+ # Issuer: CN=Equifax Secure Global eBusiness CA-1 O=Equifax Secure Inc.
455
+ # Subject: CN=Equifax Secure Global eBusiness CA-1 O=Equifax Secure Inc.
456
+ # Label: "Equifax Secure Global eBusiness CA"
457
+ # Serial: 1
458
+ # MD5 Fingerprint: 8f:5d:77:06:27:c4:98:3c:5b:93:78:e7:d7:7d:9b:cc
459
+ # SHA1 Fingerprint: 7e:78:4a:10:1c:82:65:cc:2d:e1:f1:6d:47:b4:40:ca:d9:0a:19:45
460
+ # SHA256 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lKlV
476
+ -----END CERTIFICATE-----
477
+
478
+ # Issuer: CN=Equifax Secure eBusiness CA-1 O=Equifax Secure Inc.
479
+ # Subject: CN=Equifax Secure eBusiness CA-1 O=Equifax Secure Inc.
480
+ # Label: "Equifax Secure eBusiness CA 1"
481
+ # Serial: 4
482
+ # MD5 Fingerprint: 64:9c:ef:2e:44:fc:c6:8f:52:07:d0:51:73:8f:cb:3d
483
+ # SHA1 Fingerprint: da:40:18:8b:91:89:a3:ed:ee:ae:da:97:fe:2f:9d:f5:b7:d1:8a:41
484
+ # SHA256 Fingerprint: cf:56:ff:46:a4:a1:86:10:9d:d9:65:84:b5:ee:b5:8a:51:0c:42:75:b0:e5:f9:4f:40:bb:ae:86:5e:19:f6:73
485
+ -----BEGIN CERTIFICATE-----
486
+ MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEc
487
+ MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBT
488
+ ZWN1cmUgZUJ1c2luZXNzIENBLTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQw
489
+ MDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5j
490
+ LjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENBLTEwgZ8wDQYJ
491
+ KoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ1MRo
492
+ RvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBu
493
+ WqDZQu4aIZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKw
494
+ Env+j6YDAgMBAAGjZjBkMBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTAD
495
+ AQH/MB8GA1UdIwQYMBaAFEp4MlIR21kWNl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRK
496
+ eDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQFAAOBgQB1W6ibAxHm6VZM
497
+ zfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5lSE/9dR+
498
+ WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN
499
+ /Bf+KpYrtWKmpj29f5JZzVoqgrI3eQ==
500
+ -----END CERTIFICATE-----
501
+
502
+ # Issuer: O=Equifax Secure OU=Equifax Secure eBusiness CA-2
503
+ # Subject: O=Equifax Secure OU=Equifax Secure eBusiness CA-2
504
+ # Label: "Equifax Secure eBusiness CA 2"
505
+ # Serial: 930140085
506
+ # MD5 Fingerprint: aa:bf:bf:64:97:da:98:1d:6f:c6:08:3a:95:70:33:ca
507
+ # SHA1 Fingerprint: 39:4f:f6:85:0b:06:be:52:e5:18:56:cc:10:e1:80:e8:82:b3:85:cc
508
+ # SHA256 Fingerprint: 2f:27:4e:48:ab:a4:ac:7b:76:59:33:10:17:75:50:6d:c3:0e:e3:8e:f6:ac:d5:c0:49:32:cf:e0:41:23:42:20
509
+ -----BEGIN CERTIFICATE-----
510
+ MIIDIDCCAomgAwIBAgIEN3DPtTANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
511
+ UzEXMBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2Vj
512
+ dXJlIGVCdXNpbmVzcyBDQS0yMB4XDTk5MDYyMzEyMTQ0NVoXDTE5MDYyMzEyMTQ0
513
+ NVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkVxdWlmYXggU2VjdXJlMSYwJAYD
514
+ VQQLEx1FcXVpZmF4IFNlY3VyZSBlQnVzaW5lc3MgQ0EtMjCBnzANBgkqhkiG9w0B
515
+ AQEFAAOBjQAwgYkCgYEA5Dk5kx5SBhsoNviyoynF7Y6yEb3+6+e0dMKP/wXn2Z0G
516
+ vxLIPw7y1tEkshHe0XMJitSxLJgJDR5QRrKDpkWNYmi7hRsgcDKqQM2mll/EcTc/
517
+ BPO3QSQ5BxoeLmFYoBIL5aXfxavqN3HMHMg3OrmXUqesxWoklE6ce8/AatbfIb0C
518
+ AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEX
519
+ MBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2VjdXJl
520
+ IGVCdXNpbmVzcyBDQS0yMQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTkw
521
+ NjIzMTIxNDQ1WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUUJ4L6q9euSBIplBq
522
+ y/3YIHqngnYwHQYDVR0OBBYEFFCeC+qvXrkgSKZQasv92CB6p4J2MAwGA1UdEwQF
523
+ MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
524
+ A4GBAAyGgq3oThr1jokn4jVYPSm0B482UJW/bsGe68SQsoWou7dC4A8HOd/7npCy
525
+ 0cE+U58DRLB+S/Rv5Hwf5+Kx5Lia78O9zt4LMjTZ3ijtM2vE1Nc9ElirfQkty3D1
526
+ E4qUoSek1nDFbZS1yX2doNLGCEnZZpum0/QL3MUmV+GRMOrN
527
+ -----END CERTIFICATE-----
528
+
529
+ # Issuer: CN=AddTrust Class 1 CA Root O=AddTrust AB OU=AddTrust TTP Network
530
+ # Subject: CN=AddTrust Class 1 CA Root O=AddTrust AB OU=AddTrust TTP Network
531
+ # Label: "AddTrust Low-Value Services Root"
532
+ # Serial: 1
533
+ # MD5 Fingerprint: 1e:42:95:02:33:92:6b:b9:5f:c0:7f:da:d6:b2:4b:fc
534
+ # SHA1 Fingerprint: cc:ab:0e:a0:4c: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Af8E
550
+ BTADAQH/MIGPBgNVHSMEgYcwgYSAFJWxtPCUtr3H2tERCSG+wa9J/RB7oWmkZzBl
551
+ MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFk
552
+ ZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENB
553
+ IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBACxtZBsfzQ3duQH6lmM0MkhHma6X
554
+ 7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0PhiVYrqW9yTkkz
555
+ 43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY
556
+ eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJl
557
+ pz/+0WatC7xrmYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOA
558
+ WiFeIc9TVPC6b4nbqKqVz4vjccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk=
559
+ -----END CERTIFICATE-----
560
+
561
+ # Issuer: CN=AddTrust External CA Root O=AddTrust AB OU=AddTrust External TTP Network
562
+ # Subject: CN=AddTrust External CA Root O=AddTrust AB OU=AddTrust External TTP Network
563
+ # Label: "AddTrust External Root"
564
+ # Serial: 1
565
+ # MD5 Fingerprint: 1d:35:54:04:85:78:b0:3f:42:42:4d:bf:20:73:0a:3f
566
+ # SHA1 Fingerprint: 02:fa:f3:e2:91:43:54:68:60:78:57:69:4d:f5:e4:5b:68:85:18:68
567
+ # SHA256 Fingerprint: 68:7f:a4:51:38:22:78:ff:f0:c8:b1:1f:8d:43:d5:76:67:1c:6e:b2:bc:ea:b4:13:fb:83:d9:65:d0:6d:2f:f2
568
+ -----BEGIN CERTIFICATE-----
569
+ MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9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x
585
+ IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN
586
+ AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH
587
+ YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
588
+ 6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
589
+ Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
590
+ c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
591
+ mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
592
+ -----END CERTIFICATE-----
593
+
594
+ # Issuer: CN=AddTrust Public CA Root O=AddTrust AB OU=AddTrust TTP Network
595
+ # Subject: CN=AddTrust Public CA Root O=AddTrust AB OU=AddTrust TTP Network
596
+ # Label: "AddTrust Public Services Root"
597
+ # Serial: 1
598
+ # MD5 Fingerprint: c1:62:3e:23:c5:82:73:9c:03:59:4b:2b:e9:77:49:7f
599
+ # SHA1 Fingerprint: 2a:b6:28:48:5e:78:fb:f3:ad:9e:79:10:dd:6b:df:99:72:2c:96:e5
600
+ # SHA256 Fingerprint: 07:91:ca:07:49:b2:07:82:aa:d3:c7:d7:bd:0c:df:c9:48:58:35:84:3e:b2:d7:99:60:09:ce:43:ab:6c:69:27
601
+ -----BEGIN CERTIFICATE-----
602
+ MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEU
603
+ MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
604
+ b3JrMSAwHgYDVQQDExdBZGRUcnVzdCBQdWJsaWMgQ0EgUm9vdDAeFw0wMDA1Mz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zfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao
621
+ GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh
622
+ 4SINhwBk/ox9Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQm
623
+ XiLsks3/QppEIW1cxeMiHV9HEufOX1362KqxMy3ZdvJOOjMMK7MtkAY=
624
+ -----END CERTIFICATE-----
625
+
626
+ # Issuer: CN=AddTrust Qualified CA Root O=AddTrust AB OU=AddTrust TTP Network
627
+ # Subject: CN=AddTrust Qualified CA Root O=AddTrust AB OU=AddTrust TTP Network
628
+ # Label: "AddTrust Qualified Certificates Root"
629
+ # Serial: 1
630
+ # MD5 Fingerprint: 27:ec:39:47:cd:da:5a:af:e2:9a:01:65:21:a9:4c:bb
631
+ # SHA1 Fingerprint: 4d:23:78:ec:91:95:39:b5:00:7f:75:8f:03:3b:21:1e:c5:4d:8b:cf
632
+ # SHA256 Fingerprint: 80:95:21:08:05:db:4b:bc:35:5e:44:28:d8:fd:6e:c2:cd:e3:ab:5f:b9:7a:99:42:98:8e:b8:f4:dc:d0:60:16
633
+ -----BEGIN CERTIFICATE-----
634
+ MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEU
635
+ MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
636
+ b3JrMSMwIQYDVQQDExpBZGRUcnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1
637
+ MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcxCzAJBgNVBAYTAlNFMRQwEgYDVQQK
638
+ EwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5ldHdvcmsxIzAh
639
+ BgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQ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ad9Jjzc9Y
655
+ iQBCYz95OdBEsIJuQRno3eDBiFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5no
656
+ xqE=
657
+ -----END CERTIFICATE-----
658
+
659
+ # Issuer: CN=Entrust Root Certification Authority O=Entrust, Inc. OU=www.entrust.net/CPS is incorporated by reference/(c) 2006 Entrust, Inc.
660
+ # Subject: CN=Entrust Root Certification Authority O=Entrust, Inc. OU=www.entrust.net/CPS is incorporated by reference/(c) 2006 Entrust, Inc.
661
+ # Label: "Entrust Root Certification Authority"
662
+ # Serial: 1164660820
663
+ # MD5 Fingerprint: d6:a5:c3:ed:5d:dd:3e:00:c1:3d:87:92:1f:1d:3f:e4
664
+ # SHA1 Fingerprint: b3:1e:b1:b7:40:e3:6c:84:02:da:dc:37:d4:4d:f5:d4:67:49:52:f9
665
+ # SHA256 Fingerprint: 73:c1:76:43:4f:1b:c6:d5:ad:f4:5b:0e:76:e7:27:28:7c:8d:e5:76:16:c1:e6:e6:14:1a:2b:2c:bc:7d:8e:4c
666
+ -----BEGIN CERTIFICATE-----
667
+ MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMC
668
+ VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0
669
+ Lm5ldC9DUFMgaXMgaW5jb3Jwb3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMW
670
+ KGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsGA1UEAxMkRW50cnVzdCBSb290IENl
671
+ cnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0MloXDTI2MTEyNzIw
672
+ NTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMTkw
673
+ NwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSBy
674
+ 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vKqsnyrQ/39/2n3qse0wJcGE2jTSW3iDVuycNsMm4hH2Z0kdkquM++v/
690
+ eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0tHuu2guQOHXvgR1m
691
+ 0vdXcDazv/wor3ElhVsT/h5/WrQ8
692
+ -----END CERTIFICATE-----
693
+
694
+ # Issuer: CN=GeoTrust Global CA O=GeoTrust Inc.
695
+ # Subject: CN=GeoTrust Global CA O=GeoTrust Inc.
696
+ # Label: "GeoTrust Global CA"
697
+ # Serial: 144470
698
+ # MD5 Fingerprint: f7:75:ab:29:fb:51:4e:b7:77:5e:ff:05:3c:99:8e:f5
699
+ # SHA1 Fingerprint: de:28:f4:a4:ff:e5:b9:2f:a3:c5:03:d1:a3:49:a7:f9:96:2a:82:12
700
+ # SHA256 Fingerprint: ff:85:6a:2d:25:1d:cd:88:d3:66:56:f4:50:12:67:98:cf:ab:aa:de:40:79:9c:72:2d:e4:d2:b5:db:36:a7:3a
701
+ -----BEGIN CERTIFICATE-----
702
+ MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
703
+ MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
704
+ YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
705
+ EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
706
+ R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
707
+ 9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
708
+ fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
709
+ iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
710
+ 1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
711
+ bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
712
+ MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
713
+ ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
714
+ uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
715
+ Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
716
+ tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
717
+ PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
718
+ hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
719
+ 5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
720
+ -----END CERTIFICATE-----
721
+
722
+ # Issuer: CN=GeoTrust Global CA 2 O=GeoTrust Inc.
723
+ # Subject: CN=GeoTrust Global CA 2 O=GeoTrust Inc.
724
+ # Label: "GeoTrust Global CA 2"
725
+ # Serial: 1
726
+ # MD5 Fingerprint: 0e:40:a7:6c:de:03:5d:8f:d1:0f:e4:d1:8d:f9:6c:a9
727
+ # SHA1 Fingerprint: a9:e9:78:08:14:37:58:88:f2:05:19:b0:6d:2b:0d:2b:60:16:90:7d
728
+ # SHA256 Fingerprint: ca:2d:82:a0:86:77:07:2f:8a:b6:76:4f:f0:35:67:6c:fe:3e:5e:32:5e:01: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G5FntvRdOW2TF9AjYPnDtuzywN
745
+ A0ZF66D0f0hExghAzN4bcLUprbqLOzRldRtxIR0sFAqwlpW41uryZfspuk/qkZN0
746
+ abby/+Ea0AzRdoXLiiW9l14sbxWZJue2Kf8i7MkCx1YAzUm5s2x7UwQa4qjJqhIF
747
+ I8LO57sEAszAR6LkxCkvW0VXiVHuPOtSCP8HNR6fNWpHSlaY0VqFH4z1Ir+rzoPz
748
+ 4iIprn2DQKi6bA==
749
+ -----END CERTIFICATE-----
750
+
751
+ # Issuer: CN=GeoTrust Universal CA O=GeoTrust Inc.
752
+ # Subject: CN=GeoTrust Universal CA O=GeoTrust Inc.
753
+ # Label: "GeoTrust Universal CA"
754
+ # Serial: 1
755
+ # MD5 Fingerprint: 92:65:58:8b:a2:1a:31:72:73:68:5c:b4:a5:7a:07:48
756
+ # SHA1 Fingerprint: e6:21:f3:35:43:79:05:9a:4b:68:30:9d:8a:2f:74:22:15:87:ec:79
757
+ # SHA256 Fingerprint: a0:45:9b:9f:63:b2:25:59:f5:fa:5d:4c:6d:b3:f9:f7:2f:f1:93:42:03:35:78:f0:73:bf:1d:1b:46:cb:b9:12
758
+ -----BEGIN CERTIFICATE-----
759
+ MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEW
760
+ MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVy
761
+ c2FsIENBMB4XDTA0MDMwNDA1MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UE
762
+ BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xHjAcBgNVBAMTFUdlb1RydXN0
763
+ IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKYV
764
+ VaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9tJPi8
765
+ cQGeBvV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Vi+QTjruXU8FdmbyUqDWcDaU/0z
781
+ uzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsKxr2EoyNB3tZ3b4XUhRxQ4K5RirqN
782
+ Pnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxFKyDuSN/n3QmOGKja
783
+ QI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2DFKW
784
+ koRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9
785
+ ER/frslKxfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQt
786
+ DF4JbAiXfKM9fJP/P6EUp8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/Sfuvm
787
+ bJxPgWp6ZKy7PtXny3YuxadIwVyQD8vIP/rmMuGNG2+k5o7Y+SlIis5z/iw=
788
+ -----END CERTIFICATE-----
789
+
790
+ # Issuer: CN=GeoTrust Universal CA 2 O=GeoTrust Inc.
791
+ # Subject: CN=GeoTrust Universal CA 2 O=GeoTrust Inc.
792
+ # Label: "GeoTrust Universal CA 2"
793
+ # Serial: 1
794
+ # MD5 Fingerprint: 34:fc:b8:d0:36:db:9e:14:b3:c2:f2:db:8f:e4:94:c7
795
+ # SHA1 Fingerprint: 37:9a:19:7b:41:85:45:35:0c:a6:03:69:f3:3c:2e:af:47:4f:20:79
796
+ # SHA256 Fingerprint: a0:23:4f:3b:c8:52:7c:a5:62:8e:ec:81:ad:5d:69:89:5d:a5:68:0d:c9:1d:1c:b8:47:7f:33:f8:78:b9:5b:0b
797
+ -----BEGIN CERTIFICATE-----
798
+ MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEW
799
+ MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVy
800
+ c2FsIENBIDIwHhcNMDQ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BgNVHQ8BAf8EBAMCAYYwDQYJ
816
+ KoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z
817
+ dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQ
818
+ L1EuxBRa3ugZ4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgr
819
+ Fg5fNuH8KrUwJM/gYwx7WBr+mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSo
820
+ ag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpqA1Ihn0CoZ1Dy81of398j9tx4TuaY
821
+ T1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpgY+RdM4kX2TGq2tbz
822
+ GDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiPpm8m
823
+ 1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJV
824
+ OCiNUW7dFGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH
825
+ 6aLcr34YEoP9VhdBLtUpgn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwX
826
+ QMAJKOSLakhT2+zNVVXxxvjpoixMptEmX36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
827
+ -----END CERTIFICATE-----
828
+
829
+ # Issuer: CN=America Online Root Certification Authority 1 O=America Online Inc.
830
+ # Subject: CN=America Online Root Certification Authority 1 O=America Online Inc.
831
+ # Label: "America Online Root Certification Authority 1"
832
+ # Serial: 1
833
+ # MD5 Fingerprint: 14:f1:08:ad:9d:fa:64:e2:89:e7:1c:cf:a8:ad:7d:5e
834
+ # SHA1 Fingerprint: 39:21:c1:15:c1:5d:0e:ca:5c:cb:5b:c4:f0:7d:21:d8:05:0b:56:6a
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H/BAQDAgGGMA0GCSqGSIb3DQEB
851
+ BQUAA4IBAQB8itEfGDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkF
852
+ Zu90821fnZmv9ov761KyBZiibyrFVL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAb
853
+ LjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft3OJvx8Fi8eNy1gTIdGcL+oir
854
+ oQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43gKd8hdIaC2y+C
855
+ MMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds
856
+ sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7
857
+ -----END CERTIFICATE-----
858
+
859
+ # Issuer: CN=America Online Root Certification Authority 2 O=America Online Inc.
860
+ # Subject: CN=America Online Root Certification Authority 2 O=America Online Inc.
861
+ # Label: "America Online Root Certification Authority 2"
862
+ # Serial: 1
863
+ # MD5 Fingerprint: d6:ed:3c:ca:e2:66:0f:af:10:43:0d:77:9b:04:09:bf
864
+ # SHA1 Fingerprint: 85:b5:ff:67:9b:0c:79:96:1f:c8:6e:44:22:00:46:13:db:17:92:84
865
+ # SHA256 Fingerprint: 7d:3b:46:5a:60:14:e5:26:c0:af:fc:ee:21:27:d2:31:17:27:ad:81:1c:26:84:2d:00:6a:f3:73:06:cc:80:bd
866
+ -----BEGIN CERTIFICATE-----
867
+ MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEc
868
+ MBoGA1UEChMTQW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBP
869
+ bmxpbmUgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2
870
+ MDAwMFoXDTM3MDkyOTE0MDgwMFowYzELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0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AOCAgEAZ2sGuV9FOypLM7PmG2tZTiLMubekJcmn
887
+ xPBUlgtk87FYT15R/LKXeydlwuXK5w0MJXti4/qftIe3RUavg6WXSIylvfEWK5t2
888
+ LHo1YGwRgJfMqZJS5ivmae2p+DYtLHe/YUjRYwu5W1LtGLBDQiKmsXeu3mnFzccc
889
+ obGlHBD7GL4acN3Bkku+KVqdPzW+5X1R+FXgJXUjhx5c3LqdsKyzadsXg8n33gy8
890
+ CNyRnqjQ1xU3c6U1uPx+xURABsPr+CKAXEfOAuMRn0T//ZoyzH1kUQ7rVyZ2OuMe
891
+ IjzCpjbdGe+n/BLzJsBZMYVMnNjP36TMzCmT/5RtdlwTCJfy7aULTd3oyWgOZtMA
892
+ DjMSW7yV5TKQqLPGbIOtd+6Lfn6xqavT4fG2wLHqiMDn05DpKJKUe2h7lyoKZy2F
893
+ AjgQ5ANh1NolNscIWC2hp1GvMApJ9aZphwctREZ2jirlmjvXGKL8nDgQzMY70rUX
894
+ Om/9riW99XJZZLF0KjhfGEzfz3EEWjbUvy+ZnOjZurGV5gJLIaFb1cFPj65pbVPb
895
+ AZO1XB4Y3WRayhgoPmMEEf0cjQAPuDffZ4qdZqkCapH/E8ovXYO8h5Ns3CRRFgQl
896
+ Zvqz2cK6Kb6aSDiCmfS/O0oxGfm/jiEzFMpPVF/7zvuPcX/9XhmgD0uRuMRUvAaw
897
+ RY8mkaKO/qk=
898
+ -----END CERTIFICATE-----
899
+
900
+ # Issuer: CN=AAA Certificate Services O=Comodo CA Limited
901
+ # Subject: CN=AAA Certificate Services O=Comodo CA Limited
902
+ # Label: "Comodo AAA Services root"
903
+ # Serial: 1
904
+ # MD5 Fingerprint: 49:79:04:b0:eb:87:19:ac:47:b0:bc:11:51:9b:74:d0
905
+ # SHA1 Fingerprint: d1:eb:23:a4:6d:17:d6:8f:d9:25:64:c2:f1:f1:60:17:64:d8:e3:49
906
+ # SHA256 Fingerprint: d7:a7:a0:fb:5d:7e:27:31:d7:71:e9:48:4e:b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DVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20v
923
+ QUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t
924
+ b2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF
925
+ AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q
926
+ GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
927
+ Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2
928
+ G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi
929
+ l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3
930
+ smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
931
+ -----END CERTIFICATE-----
932
+
933
+ # Issuer: CN=Secure Certificate Services O=Comodo CA Limited
934
+ # Subject: CN=Secure Certificate Services O=Comodo CA Limited
935
+ # Label: "Comodo Secure Services root"
936
+ # Serial: 1
937
+ # MD5 Fingerprint: d3:d9:bd:ae:9f:ac:67:24:b3:c8:1b:52:e1:b9:a9:bd
938
+ # SHA1 Fingerprint: 4a:65:d5:f4:1d:ef:39:b8:b8:90:4a:4a:d3:64:81:33:cf:c7:a1:d1
939
+ # SHA256 Fingerprint: bd:81:ce:3b:4f:65:91:d1:1a:67:b5:fc:7a:47:fd:ef:25:52:1b:f9:aa:4e:18:b9:e3:df:2e:34:a7:80:3b:e8
940
+ -----BEGIN CERTIFICATE-----
941
+ MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEb
942
+ MBkGA1UECAwSR3JlYXRlciB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GlmaWNhdGVTZXJ2aWNlcy5jcmww
958
+ DQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm4J4oqF7Tt/Q0
959
+ 5qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmj
960
+ Z55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtI
961
+ gKvcnDe4IRRLDXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJ
962
+ aD61JlfutuC23bkpgHl9j6PwpCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDl
963
+ izeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1HRR3B7Hzs/Sk=
964
+ -----END CERTIFICATE-----
965
+
966
+ # Issuer: CN=Trusted Certificate Services O=Comodo CA Limited
967
+ # Subject: CN=Trusted Certificate Services O=Comodo CA Limited
968
+ # Label: "Comodo Trusted Services root"
969
+ # Serial: 1
970
+ # MD5 Fingerprint: 91:1b:3f:6e:cd:9e:ab:ee:07:fe:1f:71:d2:b3:61:27
971
+ # SHA1 Fingerprint: e1:9f:e3:0e:8b:84:60:9e:80:9b:17:0d:72:a8:c5:ba:6e:14:09:bd
972
+ # SHA256 Fingerprint: 3f:06:e5:56:81:d4:96:f5:be:16:9e:b5:38:9f:9f:2b:8f:f6:1e:17:08:df:68:81:72:48:49:cd:5d:27:cb:69
973
+ -----BEGIN CERTIFICATE-----
974
+ MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEb
975
+ MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
976
+ GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0
977
+ aWZpY2F0ZSBTZXJ2aWNlczAeFw0wNDAxMDEw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xBvzwGa+RZzG0Q8ZZvH9/0BAKkn0U+yNj6NkZEUD+Cl5EfKNsYEYwq5GWDVxIS
994
+ jBc/lDb+XbDABHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+
995
+ xqFx7D+gIIxmOom0jtTYsU0lR+4viMi14QVFwL4Ucd56/Y57fU0IlqUSc/Atyjcn
996
+ dBInTMu2l+nZrghtWjlA3QVHdWpaIbOjGM9O9y5Xt5hwXsjEeLBi
997
+ -----END CERTIFICATE-----
998
+
999
+ # Issuer: CN=UTN - DATACorp SGC O=The USERTRUST Network OU=http://www.usertrust.com
1000
+ # Subject: CN=UTN - DATACorp SGC O=The USERTRUST Network OU=http://www.usertrust.com
1001
+ # Label: "UTN DATACorp SGC Root CA"
1002
+ # Serial: 91374294542884689855167577680241077609
1003
+ # MD5 Fingerprint: b3:a5:3e:77:21:6d:ac:4a:c0:c9:fb:d5:41:3d:ca:06
1004
+ # SHA1 Fingerprint: 58:11:9f:0e:12:82:87:ea:50:fd:d9:87:45:6f:4f:78:dc:fa:d6:d4
1005
+ # SHA256 Fingerprint: 85:fb:2f:91:dd:12:27:5a:01:45:b6:36:53:4f:84:02:4a:d6:8b:69:b8:ee:88:68:4f:f7:11:37:58:05:b3:48
1006
+ -----BEGIN CERTIFICATE-----
1007
+ MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCB
1008
+ kzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
1009
+ Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
1010
+ dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZBgNVBAMTElVUTiAtIERBVEFDb3Jw
1011
+ IFNHQzAeFw05OTA2MjQxODU3MjFaFw0xOTA2MjQxOTA2MzBaMIGTMQswCQYDVQQG
1012
+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gqgHf35g+FFCgMSa9KOlaMCZ1+XtgHI3zzVAmbQQnmt/VDUVH
1028
+ KWss5nbZqSl9Mt3JNjy9rjXxEZ4du5A/EkdOjtd+D2JzHVImOBwYSf0wdJrE5SIv
1029
+ 2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwPDPafepE39peC4N1xaf92P2BNPM/3
1030
+ mfnGV/TJVTl4uix5yaaIK/QI
1031
+ -----END CERTIFICATE-----
1032
+
1033
+ # Issuer: CN=UTN-USERFirst-Hardware O=The USERTRUST Network OU=http://www.usertrust.com
1034
+ # Subject: CN=UTN-USERFirst-Hardware O=The USERTRUST Network OU=http://www.usertrust.com
1035
+ # Label: "UTN USERFirst Hardware Root CA"
1036
+ # Serial: 91374294542884704022267039221184531197
1037
+ # MD5 Fingerprint: 4c:56:41:e5:0d:bb:2b:e8:ca:a3:ed:18:08:ad:43:39
1038
+ # SHA1 Fingerprint: 04:83:ed:33:99:ac:36:08:05:87:22:ed:bc:5e:46:00:e3:be:f9:d7
1039
+ # SHA256 Fingerprint: 6e:a5:47:41:d0:04:66:7e:ed:1b:48:16:63:4a:a3:a7:9e:6e:4b:96:95:0f:82:79:da:fc:8d:9b:d8:81:21:37
1040
+ -----BEGIN CERTIFICATE-----
1041
+ MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCB
1042
+ lzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
1043
+ Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
1044
+ dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3Qt
1045
+ SGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgxOTIyWjCBlzELMAkG
1046
+ A1UEBhMCVVMxCzAJBgNVBAgTAlVUM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Ojg6FEgSxvunOxqNDYJAB+gE
1062
+ CJChicsZUN/KHAG8HQQZexB2lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t
1063
+ 3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kniCrVWFCVH/A7HFe7fRQ5YiuayZSS
1064
+ KqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67nfhmqA==
1065
+ -----END CERTIFICATE-----
1066
+
1067
+ # Issuer: CN=XRamp Global Certification Authority O=XRamp Security Services Inc OU=www.xrampsecurity.com
1068
+ # Subject: CN=XRamp Global Certification Authority O=XRamp Security Services Inc OU=www.xrampsecurity.com
1069
+ # Label: "XRamp Global CA Root"
1070
+ # Serial: 107108908803651509692980124233745014957
1071
+ # MD5 Fingerprint: a1:0b:44:b3:ca:10:d8:00:6e:9d:0f:d8:0f:92:0a:d1
1072
+ # SHA1 Fingerprint: b8:01:86:d1:eb:9c:86:a5:41:04:cf:30:54:f3:4c:52:b7:e5:58:c6
1073
+ # SHA256 Fingerprint: ce:cd:dc:90:50:99:d8:da:df:c5:b1:d2:09:b7:37:cb:e2:c1:8c:fb:2c:10:c0:ff:0b:cf:0d:32:86:fc:1a:a2
1074
+ -----BEGIN CERTIFICATE-----
1075
+ MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCB
1076
+ gjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEk
1077
+ MCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRY
1078
+ UmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQxMTAxMTcx
1079
+ NDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3
1080
+ dy54cmFtcHNlY3VyaXR5LmNvbTEkM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QTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSy
1096
+ i6mx5O+aGtA9aZnuqCij4Tyz8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQ
1097
+ O+7ETPTsJ3xCwnR8gooJybQDJbw=
1098
+ -----END CERTIFICATE-----
1099
+
1100
+ # Issuer: O=The Go Daddy Group, Inc. OU=Go Daddy Class 2 Certification Authority
1101
+ # Subject: O=The Go Daddy Group, Inc. OU=Go Daddy Class 2 Certification Authority
1102
+ # Label: "Go Daddy Class 2 CA"
1103
+ # Serial: 0
1104
+ # MD5 Fingerprint: 91:de:06:25:ab:da:fd:32:17:0c:bb:25:17:2a:84:67
1105
+ # SHA1 Fingerprint: 27:96:ba:e6:3f:18:01:e2:77:26:1b:a0:d7:77:70:02:8f:20:ee:e4
1106
+ # SHA256 Fingerprint: c3:84:6b:f2:4b:9e:93:ca:64:27:4c:0e:c6:7c:1e:cc:5e:02:4f:fc:ac:d2:d7:40:19:35:0e:81:fe:54:6a:e4
1107
+ -----BEGIN CERTIFICATE-----
1108
+ MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEh
1109
+ MB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBE
1110
+ YWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3
1111
+ MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkGA1UEBhMCVVMxITAfBgNVBAoTGFRo
1112
+ ZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28gRGFkZHkgQ2xhc3Mg
1113
+ MiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQADggEN
1114
+ ADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCA
1115
+ PVYYYwhv2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6w
1116
+ wdhFJ2+qN1j3hybX2C32qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXi
1117
+ EqITLdiOr18SPaAIBQi2XKVlOARFmR6jYGB0xUGlcmIbYsUfb18aQr4CUWWoriMY
1118
+ avx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmYvLEHZ6IVDd2gWMZEewo+
1119
+ YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0OBBYEFNLE
1120
+ sNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h
1121
+ /t2oatTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5
1122
+ IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmlj
1123
+ YXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
1124
+ ggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wimPQoZ+YeAEW5p5JYXMP80kWNy
1125
+ OO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7P
1126
+ TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
1127
+ HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER
1128
+ dEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf
1129
+ ReYNnyicsbkqWletNw+vHX/bvZ8=
1130
+ -----END CERTIFICATE-----
1131
+
1132
+ # Issuer: O=Starfield Technologies, Inc. OU=Starfield Class 2 Certification Authority
1133
+ # Subject: O=Starfield Technologies, Inc. OU=Starfield Class 2 Certification Authority
1134
+ # Label: "Starfield Class 2 CA"
1135
+ # Serial: 0
1136
+ # MD5 Fingerprint: 32:4a:4b:bb:c8:63:69:9b:be:74:9a:c6:dd:1d:46:24
1137
+ # SHA1 Fingerprint: ad:7e:1c:28:b0:64:ef:8f:60:03:40:20:14:c3:d0:e3:37:0e:b5:8a
1138
+ # SHA256 Fingerprint: 14:65:fa:20:53:97:b8:76:fa:a6:f0:a9:95:8e:55:90:e4:0f:cc:7f:aa:4f:b7:c2:c8:67:75:21:fb:5f:b6:58
1139
+ -----BEGIN CERTIFICATE-----
1140
+ MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl
1141
+ MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp
1142
+ U3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQw
1143
+ NjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UE
1144
+ ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZp
1145
+ ZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqGSIb3
1146
+ DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf
1147
+ 8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN
1148
+ +lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0
1149
+ X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa
1150
+ K4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA
1151
+ 1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G
1152
+ A1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fR
1153
+ zt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0
1154
+ YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBD
1155
+ bGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8w
1156
+ DQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1epoXkJKtv3
1157
+ L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D
1158
+ eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
1159
+ xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp
1160
+ VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY
1161
+ WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q=
1162
+ -----END CERTIFICATE-----
1163
+
1164
+ # Issuer: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
1165
+ # Subject: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
1166
+ # Label: "StartCom Certification Authority"
1167
+ # Serial: 1
1168
+ # MD5 Fingerprint: 22:4d:8f:8a:fc:f7:35:c2:bb:57:34:90:7b:8b:22:16
1169
+ # SHA1 Fingerprint: 3e:2b:f7:f2:03:1b:96:f3:8c:e6:c4:d8:a8:5d:3e:2d:58:47:6a:0f
1170
+ # SHA256 Fingerprint: c7:66:a9:be:f2:d4:07:1c:86:3a:31:aa:49:20:e8:13:b2:d1:98:60:8c:b7:b7:cf:e2:11:43:b8:36:df:09:ea
1171
+ -----BEGIN CERTIFICATE-----
1172
+ MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEW
1173
+ MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg
1174
+ Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh
1175
+ dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM2WhcNMzYwOTE3MTk0NjM2WjB9
1176
+ MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMi
1177
+ U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh
1178
+ cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA
1179
+ A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk
1180
+ pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf
1181
+ OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/C
1182
+ Ji/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/deMotHweXMAEtcnn6RtYT
1183
+ Kqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt2PZE4XNi
1184
+ HzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMM
1185
+ Av+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+ bGFibGUgYXQgaHR0cDovL2NlcnQuc3RhcnRjb20ub3JnL3BvbGljeS5wZGYwEQYJ
1201
+ YIZIAYb4QgEBBAQDAgAHMDgGCWCGSAGG+EIBDQQrFilTdGFydENvbSBGcmVlIFNT
1202
+ TCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQUFAAOCAgEAFmyZ
1203
+ 9GYMNPXQhV59CuzaEE44HF7fpiUFS5Eyweg78T3dRAlbB0mKKctmArexmvclmAk8
1204
+ jhvh3TaHK0u7aNM5Zj2gJsfyOZEdUauCe37Vzlrk4gNXcGmXCPleWKYK34wGmkUW
1205
+ FjgKXlf2Ysd6AgXmvB618p70qSmD+LIU424oh0TDkBreOKk8rENNZEXO3SipXPJz
1206
+ ewT4F+irsfMuXGRuczE6Eri8sxHkfY+BUZo7jYn0TZNmezwD7dOaHZrzZVD1oNB1
1207
+ ny+v8OqCQ5j4aZyJecRDjkZy42Q2Eq/3JR44iZB3fsNrarnDy0RLrHiQi+fHLB5L
1208
+ EUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZEoalHmdkrQYu
1209
+ L6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq
1210
+ yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuC
1211
+ O3NJo2pXh5Tl1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6V
1212
+ um0ABj6y6koQOdjQK/W/7HW/lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkySh
1213
+ NOsF/5oirpt9P/FlUQqmMGqz9IgcgA38corog14=
1214
+ -----END CERTIFICATE-----
1215
+
1216
+ # Issuer: CN=DigiCert Assured ID Root CA O=DigiCert Inc OU=www.digicert.com
1217
+ # Subject: CN=DigiCert Assured ID Root CA O=DigiCert Inc OU=www.digicert.com
1218
+ # Label: "DigiCert Assured ID Root CA"
1219
+ # Serial: 17154717934120587862167794914071425081
1220
+ # MD5 Fingerprint: 87:ce:0b:7b:2a:0e:49:00:e1:58:71:9b:37:a8:93:72
1221
+ # SHA1 Fingerprint: 05:63:b8:63:0d:62:d7:5a:bb:c8:ab:1e:4b:df:b5:a8:99:b2:4d:43
1222
+ # SHA256 Fingerprint: 3e:90:99:b5:01:5e:8f:48:6c:00:bc:ea:9d:11:1e:e7:21:fa:ba:35:5a:89:bc:f1:df:69:56:1e:3d:c6:32:5c
1223
+ -----BEGIN CERTIFICATE-----
1224
+ MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBl
1225
+ MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
1226
+ d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJv
1227
+ b3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzExMTEwMDAwMDAwWjBlMQswCQYDVQQG
1228
+ EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNl
1229
+ cnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwggEi
1230
+ MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7c
1231
+ JpSIqvTO9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYP
1232
+ mDI2dsze3Tyoou9q+yHyUmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+
1233
+ wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4
1234
+ VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpyoeb6pNnVFzF1roV9Iq4/
1235
+ AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whfGHdPAgMB
1236
+ AAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW
1237
+ BBRF66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
1238
+ pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRC
1239
+ dWKuh+vy1dneVrOfzM4UKLkNl2BcEkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTf
1240
+ fwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38FnSbNd67IJKusm7Xi+fT8r87cm
1241
+ NW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i8b5QZ7dsvfPx
1242
+ H2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe
1243
+ +o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g==
1244
+ -----END CERTIFICATE-----
1245
+
1246
+ # Issuer: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com
1247
+ # Subject: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com
1248
+ # Label: "DigiCert Global Root CA"
1249
+ # Serial: 10944719598952040374951832963794454346
1250
+ # MD5 Fingerprint: 79:e4:a9:84:0d:7d:3a:96:d7:c0:4f:e2:43:4c:89:2e
1251
+ # SHA1 Fingerprint: a8:98:5d:3a:65:e5:e5:c4:b2:d7:d6:6d:40:c6:dd:2f:b1:9c:54:36
1252
+ # SHA256 Fingerprint: 43:48:a0:e9:44:4c:78:cb:26:5e:05:8d:5e:89:44:b4:d8:4f:96:62:bd:26:db:25:7f:89:34:a4:43:c7:01:61
1253
+ -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Esr
1269
+ hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg
1270
+ 06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF
1271
+ PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls
1272
+ YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
1273
+ CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
1274
+ -----END CERTIFICATE-----
1275
+
1276
+ # Issuer: CN=DigiCert High Assurance EV Root CA O=DigiCert Inc OU=www.digicert.com
1277
+ # Subject: CN=DigiCert High Assurance EV Root CA O=DigiCert Inc OU=www.digicert.com
1278
+ # Label: "DigiCert High Assurance EV Root CA"
1279
+ # Serial: 3553400076410547919724730734378100087
1280
+ # MD5 Fingerprint: d4:74:de:57:5c:39:b2:d3:9c:85:83:c5:c0:65:49:8a
1281
+ # SHA1 Fingerprint: 5f:b7:ee:06:33:e2:59:db:ad:0c:4c:9a:e6:d3:8f:1a:61:c7:dc:25
1282
+ # SHA256 Fingerprint: 74:31:e5:f4:c3:c1:ce:46:90:77:4f:0b:61:e0:54:40:88:3b:a9:a0:1e:d0:0b:a6:ab:d7:80:6e:d3:b1:18:cf
1283
+ -----BEGIN CERTIFICATE-----
1284
+ MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs
1285
+ MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
1286
+ d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j
1287
+ ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL
1288
+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S+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep
1304
+ +OkuE6N36B9K
1305
+ -----END CERTIFICATE-----
1306
+
1307
+ # Issuer: CN=GeoTrust Primary Certification Authority O=GeoTrust Inc.
1308
+ # Subject: CN=GeoTrust Primary Certification Authority O=GeoTrust Inc.
1309
+ # Label: "GeoTrust Primary Certification Authority"
1310
+ # Serial: 32798226551256963324313806436981982369
1311
+ # MD5 Fingerprint: 02:26:c3:01:5e:08:30:37:43:a9:d0:7d:cf:37:e6:bf
1312
+ # SHA1 Fingerprint: 32:3c:11:8e:1b:f7:b8:b6:52:54:e2:e2:10:0d:d6:02:90:37:f0:96
1313
+ # SHA256 Fingerprint: 37:d5:10:06:c5:12:ea:ab:62:64:21:f1:ec:8c:92:01:3f:c5:f8:2a:e9:8e:e5:33:eb:46:19:b8:de:b4:d0:6c
1314
+ -----BEGIN CERTIFICATE-----
1315
+ MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBY
1316
+ MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMo
1317
+ R2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEx
1318
+ MjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgxCzAJBgNVBAYTAlVTMRYwFAYDVQQK
1319
+ Ew1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQcmltYXJ5IENlcnRp
1320
+ ZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
1321
+ AQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9
1322
+ AWbK7hWNb6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjA
1323
+ ZIVcFU2Ix7e64HXprQU9nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE0
1324
+ 7e9GceBrAqg1cmuXm2bgyxx5X9gaBGgeRwLmnWDiNpcB3841kt++Z8dtd1k7j53W
1325
+ kBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGttm/81w7a4DSwDRp35+MI
1326
+ mO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4G
1327
+ A1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJ
1328
+ KoZIhvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ1
1329
+ 6CePbJC/kRYkRj5KTs4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl
1330
+ 4b7UVXGYNTq+k+qurUKykG/g/CFNNWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6K
1331
+ oKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHaFloxt/m0cYASSJlyc1pZU8Fj
1332
+ UjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG1riR/aYNKxoU
1333
+ AT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk=
1334
+ -----END CERTIFICATE-----
1335
+
1336
+ # Issuer: CN=thawte Primary Root CA O=thawte, Inc. OU=Certification Services Division/(c) 2006 thawte, Inc. - For authorized use only
1337
+ # Subject: CN=thawte Primary Root CA O=thawte, Inc. OU=Certification Services Division/(c) 2006 thawte, Inc. - For authorized use only
1338
+ # Label: "thawte Primary Root CA"
1339
+ # Serial: 69529181992039203566298953787712940909
1340
+ # MD5 Fingerprint: 8c:ca:dc:0b:22:ce:f5:be:72:ac:41:1a:11:a8:d8:12
1341
+ # SHA1 Fingerprint: 91:c6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37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6
1357
+ Sk/KaAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94J
1358
+ NqR32HuHUETVPm4pafs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBA
1359
+ MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XP
1360
+ r87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUFAAOCAQEAeRHAS7ORtvzw6WfU
1361
+ DW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeEuzLlQRHAd9mz
1362
+ YJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
1363
+ xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2
1364
+ /qxAeeWsEG89jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/
1365
+ LHbTY5xZ3Y+m4Q6gLkH3LpVHz7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7
1366
+ jVaMaA==
1367
+ -----END CERTIFICATE-----
1368
+
1369
+ # Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G5 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2006 VeriSign, Inc. - For authorized use only
1370
+ # Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G5 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2006 VeriSign, Inc. - For authorized use only
1371
+ # Label: "VeriSign Class 3 Public Primary Certification Authority - G5"
1372
+ # Serial: 33037644167568058970164719475676101450
1373
+ # MD5 Fingerprint: cb:17:e4:31:67:3e:e2:09:fe:45:57:93:f3:0a:fa:1c
1374
+ # SHA1 Fingerprint: 4e:b6:d5:78:49:9b:1c:cf:5f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xuf6/WhkcIz
1390
+ SdhDY2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQG
1391
+ BO+QueQA5N06tRn/Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+
1392
+ rCpSx4/VBEnkjWNHiDxpg8v+R70rfk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/
1393
+ NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E
1394
+ BAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH
1395
+ BgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy
1396
+ aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv
1397
+ MzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE
1398
+ p6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y
1399
+ 5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK
1400
+ WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ
1401
+ 4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N
1402
+ hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
1403
+ -----END CERTIFICATE-----
1404
+
1405
+ # Issuer: CN=COMODO Certification Authority O=COMODO CA Limited
1406
+ # Subject: CN=COMODO Certification Authority O=COMODO CA Limited
1407
+ # Label: "COMODO Certification Authority"
1408
+ # Serial: 104350513648249232941998508985834464573
1409
+ # MD5 Fingerprint: 5c:48:dc:f7:42:72:ec:56:94:6d:1c:cc:71:35:80:75
1410
+ # SHA1 Fingerprint: 66:31:bf:9e:f7:4f:9e:b6:c9:d5:a6:0c:ba:6a:be:d1:f7:bd:ef:7b
1411
+ # SHA256 Fingerprint: 0c:2c:d6:3d:f7:80:6f:a3:99:ed:e8:09:11:6b:57:5b:f8:79:89:f0:65:18:f9:80:8c:86:05:03:17:8b:af:66
1412
+ -----BEGIN CERTIFICATE-----
1413
+ MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCB
1414
+ gTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
1415
+ A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNV
1416
+ BAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEyMDEwMDAw
1417
+ MDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3Jl
1418
+ YXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFDT01P
1419
+ RE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0
1420
+ aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3
1421
+ UcEbVASY06m/weaKXTuH+7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI
1422
+ 2GqGd0S7WWaXUF601CxwRM/aN5VCaTwwxHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8
1423
+ Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV4EajcNxo2f8ESIl33rXp
1424
+ +2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA1KGzqSX+
1425
+ DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5O
1426
+ nKVIrLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW
1427
+ /zAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6g
1428
+ PKA6hjhodHRwOi8vY3JsLmNvbW9kb2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9u
1429
+ QXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOCAQEAPpiem/Yb6dc5t3iuHXIY
1430
+ SdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CPOGEIqB6BCsAv
1431
+ IC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/
1432
+ RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4
1433
+ zJVSk/BwJVmcIGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5dd
1434
+ BA6+C4OmF4O5MBKgxTMVBbkN+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IB
1435
+ ZQ==
1436
+ -----END CERTIFICATE-----
1437
+
1438
+ # Issuer: CN=Network Solutions Certificate Authority O=Network Solutions L.L.C.
1439
+ # Subject: CN=Network Solutions Certificate Authority O=Network Solutions L.L.C.
1440
+ # Label: "Network Solutions Certificate Authority"
1441
+ # Serial: 116697915152937497490437556386812487904
1442
+ # MD5 Fingerprint: d3:f3:a6:16:c0:fa:6b:1d:59:b1:2d:96:4d:0e:11:2e
1443
+ # SHA1 Fingerprint: 74:f8:a3:c3:ef:e7:b3:90:06:4b:83:90:3c:21:64:60:20:e5:df:ce
1444
+ #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BAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwu
1460
+ bmV0c29sc3NsLmNvbS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3Jp
1461
+ dHkuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc8
1462
+ 6fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q4LqILPxFzBiwmZVRDuwduIj/
1463
+ h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/GGUsyfJj4akH
1464
+ /nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
1465
+ wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHN
1466
+ pGxlaKFJdlxDydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
1467
+ -----END CERTIFICATE-----
1468
+
1469
+ # Issuer: CN=COMODO ECC Certification Authority O=COMODO CA Limited
1470
+ # Subject: CN=COMODO ECC Certification Authority O=COMODO CA Limited
1471
+ # Label: "COMODO ECC Certification Authority"
1472
+ # Serial: 41578283867086692638256921589707938090
1473
+ # MD5 Fingerprint: 7c:62:ff:74:9d:31:53:5e:68:4a:d5:78:aa:1e:bf:23
1474
+ # SHA1 Fingerprint: 9f:74:4e:9f:2b:4d:ba:ec:0f:31:2c:50:b6:56:3b:8e:2d:93:c3:11
1475
+ # SHA256 Fingerprint: 17:93:92:7a:06:14:54:97:89:ad:ce:2f:8f:34:f7:f0:b6:6d:0f:3a:e3:a3:b8:4d:21:ec:15:db:ba:4f:ad:c7
1476
+ -----BEGIN CERTIFICATE-----
1477
+ MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTEL
1478
+ MAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
1479
+ BxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMT
1480
+ IkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDgwMzA2MDAw
1481
+ MDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdy
1482
+ ZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09N
1483
+ T0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlv
1484
+ biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSR
1485
+ FtSrYpn1PlILBs5BAH+X4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0J
1486
+ cfRK9ChQtP6IHG4/bC8vCVlbpVsLM5niwz2J+Wos77LTBumjQjBAMB0GA1UdDgQW
1487
+ BBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/
1488
+ BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VGFAkK+qDm
1489
+ fQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdv
1490
+ GDeAU/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=
1491
+ -----END CERTIFICATE-----
1492
+
1493
+ # Issuer: CN=TC TrustCenter Class 2 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 2 CA
1494
+ # Subject: CN=TC TrustCenter Class 2 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 2 CA
1495
+ # Label: "TC TrustCenter Class 2 CA II"
1496
+ # Serial: 941389028203453866782103406992443
1497
+ # MD5 Fingerprint: ce:78:33:5c:59:78:01:6e:18:ea:b9:36:a0:b9:2e:23
1498
+ # SHA1 Fingerprint: ae:50:83:ed:7c:f4:5c:bc:8f:61:c6:21:fe:68:5d:79:42:21:15:6e
1499
+ # SHA256 Fingerprint: e6:b8:f8:76:64:85:f8:07:ae:7f:8d:ac:16:70:46:1f:07:c0:a1:3e:ef:3a:1f:f7:17:53:8d:7a:ba:d3:91:b4
1500
+ -----BEGIN CERTIFICATE-----
1501
+ MIIEqjCCA5KgAwIBAgIOLmoAAQACH9dSISwRXDswDQYJKoZIhvcNAQEFBQAwdjEL
1502
+ MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNV
1503
+ BAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDIgQ0ExJTAjBgNVBAMTHFRDIFRydXN0
1504
+ Q2VudGVyIENsYXNzIDIgQ0EgSUkwHhcNMDYwMTEyMTQzODQzWhcNMjUxMjMxMjI1
1505
+ OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIgR21i
1506
+ SDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQTElMCMGA1UEAxMc
1507
+ VEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQAD
1508
+ ggEPADCCAQoCggEBAKuAh5uO8MN8h9foJIIRszzdQ2Lu+MNF2ujhoF/RKrLqk2jf
1509
+ tMjWQ+nEdVl//OEd+DFwIxuInie5e/060smp6RQvkL4DUsFJzfb95AhmC1eKokKg
1510
+ uNV/aVyQMrKXDcpK3EY+AlWJU+MaWss2xgdW94zPEfRMuzBwBJWl9jmM/XOBCH2J
1511
+ XjIeIqkiRUuwZi4wzJ9l/fzLganx4Duvo4bRierERXlQXa7pIXSSTYtZgo+U4+lK
1512
+ 8edJsBTj9WLL1XK9H7nSn6DNqPoByNkN39r8R52zyFTfSUrxIan+GE7uSNQZu+99
1513
+ 5OKdy1u2bv/jzVrndIIFuoAlOMvkaZ6vQaoahPUCAwEAAaOCATQwggEwMA8GA1Ud
1514
+ EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTjq1RMgKHbVkO3
1515
+ kUrL84J6E1wIqzCB7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRy
1516
+ dXN0Y2VudGVyLmRlL2NybC92Mi90Y19jbGFzc18yX2NhX0lJLmNybIaBn2xkYXA6
1517
+ Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBUcnVzdENlbnRlciUyMENsYXNz
1518
+ JTIwMiUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21iSCxPVT1yb290
1519
+ Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u
1520
+ TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEAjNfffu4bgBCzg/XbEeprS6iS
1521
+ GNn3Bzn1LL4GdXpoUxUc6krtXvwjshOg0wn/9vYua0Fxec3ibf2uWWuFHbhOIprt
1522
+ ZjluS5TmVfwLG4t3wVMTZonZKNaL80VKY7f9ewthXbhtvsPcW3nS7Yblok2+XnR8
1523
+ au0WOB9/WIFaGusyiC2y8zl3gK9etmF1KdsjTYjKUCjLhdLTEKJZbtOTVAB6okaV
1524
+ hgWcqRmY5TFyDADiZ9lA4CQze28suVyrZZ0srHbqNZn1l7kPJOzHdiEoZa5X6AeI
1525
+ dUpWoNIFOqTmjZKILPPy4cHGYdtBxceb9w4aUUXCYWvcZCcXjFq32nQozZfkvQ==
1526
+ -----END CERTIFICATE-----
1527
+
1528
+ # Issuer: CN=TC TrustCenter Class 3 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 3 CA
1529
+ # Subject: CN=TC TrustCenter Class 3 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 3 CA
1530
+ # Label: "TC TrustCenter Class 3 CA II"
1531
+ # Serial: 1506523511417715638772220530020799
1532
+ # MD5 Fingerprint: 56:5f:aa:80:61:12:17:f6:67:21:e6:2b:6d:61:56:8e
1533
+ # SHA1 Fingerprint: 80:25:ef:f4:6e:70:c8:d4:72:24:65:84:fe:40:3b:8a:8d:6a:db:f5
1534
+ # SHA256 Fingerprint: 8d:a0:84:fc:f9:9c:e0:77:22:f8:9b:32:05:93:98:06:fa:5c:b8:11:e1:c8:13:f6:a1:08:c7:d3:36:b3:40:8e
1535
+ -----BEGIN CERTIFICATE-----
1536
+ MIIEqjCCA5KgAwIBAgIOSkcAAQAC5aBd1j8AUb8wDQYJKoZIhvcNAQEFBQAwdjEL
1537
+ MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNV
1538
+ BAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDMgQ0ExJTAjBgNVBAMTHFRDIFRydXN0
1539
+ Q2VudGVyIENsYXNzIDMgQ0EgSUkwHhcNMDYwMTEyMTQ0MTU3WhcNMjUxMjMxMjI1
1540
+ OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIgR21i
1541
+ SDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQTElMCMGA1UEAxMc
1542
+ VEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQAD
1543
+ ggEPADCCAQoCggEBALTgu1G7OVyLBMVMeRwjhjEQY0NVJz/GRcekPewJDRoeIMJW
1544
+ Ht4bNwcwIi9v8Qbxq63WyKthoy9DxLCyLfzDlml7forkzMA5EpBCYMnMNWju2l+Q
1545
+ Vl/NHE1bWEnrDgFPZPosPIlY2C8u4rBo6SI7dYnWRBpl8huXJh0obazovVkdKyT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TIFICATE-----
1562
+
1563
+ # Issuer: CN=TC TrustCenter Universal CA I O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
1564
+ # Subject: CN=TC TrustCenter Universal CA I O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
1565
+ # Label: "TC TrustCenter Universal CA I"
1566
+ # Serial: 601024842042189035295619584734726
1567
+ # MD5 Fingerprint: 45:e1:a5:72:c5:a9:36:64:40:9e:f5:e4:58:84:67:8c
1568
+ # SHA1 Fingerprint: 6b:2f:34:ad:89:58:be:62:fd:b0:6b:5c:ce:bb:9d:d9:4f:4e:39:f3
1569
+ # SHA256 Fingerprint: eb:f3:c0:2a:87:89:b1:fb:7d:51:19:95:d6:63:b7:29:06:d9:13:ce:0d:5e:10:56:8a:8a:77:e2:58:61:67:e7
1570
+ -----BEGIN CERTIFICATE-----
1571
+ MIID3TCCAsWgAwIBAgIOHaIAAQAC7LdggHiNtgYwDQYJKoZIhvcNAQEFBQAweTEL
1572
+ MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNV
1573
+ BAsTG1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQTEmMCQGA1UEAxMdVEMgVHJ1
1574
+ c3RDZW50ZXIgVW5pdmVyc2FsIENBIEkwHhcNMDYwMzIyMTU1NDI4WhcNMjUxMjMx
1575
+ MjI1OTU5WjB5MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIg
1576
+ R21iSDEkMCIGA1UECxMbVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBMSYwJAYD
1577
+ VQQDEx1UQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0EgSTCCASIwDQYJKoZIhvcN
1578
+ AQEBBQADggEPADCCAQoCggEBAKR3I5ZEr5D0MacQ9CaHnPM42Q9e3s9B6DGtxnSR
1579
+ JJZ4Hgmgm5qVSkr1YnwCqMqs+1oEdjneX/H5s7/zA1hV0qq34wQi0fiU2iIIAI3T
1580
+ fCZdzHd55yx4Oagmcw6iXSVphU9VDprvxrlE4Vc93x9UIuVvZaozhDrzznq+VZeu
1581
+ jRIPFDPiUHDDSYcTvFHe15gSWu86gzOSBnWLknwSaHtwag+1m7Z3W0hZneTvWq3z
1582
+ wZ7U10VOylY0Ibw+F1tvdwxIAUMpsN0/lm7mlaoMwCC2/T42J5zjXM9OgdwZu5GQ
1583
+ fezmlwQek8wiSdeXhrYTCjxDI3d+8NzmzSQfO4ObNDqDNOMCAwEAAaNjMGEwHwYD
1584
+ VR0jBBgwFoAUkqR1LKSevoFE63n8isWVpesQdXMwDwYDVR0TAQH/BAUwAwEB/zAO
1585
+ BgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFJKkdSyknr6BROt5/IrFlaXrEHVzMA0G
1586
+ CSqGSIb3DQEBBQUAA4IBAQAo0uCG1eb4e/CX3CJrO5UUVg8RMKWaTzqwOuAGy2X1
1587
+ 7caXJ/4l8lfmXpWMPmRgFVp/Lw0BxbFg/UU1z/CyvwbZ71q+s2IhtNerNXxTPqYn
1588
+ 8aEt2hojnczd7Dwtnic0XQ/CNnm8yUpiLe1r2X1BQ3y2qsrtYbE3ghUJGooWMNjs
1589
+ ydZHcnhLEEYUjl8Or+zHL6sQ17bxbuyGssLoDZJz3KL0Dzq/YSMQiZxIQG5wALPT
1590
+ ujdEWBF6AmqI8Dc08BnprNRlc/ZpjGSUOnmFKbAWKwyCPwacx/0QK54PLLae4xW/
1591
+ 2TYcuiUaUj0a7CIMHOCkoj3w6DnPgcB77V0fb8XQC9eY
1592
+ -----END CERTIFICATE-----
1593
+
1594
+ # Issuer: CN=Cybertrust Global Root O=Cybertrust, Inc
1595
+ # Subject: CN=Cybertrust Global Root O=Cybertrust, Inc
1596
+ # Label: "Cybertrust Global Root"
1597
+ # Serial: 4835703278459682877484360
1598
+ # MD5 Fingerprint: 72:e4:4a:87:e3:69:40:80:77:ea:bc:e3:f4:ff:f0:e1
1599
+ # SHA1 Fingerprint: 5f:43:e5:b1:bf:f8:78:8c:ac:1c:c7:ca:4a:9a:c6:22:2b:cc:34:c6
1600
+ # SHA256 Fingerprint: 96:0a:df:00:63:e9:63:56:75:0c:29:65:dd:0a:08:67:da:0b:9c:bd:6e:77:71:4a:ea:fb:23:49:ab:39:3d:a3
1601
+ -----BEGIN CERTIFICATE-----
1602
+ MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYG
1603
+ A1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2Jh
1604
+ bCBSb290MB4XDTA2MTIxNTA4MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UE
1605
+ ChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBS
1606
+ b290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+Mi8vRRQZhP/8NN5
1607
+ 7CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW0ozS
1608
+ J8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2y
1609
+ HLtgwEZLAfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iP
1610
+ t3sMpTjr3kfb1V05/Iin89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNz
1611
+ FtApD0mpSPCzqrdsxacwOUBdrsTiXSZT8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAY
1612
+ XSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/
1613
+ MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2MDSgMqAw
1614
+ hi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3Js
1615
+ MB8GA1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUA
1616
+ A4IBAQBW7wojoFROlZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMj
1617
+ Wqd8BfP9IjsO0QbE2zZMcwSO5bAi5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUx
1618
+ XOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2hO0j9n0Hq0V+09+zv+mKts2o
1619
+ omcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+TX3EJIrduPuoc
1620
+ A06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW
1621
+ WL1WMRJOEcgh4LMRkWXbtKaIOM5V
1622
+ -----END CERTIFICATE-----
1623
+
1624
+ # Issuer: CN=GeoTrust Primary Certification Authority - G3 O=GeoTrust Inc. OU=(c) 2008 GeoTrust Inc. - For authorized use only
1625
+ # Subject: CN=GeoTrust Primary Certification Authority - G3 O=GeoTrust Inc. OU=(c) 2008 GeoTrust Inc. - For authorized use only
1626
+ # Label: "GeoTrust Primary Certification Authority - G3"
1627
+ # Serial: 28809105769928564313984085209975885599
1628
+ # MD5 Fingerprint: b5:e8:34:36:c9:10:44:58:48:70:6d:2e:83:d4:b8:05
1629
+ # SHA1 Fingerprint: 03:9e:ed:b8:0b:e7:a0:3c:69:53:89:3b:20:d2:d9:32:3a:4c:2a:fd
1630
+ # SHA256 Fingerprint: b4:78:b8:12:25:0d:f8:78:63:5c:2a:a7:ec:7d:15:5e:aa:62:5e:e8:29:16:e2:cd:29:43:61:88:6c:d1:fb:d4
1631
+ -----BEGIN CERTIFICATE-----
1632
+ MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w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648
+ AQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9cr5HqQ6XErhK8WTTOd8lNNTB
1649
+ zU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbEAp7aDHdlDkQN
1650
+ kv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD
1651
+ AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUH
1652
+ SJsMC8tJP33st/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2G
1653
+ spki4cErx5z481+oghLrGREt
1654
+ -----END CERTIFICATE-----
1655
+
1656
+ # Issuer: CN=thawte Primary Root CA - G2 O=thawte, Inc. OU=(c) 2007 thawte, Inc. - For authorized use only
1657
+ # Subject: CN=thawte Primary Root CA - G2 O=thawte, Inc. OU=(c) 2007 thawte, Inc. - For authorized use only
1658
+ # Label: "thawte Primary Root CA - G2"
1659
+ # Serial: 71758320672825410020661621085256472406
1660
+ # MD5 Fingerprint: 74:9d:ea:60:24:c4:fd:22:53:3e:cc:3a:72:d9:29:4f
1661
+ # SHA1 Fingerprint: aa:db:bc:22:23:8f:c4:01:a1:27:bb:38:dd:f4:1d:db:08:9e:f0:12
1662
+ # SHA256 Fingerprint: a4:31:0d:50:af:18:a6:44:71:90:37:2a:86:af:af:8b:95:1f:fb:43:1d:83:7f:1e:56:88:b4:59:71:ed:15:57
1663
+ -----BEGIN CERTIFICATE-----
1664
+ MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDEL
1665
+ MAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMp
1666
+ IDIwMDcgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAi
1667
+ BgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMjAeFw0wNzExMDUwMDAw
1668
+ MDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh
1669
+ d3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBGb3Ig
1670
+ YXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9v
1671
+ dCBDQSAtIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/
1672
+ BebfowJPDQfGAFG6DAJSLSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6
1673
+ papu+7qzcMBniKI11KOasf2twu8x+qi58/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8E
1674
+ BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUmtgAMADna3+FGO6Lts6K
1675
+ DPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUNG4k8VIZ3
1676
+ KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41ox
1677
+ XZ3Krr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg==
1678
+ -----END CERTIFICATE-----
1679
+
1680
+ # Issuer: CN=thawte Primary Root CA - G3 O=thawte, Inc. OU=Certification Services Division/(c) 2008 thawte, Inc. - For authorized use only
1681
+ # Subject: CN=thawte Primary Root CA - G3 O=thawte, Inc. OU=Certification Services Division/(c) 2008 thawte, Inc. - For authorized use only
1682
+ # Label: "thawte Primary Root CA - G3"
1683
+ # Serial: 127614157056681299805556476275995414779
1684
+ # MD5 Fingerprint: fb:1b:5d:43:8a:94:cd:44:c6:76:f2:43:4b:47:e7:31
1685
+ # SHA1 Fingerprint: f1:8b:53:8d:1b:e9:03:b6:a6:f0:56:43:5b:17:15:89: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bY2SS9
1701
+ 9irY7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2S
1702
+ zhkGcuYMXDhpxwTWvGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUk
1703
+ OQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV
1704
+ HQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJKoZIhvcNAQELBQADggEBABpA
1705
+ 2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweKA3rD6z8KLFIW
1706
+ oCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu
1707
+ t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7c
1708
+ KUGRIjxpp7sC8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fM
1709
+ m7v/OeZWYdMKp8RcTGB7BXcmer/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZu
1710
+ MdRAGmI0Nj81Aa6sY6A=
1711
+ -----END CERTIFICATE-----
1712
+
1713
+ # Issuer: CN=GeoTrust Primary Certification Authority - G2 O=GeoTrust Inc. OU=(c) 2007 GeoTrust Inc. - For authorized use only
1714
+ # Subject: CN=GeoTrust Primary Certification Authority - G2 O=GeoTrust Inc. OU=(c) 2007 GeoTrust Inc. - For authorized use only
1715
+ # Label: "GeoTrust Primary Certification Authority - G2"
1716
+ # Serial: 80682863203381065782177908751794619243
1717
+ # MD5 Fingerprint: 01:5e:d8:6b:bd:6f:3d:8e:a1:31:f8:12:e0:98:73:6a
1718
+ # SHA1 Fingerprint: 8d:17:84:d5:37:f3:03:7d:ec:70:fe:57:8b:51:9a:99:e6:10:d7:b0
1719
+ # SHA256 Fingerprint: 5e:db:7a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nMJbn0bWtsuRBmOiBucz
1735
+ rD6ogRLQy7rQkgu2npaqBA+K
1736
+ -----END CERTIFICATE-----
1737
+
1738
+ # Issuer: CN=VeriSign Universal Root Certification Authority O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2008 VeriSign, Inc. - For authorized use only
1739
+ # Subject: CN=VeriSign Universal Root Certification Authority O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2008 VeriSign, Inc. - For authorized use only
1740
+ # Label: "VeriSign Universal Root Certification Authority"
1741
+ # Serial: 85209574734084581917763752644031726877
1742
+ # MD5 Fingerprint: 8e:ad:b5:01:aa:4d:81:e4:8c:1d:d1:e1:14:00:95:19
1743
+ # SHA1 Fingerprint: 36:79:ca:35:66:87:72:30:4d:30:a5:fb:87:3b:0f:a7:7b:b7:0d:54
1744
+ # SHA256 Fingerprint: 23:99:56:11:27:a5:71:25:de:8c:ef:ea:61:0d:df:2f:a0:78:b5:c8:06:7f:4e:82:82:90:bf:b8:60:e8:4b:3c
1745
+ -----BEGIN CERTIFICATE-----
1746
+ MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCB
1747
+ vTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
1748
+ ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJp
1749
+ U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MTgwNgYDVQQDEy9W
1750
+ ZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe
1751
+ Fw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJVUzEX
1752
+ MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0
1753
+ IE5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JDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTxP/jgdFcrGJ2BtMQo2pSXpXDrrB2+
1769
+ BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+PwGZsY6rp2aQW9IHR
1770
+ lRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4mJO3
1771
+ 7M2CYfE45k+XmCpajQ==
1772
+ -----END CERTIFICATE-----
1773
+
1774
+ # Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G4 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2007 VeriSign, Inc. - For authorized use only
1775
+ # Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G4 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2007 VeriSign, Inc. - For authorized use only
1776
+ # Label: "VeriSign Class 3 Public Primary Certification Authority - G4"
1777
+ # Serial: 63143484348153506665311985501458640051
1778
+ # MD5 Fingerprint: 3a:52:e1:e7:fd:6f:3a:e3:6f:f3:6f:99:1b:f9:22:41
1779
+ # SHA1 Fingerprint: 22:d5:d8:df:8f:02:31:d1:8d:f7:9d:b7:cf:8a:2d:64:c9:3f:6c:3a
1780
+ # SHA256 Fingerprint: 69:dd:d7:ea:90:bb:57:c9:3e:13:5d:c8:5e:a6:fc:d5:48:0b:60:32:39:bd:c4:54:fc:75:8b:2a:26:cf:7f:79
1781
+ -----BEGIN CERTIFICATE-----
1782
+ MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjEL
1783
+ MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW
1784
+ ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2ln
1785
+ biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp
1786
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ICATE-----
1802
+
1803
+ # Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
1804
+ # Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
1805
+ # Label: "Verisign Class 3 Public Primary Certification Authority"
1806
+ # Serial: 80507572722862485515306429940691309246
1807
+ # MD5 Fingerprint: ef:5a:f1:33:ef:f1:cd:bb:51:02:ee:12:14:4b:96:c4
1808
+ # SHA1 Fingerprint: a1:db:63:93:91:6f:17:e4:18:55:09:40:04:15:c7:02:40:b0:ae:6b
1809
+ # SHA256 Fingerprint: a4:b6:b3:99:6f:c2:f3:06:b3:fd:86:81:bd:63:41:3d:8c:50:09:cc:4f:a3:29:c2:cc:f0:e2:fa:1b:14:03:05
1810
+ -----BEGIN CERTIFICATE-----
1811
+ MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkG
1812
+ A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
1813
+ cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
1814
+ MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
1815
+ BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
1816
+ YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
1817
+ ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
1818
+ BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
1819
+ I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
1820
+ CSqGSIb3DQEBBQUAA4GBABByUqkFFBkyCEHwxWsKzH4PIRnN5GfcX6kb5sroc50i
1821
+ 2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWXbj9T/UWZYB2oK0z5XqcJ
1822
+ 2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/D/xwzoiQ
1823
+ -----END CERTIFICATE-----
1824
+
1825
+ # Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
1826
+ # Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
1827
+ # Label: "GlobalSign Root CA - R3"
1828
+ # Serial: 4835703278459759426209954
1829
+ # MD5 Fingerprint: c5:df:b8:49:ca:05:13:55:ee:2d:ba:1a:c3:3e:b0:28
1830
+ # SHA1 Fingerprint: d6:9b:56:11:48:f0:1c:77:c5:45:78:c1:09:26:df:5b:85:69:76:ad
1831
+ # SHA256 Fingerprint: cb:b5:22:d7:b7:f1:27:ad:6a:01:13:86:5b:df:1c:d4:10:2e:7d:07:59:af:63:5a:7c:f4:72:0d:c9:63:c5:3b
1832
+ -----BEGIN CERTIFICATE-----
1833
+ MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G
1834
+ A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp
1835
+ Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4
1836
+ MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG
1837
+ A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
1838
+ hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8
1839
+ RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT
1840
+ gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm
1841
+ KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd
1842
+ QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ
1843
+ XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw
1844
+ DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o
1845
+ LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU
1846
+ RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp
1847
+ jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK
1848
+ 6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX
1849
+ mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs
1850
+ Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH
1851
+ WD9f
1852
+ -----END CERTIFICATE-----
1853
+
1854
+ # Issuer: CN=TC TrustCenter Universal CA III O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
1855
+ # Subject: CN=TC TrustCenter Universal CA III O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
1856
+ # Label: "TC TrustCenter Universal CA III"
1857
+ # Serial: 2010889993983507346460533407902964
1858
+ # MD5 Fingerprint: 9f:dd:db:ab:ff:8e:ff:45:21:5f:f0:6c:9d:8f:fe:2b
1859
+ # SHA1 Fingerprint: 96:56:cd:7b:57:96:98:95:d0:e1:41:46:68:06:fb:b8:c6:11:06:87
1860
+ # SHA256 Fingerprint: 30:9b:4a:87:f6:ca:56:c9:31:69:aa:a9:9c:6d:98:88:54:d7:89:2b:d5:43:7e:2d:07:b2:9c:be:da:55:d3:5d
1861
+ -----BEGIN CERTIFICATE-----
1862
+ MIID4TCCAsmgAwIBAgIOYyUAAQACFI0zFQLkbPQwDQYJKoZIhvcNAQEFBQAwezEL
1863
+ MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNV
1864
+ BAsTG1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQTEoMCYGA1UEAxMfVEMgVHJ1
1865
+ c3RDZW50ZXIgVW5pdmVyc2FsIENBIElJSTAeFw0wOTA5MDkwODE1MjdaFw0yOTEy
1866
+ MzEyMzU5NTlaMHsxCzAJBgNVBAYTAkRFMRwwGgYDVQQKExNUQyBUcnVzdENlbnRl
1867
+ ciBHbWJIMSQwIgYDVQQLExtUQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0ExKDAm
1868
+ BgNVBAMTH1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQSBJSUkwggEiMA0GCSqG
1869
+ SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDC2pxisLlxErALyBpXsq6DFJmzNEubkKLF
1870
+ 5+cvAqBNLaT6hdqbJYUtQCggbergvbFIgyIpRJ9Og+41URNzdNW88jBmlFPAQDYv
1871
+ DIRlzg9uwliT6CwLOunBjvvya8o84pxOjuT5fdMnnxvVZ3iHLX8LR7PH6MlIfK8v
1872
+ zArZQe+f/prhsq75U7Xl6UafYOPfjdN/+5Z+s7Vy+EutCHnNaYlAJ/Uqwa1D7KRT
1873
+ yGG299J5KmcYdkhtWyUB0SbFt1dpIxVbYYqt8Bst2a9c8SaQaanVDED1M4BDj5yj
1874
+ dipFtK+/fz6HP3bFzSreIMUWWMv5G/UPyw0RUmS40nZid4PxWJ//AgMBAAGjYzBh
1875
+ MB8GA1UdIwQYMBaAFFbn4VslQ4Dg9ozhcbyO5YAvxEjiMA8GA1UdEwEB/wQFMAMB
1876
+ Af8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRW5+FbJUOA4PaM4XG8juWAL8RI
1877
+ 4jANBgkqhkiG9w0BAQUFAAOCAQEAg8ev6n9NCjw5sWi+e22JLumzCecYV42Fmhfz
1878
+ dkJQEw/HkG8zrcVJYCtsSVgZ1OK+t7+rSbyUyKu+KGwWaODIl0YgoGhnYIg5IFHY
1879
+ aAERzqf2EQf27OysGh+yZm5WZ2B6dF7AbZc2rrUNXWZzwCUyRdhKBgePxLcHsU0G
1880
+ DeGl6/R1yrqc0L2z0zIkTO5+4nYES0lT2PLpVDP85XEfPRRclkvxOvIAu2y0+pZV
1881
+ CIgJwcyRGSmwIC3/yzikQOEXvnlhgP8HA4ZMTnsGnxGGjYnuJ8Tb4rwZjgvDwxPH
1882
+ LQNjO9Po5KIqwoIIlBZU8O8fJ5AluA0OKBtHd0e9HKgl8ZS0Zg==
1883
+ -----END CERTIFICATE-----
1884
+
1885
+ # Issuer: CN=Go Daddy Root Certificate Authority - G2 O=GoDaddy.com, Inc.
1886
+ # Subject: CN=Go Daddy Root Certificate Authority - G2 O=GoDaddy.com, Inc.
1887
+ # Label: "Go Daddy Root Certificate Authority - G2"
1888
+ # Serial: 0
1889
+ # MD5 Fingerprint: 80:3a:bc:22:c1:e6:fb:8d:9b:3b:27:4a:32:1b:9a:01
1890
+ # SHA1 Fingerprint: 47:be:ab:c9:22:ea:e8:0e:78:78:34:62:a7:9f:45:c2:54:fd:e6:8b
1891
+ # SHA256 Fingerprint: 45:14:0b:32:47:eb:9c:c8:c5:b4:f0:d7:b5:30:91:f7:32:92:08:9e:6e:5a:63:e2:74:9d:d3:ac:a9:19:8e:da
1892
+ -----BEGIN CERTIFICATE-----
1893
+ MII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NjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu
1909
+ 9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r5N9ss4UXnT3ZJE95kTXWXwTr
1910
+ gIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYVN8Gb5DKj7Tjo
1911
+ 2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO
1912
+ LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI
1913
+ 4uJEvlz36hz1
1914
+ -----END CERTIFICATE-----
1915
+
1916
+ # Issuer: CN=Starfield Root Certificate Authority - G2 O=Starfield Technologies, Inc.
1917
+ # Subject: CN=Starfield Root Certificate Authority - G2 O=Starfield Technologies, Inc.
1918
+ # Label: "Starfield Root Certificate Authority - G2"
1919
+ # Serial: 0
1920
+ # MD5 Fingerprint: d6:39:81:c6:52:7e:96:69:fc:fc:ca:66:ed:05:f2:96
1921
+ # SHA1 Fingerprint: b5:1c:06:7c:ee:2b:0c:3d:f8:55:ab:2d:92:f4:fe:39:d4:e7:0f:0e
1922
+ # SHA256 Fingerprint: 2c:e1:cb:0b:f9:d2:f9:e1:02:99:3f:be:21:51:52:c3:b2:dd:0c:ab:de:1c:68:e5:31:9b:83:91:54:db:b7:f5
1923
+ -----BEGIN CERTIFICATE-----
1924
+ MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMx
1925
+ EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
1926
+ HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVs
1927
+ ZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAw
1928
+ MFoXDTM3MTIzMTIzNT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dAKACL8x3vLCWRFCztAgfd9fDL1
1944
+ mMpYjn0q7pBZc2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0
1945
+ -----END CERTIFICATE-----
1946
+
1947
+ # Issuer: CN=Starfield Services Root Certificate Authority - G2 O=Starfield Technologies, Inc.
1948
+ # Subject: CN=Starfield Services Root Certificate Authority - G2 O=Starfield Technologies, Inc.
1949
+ # Label: "Starfield Services Root Certificate Authority - G2"
1950
+ # Serial: 0
1951
+ # MD5 Fingerprint: 17:35:74:af:7b:61:1c:eb:f4:f9:3c:e2:ee:40:f9:a2
1952
+ # SHA1 Fingerprint: 92:5a:8f:8d:2c:6d:04:e0:66:5f:59:6a:ff:22:d8:63:e8:25:6f:3f
1953
+ # SHA256 Fingerprint: 56:8d:69:05:a2:c8:87:08:a4:b3:02:51:90:ed:cf:ed:b1:97:4a:60:6a:13:c6:e5:29:0f:cb:2a:e6:3e:da:b5
1954
+ -----BEGIN CERTIFICATE-----
1955
+ MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMx
1956
+ EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
1957
+ HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVs
1958
+ ZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
1959
+ MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNVBAYTAlVTMRAwDgYD
1960
+ VQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFy
1961
+ ZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2Vy
1962
+ dmljZXMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
1963
+ hvcNAQEBBQADggEPADCCAQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20p
1964
+ OsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm2
1965
+ 8xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4PahHQUw2eeBGg6345AWh1K
1966
+ Ts9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLPLJGmpufe
1967
+ hRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk
1968
+ 6mFBrMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAw
1969
+ DwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+q
1970
+ AdcwKziIorhtSpzyEZGDMA0GCSqGSIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMI
1971
+ bw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPPE95Dz+I0swSdHynVv/heyNXB
1972
+ ve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTyxQGjhdByPq1z
1973
+ qwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd
1974
+ iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn
1975
+ 0q23KXB56jzaYyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCN
1976
+ sSi6
1977
+ -----END CERTIFICATE-----
1978
+
1979
+ # Issuer: CN=AffirmTrust Commercial O=AffirmTrust
1980
+ # Subject: CN=AffirmTrust Commercial O=AffirmTrust
1981
+ # Label: "AffirmTrust Commercial"
1982
+ # Serial: 8608355977964138876
1983
+ # MD5 Fingerprint: 82:92:ba:5b:ef:cd:8a:6f:a6:3d:55:f9:84:f6:d6:b7
1984
+ # SHA1 Fingerprint: f9:b5:b6:32:45:5f:9c:be:ec:57:5f:80:dc:e9:6e:2c:c7:b2:78:b7
1985
+ # SHA256 Fingerprint: 03:76:ab:1d:54:c5:f9:80:3c:e4:b2:e2:01:a0:ee:7e:ef:7b:57:b6:36:e8:a9:3c:9b:8d:48:60:c9:6f:5f:a7
1986
+ -----BEGIN CERTIFICATE-----
1987
+ MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UE
1988
+ BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz
1989
+ dCBDb21tZXJjaWFsMB4XDTEwMDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDEL
1990
+ MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp
1991
+ cm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
1992
+ AQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6EqdbDuKP
1993
+ Hx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yr
1994
+ ba0F8PrVC8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPAL
1995
+ MeIrJmqbTFeurCA+ukV6BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1
1996
+ yHp52UKqK39c/s4mT6NmgTWvRLpUHhwwMmWd5jyTXlBOeuM61G7MGvv50jeuJCqr
1997
+ VwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNVHQ4EFgQUnZPGU4teyq8/
1998
+ nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ
1999
+ KoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYG
2000
+ XUPGhi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNj
2001
+ vbz4YYCanrHOQnDiqX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivt
2002
+ Z8SOyUOyXGsViQK8YvxO8rUzqrJv0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9g
2003
+ N53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0khsUlHRUe072o0EclNmsxZt9YC
2004
+ nlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8=
2005
+ -----END CERTIFICATE-----
2006
+
2007
+ # Issuer: CN=AffirmTrust Networking O=AffirmTrust
2008
+ # Subject: CN=AffirmTrust Networking O=AffirmTrust
2009
+ # Label: "AffirmTrust Networking"
2010
+ # Serial: 8957382827206547757
2011
+ # MD5 Fingerprint: 42:65:ca:be:01:9a:9a:4c:a9:8c:41:49:cd:c0:d5:7f
2012
+ # SHA1 Fingerprint: 29:36:21:02:8b:20:ed:02:f5:66:c5:32:d1:d6:ed:90:9f:45:00:2f
2013
+ # SHA256 Fingerprint: 0a:81:ec:5a:92:97:77:f1:45:90:4a:f3:8d:5d:50:9f:66:b5:e2:c5:8f:cd:b5:31:05:8b:0e:17:f3:f0:b4:1b
2014
+ -----BEGIN CERTIFICATE-----
2015
+ MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UE
2016
+ BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz
2017
+ dCBOZXR3b3JraW5nMB4XDTEwMDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDE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Issuer: CN=AffirmTrust Premium O=AffirmTrust
2036
+ # Subject: CN=AffirmTrust Premium O=AffirmTrust
2037
+ # Label: "AffirmTrust Premium"
2038
+ # Serial: 7893706540734352110
2039
+ # MD5 Fingerprint: c4:5d:0e:48:b6:ac:28:30:4e:0a:bc:f9:38:16:87:57
2040
+ # SHA1 Fingerprint: d8:a6:33:2c:e0:03:6f:b1:85:f6:63:4f:7d:6a:06:65:26:32:28:27
2041
+ # SHA256 Fingerprint: 70:a7:3f:7f:37:6b:60:07:42:48:90:45:34:b1:14:82:d5:bf:0e:69:8e:cc:49:8d:f5:25:77:eb:f2:e9:3b:9a
2042
+ -----BEGIN CERTIFICATE-----
2043
+ MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UE
2044
+ BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVz
2045
+ dCBQcmVtaXVtMB4XDTEwMDEyOTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkG
2046
+ A1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1U
2047
+ cnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAxBLf
2048
+ qV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtnBKAQ
2049
+ JG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ
2050
+ +jjeRFcV5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrS
2051
+ s8PhaJyJ+HoAVt70VZVs+7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5
2052
+ HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmdGPLu8ytxjLW6OQdJd/zvLpKQ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2068
+ YoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8
2069
+ GKa1qF60g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaO
2070
+ RtGdFNrHF+QFlozEJLUbzxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6e
2071
+ KeC2uAloGRwYQw==
2072
+ -----END CERTIFICATE-----
2073
+
2074
+ # Issuer: CN=AffirmTrust Premium ECC O=AffirmTrust
2075
+ # Subject: CN=AffirmTrust Premium ECC O=AffirmTrust
2076
+ # Label: "AffirmTrust Premium ECC"
2077
+ # Serial: 8401224907861490260
2078
+ # MD5 Fingerprint: 64:b0:09:55:cf:b1:d5:99:e2:be:13:ab:a6:5d:ea:4d
2079
+ # SHA1 Fingerprint: b8:23:6b:00:2f:1d:16:86:53:01:55:6c:11:a4:37:ca:eb:ff:c3:bb
2080
+ # SHA256 Fingerprint: bd:71:fd:f6:da:97:e4:cf:62:d1:64:7a:dd:25:81:b0:7d:79:ad:f8:39:7e:b4:ec:ba:9c:5e:84:88:82:14:23
2081
+ -----BEGIN CERTIFICATE-----
2082
+ MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMC
2083
+ VVMxFDASBgNVBAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQ
2084
+ cmVtaXVtIEVDQzAeFw0xMDAxMjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJ
2085
+ BgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1UcnVzdDEgMB4GA1UEAwwXQWZmaXJt
2086
+ VHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQNMF4bFZ0D
2087
+ 0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQN8O9
2088
+ ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0G
2089
+ A1UdDgQWBBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4G
2090
+ A1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/Vs
2091
+ aobgxCd05DhT1wV/GzTjxi+zygk8N53X57hG8f2h4nECMEJZh0PUUd+60wkyWs6I
2092
+ flc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKMeQ==
2093
+ -----END CERTIFICATE-----
2094
+
2095
+ # Issuer: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
2096
+ # Subject: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
2097
+ # Label: "StartCom Certification Authority"
2098
+ # Serial: 45
2099
+ # MD5 Fingerprint: c9:3b:0d:84:41:fc:a4:76:79:23:08:57:de:10:19:16
2100
+ # SHA1 Fingerprint: a3:f1:33:3f:e2:42:bf:cf:c5:d1:4e:8f:39:42:98:40:68:10:d1:a0
2101
+ # SHA256 Fingerprint: e1:78:90:ee:09:a3:fb:f4:f4:8b:9c:41:4a:17:d6:37:b7:a5:06:47:e9:bc:75:23:22:72:7f:cc:17:42:a9:11
2102
+ -----BEGIN CERTIFICATE-----
2103
+ MIIHhzCCBW+gAwIBAgIBLTANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJJTDEW
2104
+ MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg
2105
+ Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh
2106
+ dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM3WhcNMzYwOTE3MTk0NjM2WjB9
2107
+ MQswCQYDVQQGEwJJTDEWMBQ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m+tgHRns9+Ww2vl5GKVF
2138
+ P0lDV9LdJNUso/2RjSe15esUBppMeyG7Oq0wBhjA2MFrLH9ZXF2RsXAiV+uKa0hK
2139
+ 1Q8p7MZAwC+ITGgBF3f0JBlPvfrhsiAhS90a2Cl9qrjeVOwhVYBsHvUwyKMQ5bLm
2140
+ KhQxw4UtjJixhlpPiVktucf3HMiKf8CdBUrmQk9io20ppB+Fq9vlgcitKj1MXVuE
2141
+ JnHEhV5xJMqlG2zYYdMa4FTbzrqpMrUi9nNBCV24F10OD5mQ1kfabwo6YigUZ4LZ
2142
+ 8dCAWZvLMdibD4x3TrVoivJs9iQOLWxwxXPR3hTQcY+203sC9uO41Alua551hDnm
2143
+ fyWl8kgAwKQB2j8=
2144
+ -----END CERTIFICATE-----
2145
+
2146
+ # Issuer: CN=StartCom Certification Authority G2 O=StartCom Ltd.
2147
+ # Subject: CN=StartCom Certification Authority G2 O=StartCom Ltd.
2148
+ # Label: "StartCom Certification Authority G2"
2149
+ # Serial: 59
2150
+ # MD5 Fingerprint: 78:4b:fb:9e:64:82:0a:d3:b8:4c:62:f3:64:f2:90:64
2151
+ # SHA1 Fingerprint: 31:f1:fd:68:22:63:20:ee:c6:3b:3f:9d:ea:4a:3e:53:7c:7c:39:17
2152
+ # SHA256 Fingerprint: c7:ba:65:67:de:93:a7:98:ae:1f:aa:79:1e:71:2d:37:8f:ae:1f:93:c4:39:7f:ea:44:1b:b7:cb:e6:fd:59:95
2153
+ -----BEGIN CERTIFICATE-----
2154
+ MIIFYzCCA0ugAwIBAgIBOzANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJJTDEW
2155
+ MBQGA1UEChMNU3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlm
2156
+ aWNhdGlvbiBBdXRob3JpdHkgRzIwHhcNMTAwMTAxMDEwMDAxWhcNMzkxMjMxMjM1
2157
+ OTAxWjBTMQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3Rhc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s06Ctg6Wgk/XzTQLwPSZh0avZyQN8gMjgdalEVGKua+etqhqaRpEpKwfTbURIfX
2174
+ UfEpY9Z1zRbkJ4kd+MIySP3bmdCPX1R0zKxnNBFi2QwKN4fRoxdIjtIXHfbX/dtl
2175
+ 6/2o1PXWT6RbdejF0mCy2wl+JYt7ulKSnj7oxXehPOBKc2thz4bcQ///If4jXSRK
2176
+ 9dNtD2IEBVeC2m6kMyV5Sy5UGYvMLD0w6dEG/+gyRr61M3Z3qAFdlsHB1b6uJcDJ
2177
+ HgoJIIihDsnzb02CVAAgp9KP5DlUFy6NHrgbuxu9mk47EDTcnIhT76IxW1hPkWLI
2178
+ wpqazRVdOKnWvvgTtZ8SafJQYqz7Fzf07rh1Z2AQ+4NQ+US1dZxAF7L+/XldblhY
2179
+ XzD8AK6vM8EOTmy6p6ahfzLbOOCxchcKK5HsamMm7YnUeMx0HgX4a/6ManY5Ka5l
2180
+ IxKVCCIcl85bBu4M4ru8H0ST9tg4RQUh7eStqxK2A6RCLi3ECToDZ2mEmuFZkIoo
2181
+ hdVddLHRDiBYmxOlsGOm7XtH/UVVMKTumtTm4ofvmMkyghEpIrwACjFeLQ/Ajulr
2182
+ so8uBtjRkcfGEvRM/TAXw8HaOFvjqermobp573PYtlNXLfbQ4ddI
2183
+ -----END CERTIFICATE-----
lib/Google/Model.php CHANGED
@@ -1,250 +1,250 @@
1
- <?php
2
- /*
3
- * Copyright 2011 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- /**
19
- * This class defines attributes, valid values, and usage which is generated
20
- * from a given json schema.
21
- * http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5
22
- *
23
- * @author Chirag Shah <chirags@google.com>
24
- *
25
- */
26
- class IWP_google_Model implements ArrayAccess
27
- {
28
- protected $modelData = array();
29
- protected $processed = array();
30
-
31
- /**
32
- * Polymorphic - accepts a variable number of arguments dependent
33
- * on the type of the model subclass.
34
- */
35
- public function __construct()
36
- {
37
- if (func_num_args() == 1 && is_array(func_get_arg(0))) {
38
- // Initialize the model with the array's contents.
39
- $array = func_get_arg(0);
40
- $this->mapTypes($array);
41
- }
42
- }
43
-
44
- public function __get($key)
45
- {
46
- $keyTypeName = $this->keyType($key);
47
- $keyDataType = $this->dataType($key);
48
- if (isset($this->$keyTypeName) && !isset($this->processed[$key])) {
49
- if (isset($this->modelData[$key])) {
50
- $val = $this->modelData[$key];
51
- } else if (isset($this->$keyDataType) &&
52
- ($this->$keyDataType == 'array' || $this->$keyDataType == 'map')) {
53
- $val = array();
54
- } else {
55
- $val = null;
56
- }
57
-
58
- if ($this->isAssociativeArray($val)) {
59
- if (isset($this->$keyDataType) && 'map' == $this->$keyDataType) {
60
- foreach ($val as $arrayKey => $arrayItem) {
61
- $this->modelData[$key][$arrayKey] =
62
- $this->createObjectFromName($keyTypeName, $arrayItem);
63
- }
64
- } else {
65
- $this->modelData[$key] = $this->createObjectFromName($keyTypeName, $val);
66
- }
67
- } else if (is_array($val)) {
68
- $arrayObject = array();
69
- foreach ($val as $arrayIndex => $arrayItem) {
70
- $arrayObject[$arrayIndex] =
71
- $this->createObjectFromName($keyTypeName, $arrayItem);
72
- }
73
- $this->modelData[$key] = $arrayObject;
74
- }
75
- $this->processed[$key] = true;
76
- }
77
-
78
- return $this->modelData[$key];
79
- }
80
-
81
- /**
82
- * Initialize this object's properties from an array.
83
- *
84
- * @param array $array Used to seed this object's properties.
85
- * @return void
86
- */
87
- protected function mapTypes($array)
88
- {
89
- // Hard initilise simple types, lazy load more complex ones.
90
- foreach ($array as $key => $val) {
91
- if ( !property_exists($this, $this->keyType($key)) &&
92
- property_exists($this, $key)) {
93
- $this->$key = $val;
94
- unset($array[$key]);
95
- } elseif (property_exists($this, $camelKey = IWP_google_Utils::camelCase($key))) {
96
- // This checks if property exists as camelCase, leaving it in array as snake_case
97
- // in case of backwards compatibility issues.
98
- $this->$camelKey = $val;
99
- }
100
- }
101
- $this->modelData = $array;
102
- }
103
-
104
- /**
105
- * Create a simplified object suitable for straightforward
106
- * conversion to JSON. This is relatively expensive
107
- * due to the usage of reflection, but shouldn't be called
108
- * a whole lot, and is the most straightforward way to filter.
109
- */
110
- public function toSimpleObject()
111
- {
112
- $object = new stdClass();
113
-
114
- // Process all other data.
115
- foreach ($this->modelData as $key => $val) {
116
- $result = $this->getSimpleValue($val);
117
- if ($result !== null) {
118
- $object->$key = $result;
119
- }
120
- }
121
-
122
- // Process all public properties.
123
- $reflect = new ReflectionObject($this);
124
- $props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC);
125
- foreach ($props as $member) {
126
- $name = $member->getName();
127
- $result = $this->getSimpleValue($this->$name);
128
- if ($result !== null) {
129
- $object->$name = $result;
130
- }
131
- }
132
-
133
- return $object;
134
- }
135
-
136
- /**
137
- * Handle different types of values, primarily
138
- * other objects and map and array data types.
139
- */
140
- private function getSimpleValue($value)
141
- {
142
- if ($value instanceof IWP_google_Model) {
143
- return $value->toSimpleObject();
144
- } else if (is_array($value)) {
145
- $return = array();
146
- foreach ($value as $key => $a_value) {
147
- $a_value = $this->getSimpleValue($a_value);
148
- if ($a_value !== null) {
149
- $return[$key] = $a_value;
150
- }
151
- }
152
- return $return;
153
- }
154
- return $value;
155
- }
156
-
157
- /**
158
- * Returns true only if the array is associative.
159
- * @param array $array
160
- * @return bool True if the array is associative.
161
- */
162
- protected function isAssociativeArray($array)
163
- {
164
- if (!is_array($array)) {
165
- return false;
166
- }
167
- $keys = array_keys($array);
168
- foreach ($keys as $key) {
169
- if (is_string($key)) {
170
- return true;
171
- }
172
- }
173
- return false;
174
- }
175
-
176
- /**
177
- * Given a variable name, discover its type.
178
- *
179
- * @param $name
180
- * @param $item
181
- * @return object The object from the item.
182
- */
183
- private function createObjectFromName($name, $item)
184
- {
185
- $type = $this->$name;
186
- return new $type($item);
187
- }
188
-
189
- /**
190
- * Verify if $obj is an array.
191
- * @throws IWP_google_Exception Thrown if $obj isn't an array.
192
- * @param array $obj Items that should be validated.
193
- * @param string $method Method expecting an array as an argument.
194
- */
195
- public function assertIsArray($obj, $method)
196
- {
197
- if ($obj && !is_array($obj)) {
198
- throw new IWP_google_Exception(
199
- "Incorrect parameter type passed to $method(). Expected an array."
200
- );
201
- }
202
- }
203
-
204
- public function offsetExists($offset)
205
- {
206
- return isset($this->$offset) || isset($this->modelData[$offset]);
207
- }
208
-
209
- public function offsetGet($offset)
210
- {
211
- return isset($this->$offset) ?
212
- $this->$offset :
213
- $this->__get($offset);
214
- }
215
-
216
- public function offsetSet($offset, $value)
217
- {
218
- if (property_exists($this, $offset)) {
219
- $this->$offset = $value;
220
- } else {
221
- $this->modelData[$offset] = $value;
222
- $this->processed[$offset] = true;
223
- }
224
- }
225
-
226
- public function offsetUnset($offset)
227
- {
228
- unset($this->modelData[$offset]);
229
- }
230
-
231
- protected function keyType($key)
232
- {
233
- return $key . "Type";
234
- }
235
-
236
- protected function dataType($key)
237
- {
238
- return $key . "DataType";
239
- }
240
-
241
- public function __isset($key)
242
- {
243
- return isset($this->modelData[$key]);
244
- }
245
-
246
- public function __unset($key)
247
- {
248
- unset($this->modelData[$key]);
249
- }
250
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2011 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ /**
19
+ * This class defines attributes, valid values, and usage which is generated
20
+ * from a given json schema.
21
+ * http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5
22
+ *
23
+ * @author Chirag Shah <chirags@google.com>
24
+ *
25
+ */
26
+ class IWP_google_Model implements ArrayAccess
27
+ {
28
+ protected $modelData = array();
29
+ protected $processed = array();
30
+
31
+ /**
32
+ * Polymorphic - accepts a variable number of arguments dependent
33
+ * on the type of the model subclass.
34
+ */
35
+ public function __construct()
36
+ {
37
+ if (func_num_args() == 1 && is_array(func_get_arg(0))) {
38
+ // Initialize the model with the array's contents.
39
+ $array = func_get_arg(0);
40
+ $this->mapTypes($array);
41
+ }
42
+ }
43
+
44
+ public function __get($key)
45
+ {
46
+ $keyTypeName = $this->keyType($key);
47
+ $keyDataType = $this->dataType($key);
48
+ if (isset($this->$keyTypeName) && !isset($this->processed[$key])) {
49
+ if (isset($this->modelData[$key])) {
50
+ $val = $this->modelData[$key];
51
+ } else if (isset($this->$keyDataType) &&
52
+ ($this->$keyDataType == 'array' || $this->$keyDataType == 'map')) {
53
+ $val = array();
54
+ } else {
55
+ $val = null;
56
+ }
57
+
58
+ if ($this->isAssociativeArray($val)) {
59
+ if (isset($this->$keyDataType) && 'map' == $this->$keyDataType) {
60
+ foreach ($val as $arrayKey => $arrayItem) {
61
+ $this->modelData[$key][$arrayKey] =
62
+ $this->createObjectFromName($keyTypeName, $arrayItem);
63
+ }
64
+ } else {
65
+ $this->modelData[$key] = $this->createObjectFromName($keyTypeName, $val);
66
+ }
67
+ } else if (is_array($val)) {
68
+ $arrayObject = array();
69
+ foreach ($val as $arrayIndex => $arrayItem) {
70
+ $arrayObject[$arrayIndex] =
71
+ $this->createObjectFromName($keyTypeName, $arrayItem);
72
+ }
73
+ $this->modelData[$key] = $arrayObject;
74
+ }
75
+ $this->processed[$key] = true;
76
+ }
77
+
78
+ return $this->modelData[$key];
79
+ }
80
+
81
+ /**
82
+ * Initialize this object's properties from an array.
83
+ *
84
+ * @param array $array Used to seed this object's properties.
85
+ * @return void
86
+ */
87
+ protected function mapTypes($array)
88
+ {
89
+ // Hard initilise simple types, lazy load more complex ones.
90
+ foreach ($array as $key => $val) {
91
+ if ( !property_exists($this, $this->keyType($key)) &&
92
+ property_exists($this, $key)) {
93
+ $this->$key = $val;
94
+ unset($array[$key]);
95
+ } elseif (property_exists($this, $camelKey = IWP_google_Utils::camelCase($key))) {
96
+ // This checks if property exists as camelCase, leaving it in array as snake_case
97
+ // in case of backwards compatibility issues.
98
+ $this->$camelKey = $val;
99
+ }
100
+ }
101
+ $this->modelData = $array;
102
+ }
103
+
104
+ /**
105
+ * Create a simplified object suitable for straightforward
106
+ * conversion to JSON. This is relatively expensive
107
+ * due to the usage of reflection, but shouldn't be called
108
+ * a whole lot, and is the most straightforward way to filter.
109
+ */
110
+ public function toSimpleObject()
111
+ {
112
+ $object = new stdClass();
113
+
114
+ // Process all other data.
115
+ foreach ($this->modelData as $key => $val) {
116
+ $result = $this->getSimpleValue($val);
117
+ if ($result !== null) {
118
+ $object->$key = $result;
119
+ }
120
+ }
121
+
122
+ // Process all public properties.
123
+ $reflect = new ReflectionObject($this);
124
+ $props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC);
125
+ foreach ($props as $member) {
126
+ $name = $member->getName();
127
+ $result = $this->getSimpleValue($this->$name);
128
+ if ($result !== null) {
129
+ $object->$name = $result;
130
+ }
131
+ }
132
+
133
+ return $object;
134
+ }
135
+
136
+ /**
137
+ * Handle different types of values, primarily
138
+ * other objects and map and array data types.
139
+ */
140
+ private function getSimpleValue($value)
141
+ {
142
+ if ($value instanceof IWP_google_Model) {
143
+ return $value->toSimpleObject();
144
+ } else if (is_array($value)) {
145
+ $return = array();
146
+ foreach ($value as $key => $a_value) {
147
+ $a_value = $this->getSimpleValue($a_value);
148
+ if ($a_value !== null) {
149
+ $return[$key] = $a_value;
150
+ }
151
+ }
152
+ return $return;
153
+ }
154
+ return $value;
155
+ }
156
+
157
+ /**
158
+ * Returns true only if the array is associative.
159
+ * @param array $array
160
+ * @return bool True if the array is associative.
161
+ */
162
+ protected function isAssociativeArray($array)
163
+ {
164
+ if (!is_array($array)) {
165
+ return false;
166
+ }
167
+ $keys = array_keys($array);
168
+ foreach ($keys as $key) {
169
+ if (is_string($key)) {
170
+ return true;
171
+ }
172
+ }
173
+ return false;
174
+ }
175
+
176
+ /**
177
+ * Given a variable name, discover its type.
178
+ *
179
+ * @param $name
180
+ * @param $item
181
+ * @return object The object from the item.
182
+ */
183
+ private function createObjectFromName($name, $item)
184
+ {
185
+ $type = $this->$name;
186
+ return new $type($item);
187
+ }
188
+
189
+ /**
190
+ * Verify if $obj is an array.
191
+ * @throws IWP_google_Exception Thrown if $obj isn't an array.
192
+ * @param array $obj Items that should be validated.
193
+ * @param string $method Method expecting an array as an argument.
194
+ */
195
+ public function assertIsArray($obj, $method)
196
+ {
197
+ if ($obj && !is_array($obj)) {
198
+ throw new IWP_google_Exception(
199
+ "Incorrect parameter type passed to $method(). Expected an array."
200
+ );
201
+ }
202
+ }
203
+
204
+ public function offsetExists($offset)
205
+ {
206
+ return isset($this->$offset) || isset($this->modelData[$offset]);
207
+ }
208
+
209
+ public function offsetGet($offset)
210
+ {
211
+ return isset($this->$offset) ?
212
+ $this->$offset :
213
+ $this->__get($offset);
214
+ }
215
+
216
+ public function offsetSet($offset, $value)
217
+ {
218
+ if (property_exists($this, $offset)) {
219
+ $this->$offset = $value;
220
+ } else {
221
+ $this->modelData[$offset] = $value;
222
+ $this->processed[$offset] = true;
223
+ }
224
+ }
225
+
226
+ public function offsetUnset($offset)
227
+ {
228
+ unset($this->modelData[$offset]);
229
+ }
230
+
231
+ protected function keyType($key)
232
+ {
233
+ return $key . "Type";
234
+ }
235
+
236
+ protected function dataType($key)
237
+ {
238
+ return $key . "DataType";
239
+ }
240
+
241
+ public function __isset($key)
242
+ {
243
+ return isset($this->modelData[$key]);
244
+ }
245
+
246
+ public function __unset($key)
247
+ {
248
+ unset($this->modelData[$key]);
249
+ }
250
+ }
lib/Google/Service.php CHANGED
@@ -1,39 +1,39 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- class IWP_google_Service
19
- {
20
- public $version;
21
- public $servicePath;
22
- public $availableScopes;
23
- public $resource;
24
- private $client;
25
-
26
- public function __construct(IWP_google_Client $client)
27
- {
28
- $this->client = $client;
29
- }
30
-
31
- /**
32
- * Return the associated IWP_google_Client class.
33
- * @return IWP_google_Client
34
- */
35
- public function getClient()
36
- {
37
- return $this->client;
38
- }
39
- }
1
+ <?php
2
+ /*
3
+ * Copyright 2010 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ class IWP_google_Service
19
+ {
20
+ public $version;
21
+ public $servicePath;
22
+ public $availableScopes;
23
+ public $resource;
24
+ private $client;
25
+
26
+ public function __construct(IWP_google_Client $client)
27
+ {
28
+ $this->client = $client;
29
+ }
30
+
31
+ /**
32
+ * Return the associated IWP_google_Client class.
33
+ * @return IWP_google_Client
34
+ */
35
+ public function getClient()
36
+ {
37
+ return $this->client;
38
+ }
39
+ }
lib/Google/Service/Drive.php CHANGED
@@ -1,5732 +1,5732 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
- * use this file except in compliance with the License. You may obtain a copy of
7
- * the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
- * License for the specific language governing permissions and limitations under
15
- * the License.
16
- */
17
-
18
- /**
19
- * Service definition for Drive (v2).
20
- *
21
- * <p>
22
- * The API to interact with Drive.
23
- * </p>
24
- *
25
- * <p>
26
- * For more information about this service, see the API
27
- * <a href="https://developers.google.com/drive/" target="_blank">Documentation</a>
28
- * </p>
29
- *
30
- * @author Google, Inc.
31
- */
32
- class IWP_google_Service_Drive extends IWP_google_Service
33
- {
34
- /** View and manage the files and documents in your Google Drive. */
35
- const DRIVE = "https://www.googleapis.com/auth/drive";
36
- /** View and manage its own configuration data in your Google Drive. */
37
- const DRIVE_APPDATA = "https://www.googleapis.com/auth/drive.appdata";
38
- /** View your Google Drive apps. */
39
- const DRIVE_APPS_READONLY = "https://www.googleapis.com/auth/drive.apps.readonly";
40
- /** View and manage Google Drive files that you have opened or created with this app. */
41
- const DRIVE_FILE = "https://www.googleapis.com/auth/drive.file";
42
- /** View metadata for files and documents in your Google Drive. */
43
- const DRIVE_METADATA_READONLY = "https://www.googleapis.com/auth/drive.metadata.readonly";
44
- /** View the files and documents in your Google Drive. */
45
- const DRIVE_READONLY = "https://www.googleapis.com/auth/drive.readonly";
46
- /** Modify your Google Apps Script scripts' behavior. */
47
- const DRIVE_SCRIPTS = "https://www.googleapis.com/auth/drive.scripts";
48
-
49
- public $about;
50
- public $apps;
51
- public $changes;
52
- public $channels;
53
- public $children;
54
- public $comments;
55
- public $files;
56
- public $parents;
57
- public $permissions;
58
- public $properties;
59
- public $realtime;
60
- public $replies;
61
- public $revisions;
62
-
63
-
64
- /**
65
- * Constructs the internal representation of the Drive service.
66
- *
67
- * @param IWP_google_Client $client
68
- */
69
- public function __construct(IWP_google_Client $client)
70
- {
71
- parent::__construct($client);
72
- $this->servicePath = 'drive/v2/';
73
- $this->version = 'v2';
74
- $this->serviceName = 'drive';
75
-
76
- $this->about = new IWP_google_Service_Drive_About_Resource(
77
- $this,
78
- $this->serviceName,
79
- 'about',
80
- array(
81
- 'methods' => array(
82
- 'get' => array(
83
- 'path' => 'about',
84
- 'httpMethod' => 'GET',
85
- 'parameters' => array(
86
- 'includeSubscribed' => array(
87
- 'location' => 'query',
88
- 'type' => 'boolean',
89
- ),
90
- 'maxChangeIdCount' => array(
91
- 'location' => 'query',
92
- 'type' => 'string',
93
- ),
94
- 'startChangeId' => array(
95
- 'location' => 'query',
96
- 'type' => 'string',
97
- ),
98
- ),
99
- ),
100
- )
101
- )
102
- );
103
- $this->apps = new IWP_google_Service_Drive_Apps_Resource(
104
- $this,
105
- $this->serviceName,
106
- 'apps',
107
- array(
108
- 'methods' => array(
109
- 'get' => array(
110
- 'path' => 'apps/{appId}',
111
- 'httpMethod' => 'GET',
112
- 'parameters' => array(
113
- 'appId' => array(
114
- 'location' => 'path',
115
- 'type' => 'string',
116
- 'required' => true,
117
- ),
118
- ),
119
- ),'list' => array(
120
- 'path' => 'apps',
121
- 'httpMethod' => 'GET',
122
- 'parameters' => array(),
123
- ),
124
- )
125
- )
126
- );
127
- $this->changes = new IWP_google_Service_Drive_Changes_Resource(
128
- $this,
129
- $this->serviceName,
130
- 'changes',
131
- array(
132
- 'methods' => array(
133
- 'get' => array(
134
- 'path' => 'changes/{changeId}',
135
- 'httpMethod' => 'GET',
136
- 'parameters' => array(
137
- 'changeId' => array(
138
- 'location' => 'path',
139
- 'type' => 'string',
140
- 'required' => true,
141
- ),
142
- ),
143
- ),'list' => array(
144
- 'path' => 'changes',
145
- 'httpMethod' => 'GET',
146
- 'parameters' => array(
147
- 'includeSubscribed' => array(
148
- 'location' => 'query',
149
- 'type' => 'boolean',
150
- ),
151
- 'startChangeId' => array(
152
- 'location' => 'query',
153
- 'type' => 'string',
154
- ),
155
- 'includeDeleted' => array(
156
- 'location' => 'query',
157
- 'type' => 'boolean',
158
- ),
159
- 'maxResults' => array(
160
- 'location' => 'query',
161
- 'type' => 'integer',
162
- ),
163
- 'pageToken' => array(
164
- 'location' => 'query',
165
- 'type' => 'string',
166
- ),
167
- ),
168
- ),'watch' => array(
169
- 'path' => 'changes/watch',
170
- 'httpMethod' => 'POST',
171
- 'parameters' => array(
172
- 'includeSubscribed' => array(
173
- 'location' => 'query',
174
- 'type' => 'boolean',
175
- ),
176
- 'startChangeId' => array(
177
- 'location' => 'query',
178
- 'type' => 'string',
179
- ),
180
- 'includeDeleted' => array(
181
- 'location' => 'query',
182
- 'type' => 'boolean',
183
- ),
184
- 'maxResults' => array(
185
- 'location' => 'query',
186
- 'type' => 'integer',
187
- ),
188
- 'pageToken' => array(
189
- 'location' => 'query',
190
- 'type' => 'string',
191
- ),
192
- ),
193
- ),
194
- )
195
- )
196
- );
197
- $this->channels = new IWP_google_Service_Drive_Channels_Resource(
198
- $this,
199
- $this->serviceName,
200
- 'channels',
201
- array(
202
- 'methods' => array(
203
- 'stop' => array(
204
- 'path' => 'channels/stop',
205
- 'httpMethod' => 'POST',
206
- 'parameters' => array(),
207
- ),
208
- )
209
- )
210
- );
211
- $this->children = new IWP_google_Service_Drive_Children_Resource(
212
- $this,
213
- $this->serviceName,
214
- 'children',
215
- array(
216
- 'methods' => array(
217
- 'delete' => array(
218
- 'path' => 'files/{folderId}/children/{childId}',
219
- 'httpMethod' => 'DELETE',
220
- 'parameters' => array(
221
- 'folderId' => array(
222
- 'location' => 'path',
223
- 'type' => 'string',
224
- 'required' => true,
225
- ),
226
- 'childId' => array(
227
- 'location' => 'path',
228
- 'type' => 'string',
229
- 'required' => true,
230
- ),
231
- ),
232
- ),'get' => array(
233
- 'path' => 'files/{folderId}/children/{childId}',
234
- 'httpMethod' => 'GET',
235
- 'parameters' => array(
236
- 'folderId' => array(
237
- 'location' => 'path',
238
- 'type' => 'string',
239
- 'required' => true,
240
- ),
241
- 'childId' => array(
242
- 'location' => 'path',
243
- 'type' => 'string',
244
- 'required' => true,
245
- ),
246
- ),
247
- ),'insert' => array(
248
- 'path' => 'files/{folderId}/children',
249
- 'httpMethod' => 'POST',
250
- 'parameters' => array(
251
- 'folderId' => array(
252
- 'location' => 'path',
253
- 'type' => 'string',
254
- 'required' => true,
255
- ),
256
- ),
257
- ),'list' => array(
258
- 'path' => 'files/{folderId}/children',
259
- 'httpMethod' => 'GET',
260
- 'parameters' => array(
261
- 'folderId' => array(
262
- 'location' => 'path',
263
- 'type' => 'string',
264
- 'required' => true,
265
- ),
266
- 'q' => array(
267
- 'location' => 'query',
268
- 'type' => 'string',
269
- ),
270
- 'pageToken' => array(
271
- 'location' => 'query',
272
- 'type' => 'string',
273
- ),
274
- 'maxResults' => array(
275
- 'location' => 'query',
276
- 'type' => 'integer',
277
- ),
278
- ),
279
- ),
280
- )
281
- )
282
- );
283
- $this->comments = new IWP_google_Service_Drive_Comments_Resource(
284
- $this,
285
- $this->serviceName,
286
- 'comments',
287
- array(
288
- 'methods' => array(
289
- 'delete' => array(
290
- 'path' => 'files/{fileId}/comments/{commentId}',
291
- 'httpMethod' => 'DELETE',
292
- 'parameters' => array(
293
- 'fileId' => array(
294
- 'location' => 'path',
295
- 'type' => 'string',
296
- 'required' => true,
297
- ),
298
- 'commentId' => array(
299
- 'location' => 'path',
300
- 'type' => 'string',
301
- 'required' => true,
302
- ),
303
- ),
304
- ),'get' => array(
305
- 'path' => 'files/{fileId}/comments/{commentId}',
306
- 'httpMethod' => 'GET',
307
- 'parameters' => array(
308
- 'fileId' => array(
309
- 'location' => 'path',
310
- 'type' => 'string',
311
- 'required' => true,
312
- ),
313
- 'commentId' => array(
314
- 'location' => 'path',
315
- 'type' => 'string',
316
- 'required' => true,
317
- ),
318
- 'includeDeleted' => array(
319
- 'location' => 'query',
320
- 'type' => 'boolean',
321
- ),
322
- ),
323
- ),'insert' => array(
324
- 'path' => 'files/{fileId}/comments',
325
- 'httpMethod' => 'POST',
326
- 'parameters' => array(
327
- 'fileId' => array(
328
- 'location' => 'path',
329
- 'type' => 'string',
330
- 'required' => true,
331
- ),
332
- ),
333
- ),'list' => array(
334
- 'path' => 'files/{fileId}/comments',
335
- 'httpMethod' => 'GET',
336
- 'parameters' => array(
337
- 'fileId' => array(
338
- 'location' => 'path',
339
- 'type' => 'string',
340
- 'required' => true,
341
- ),
342
- 'pageToken' => array(
343
- 'location' => 'query',
344
- 'type' => 'string',
345
- ),
346
- 'updatedMin' => array(
347
- 'location' => 'query',
348
- 'type' => 'string',
349
- ),
350
- 'includeDeleted' => array(
351
- 'location' => 'query',
352
- 'type' => 'boolean',
353
- ),
354
- 'maxResults' => array(
355
- 'location' => 'query',
356
- 'type' => 'integer',
357
- ),
358
- ),
359
- ),'patch' => array(
360
- 'path' => 'files/{fileId}/comments/{commentId}',
361
- 'httpMethod' => 'PATCH',
362
- 'parameters' => array(
363
- 'fileId' => array(
364
- 'location' => 'path',
365
- 'type' => 'string',
366
- 'required' => true,
367
- ),
368
- 'commentId' => array(
369
- 'location' => 'path',
370
- 'type' => 'string',
371
- 'required' => true,
372
- ),
373
- ),
374
- ),'update' => array(
375
- 'path' => 'files/{fileId}/comments/{commentId}',
376
- 'httpMethod' => 'PUT',
377
- 'parameters' => array(
378
- 'fileId' => array(
379
- 'location' => 'path',
380
- 'type' => 'string',
381
- 'required' => true,
382
- ),
383
- 'commentId' => array(
384
- 'location' => 'path',
385
- 'type' => 'string',
386
- 'required' => true,
387
- ),
388
- ),
389
- ),
390
- )
391
- )
392
- );
393
- $this->files = new IWP_google_Service_Drive_Files_Resource(
394
- $this,
395
- $this->serviceName,
396
- 'files',
397
- array(
398
- 'methods' => array(
399
- 'copy' => array(
400
- 'path' => 'files/{fileId}/copy',
401
- 'httpMethod' => 'POST',
402
- 'parameters' => array(
403
- 'fileId' => array(
404
- 'location' => 'path',
405
- 'type' => 'string',
406
- 'required' => true,
407
- ),
408
- 'convert' => array(
409
- 'location' => 'query',
410
- 'type' => 'boolean',
411
- ),
412
- 'ocrLanguage' => array(
413
- 'location' => 'query',
414
- 'type' => 'string',
415
- ),
416
- 'visibility' => array(
417
- 'location' => 'query',
418
- 'type' => 'string',
419
- ),
420
- 'pinned' => array(
421
- 'location' => 'query',
422
- 'type' => 'boolean',
423
- ),
424
- 'ocr' => array(
425
- 'location' => 'query',
426
- 'type' => 'boolean',
427
- ),
428
- 'timedTextTrackName' => array(
429
- 'location' => 'query',
430
- 'type' => 'string',
431
- ),
432
- 'timedTextLanguage' => array(
433
- 'location' => 'query',
434
- 'type' => 'string',
435
- ),
436
- ),
437
- ),'delete' => array(
438
- 'path' => 'files/{fileId}',
439
- 'httpMethod' => 'DELETE',
440
- 'parameters' => array(
441
- 'fileId' => array(
442
- 'location' => 'path',
443
- 'type' => 'string',
444
- 'required' => true,
445
- ),
446
- ),
447
- ),'get' => array(
448
- 'path' => 'files/{fileId}',
449
- 'httpMethod' => 'GET',
450
- 'parameters' => array(
451
- 'fileId' => array(
452
- 'location' => 'path',
453
- 'type' => 'string',
454
- 'required' => true,
455
- ),
456
- 'updateViewedDate' => array(
457
- 'location' => 'query',
458
- 'type' => 'boolean',
459
- ),
460
- 'projection' => array(
461
- 'location' => 'query',
462
- 'type' => 'string',
463
- ),
464
- ),
465
- ),'insert' => array(
466
- 'path' => 'files',
467
- 'httpMethod' => 'POST',
468
- 'parameters' => array(
469
- 'convert' => array(
470
- 'location' => 'query',
471
- 'type' => 'boolean',
472
- ),
473
- 'useContentAsIndexableText' => array(
474
- 'location' => 'query',
475
- 'type' => 'boolean',
476
- ),
477
- 'ocrLanguage' => array(
478
- 'location' => 'query',
479
- 'type' => 'string',
480
- ),
481
- 'visibility' => array(
482
- 'location' => 'query',
483
- 'type' => 'string',
484
- ),
485
- 'pinned' => array(
486
- 'location' => 'query',
487
- 'type' => 'boolean',
488
- ),
489
- 'ocr' => array(
490
- 'location' => 'query',
491
- 'type' => 'boolean',
492
- ),
493
- 'timedTextTrackName' => array(
494
- 'location' => 'query',
495
- 'type' => 'string',
496
- ),
497
- 'timedTextLanguage' => array(
498
- 'location' => 'query',
499
- 'type' => 'string',
500
- ),
501
- ),
502
- ),'list' => array(
503
- 'path' => 'files',
504
- 'httpMethod' => 'GET',
505
- 'parameters' => array(
506
- 'q' => array(
507
- 'location' => 'query',
508
- 'type' => 'string',
509
- ),
510
- 'pageToken' => array(
511
- 'location' => 'query',
512
- 'type' => 'string',
513
- ),
514
- 'projection' => array(
515
- 'location' => 'query',
516
- 'type' => 'string',
517
- ),
518
- 'maxResults' => array(
519
- 'location' => 'query',
520
- 'type' => 'integer',
521
- ),
522
- ),
523
- ),'patch' => array(
524
- 'path' => 'files/{fileId}',
525
- 'httpMethod' => 'PATCH',
526
- 'parameters' => array(
527
- 'fileId' => array(
528
- 'location' => 'path',
529
- 'type' => 'string',
530
- 'required' => true,
531
- ),
532
- 'convert' => array(
533
- 'location' => 'query',
534
- 'type' => 'boolean',
535
- ),
536
- 'updateViewedDate' => array(
537
- 'location' => 'query',
538
- 'type' => 'boolean',
539
- ),
540
- 'setModifiedDate' => array(
541
- 'location' => 'query',
542
- 'type' => 'boolean',
543
- ),
544
- 'useContentAsIndexableText' => array(
545
- 'location' => 'query',
546
- 'type' => 'boolean',
547
- ),
548
- 'ocrLanguage' => array(
549
- 'location' => 'query',
550
- 'type' => 'string',
551
- ),
552
- 'pinned' => array(
553
- 'location' => 'query',
554
- 'type' => 'boolean',
555
- ),
556
- 'newRevision' => array(
557
- 'location' => 'query',
558
- 'type' => 'boolean',
559
- ),
560
- 'ocr' => array(
561
- 'location' => 'query',
562
- 'type' => 'boolean',
563
- ),
564
- 'timedTextLanguage' => array(
565
- 'location' => 'query',
566
- 'type' => 'string',
567
- ),
568
- 'timedTextTrackName' => array(
569
- 'location' => 'query',
570
- 'type' => 'string',
571
- ),
572
- ),
573
- ),'touch' => array(
574
- 'path' => 'files/{fileId}/touch',
575
- 'httpMethod' => 'POST',
576
- 'parameters' => array(
577
- 'fileId' => array(
578
- 'location' => 'path',
579
- 'type' => 'string',
580
- 'required' => true,
581
- ),
582
- ),
583
- ),'trash' => array(
584
- 'path' => 'files/{fileId}/trash',
585
- 'httpMethod' => 'POST',
586
- 'parameters' => array(
587
- 'fileId' => array(
588
- 'location' => 'path',
589
- 'type' => 'string',
590
- 'required' => true,
591
- ),
592
- ),
593
- ),'untrash' => array(
594
- 'path' => 'files/{fileId}/untrash',
595
- 'httpMethod' => 'POST',
596
- 'parameters' => array(
597
- 'fileId' => array(
598
- 'location' => 'path',
599
- 'type' => 'string',
600
- 'required' => true,
601
- ),
602
- ),
603
- ),'update' => array(
604
- 'path' => 'files/{fileId}',
605
- 'httpMethod' => 'PUT',
606
- 'parameters' => array(
607
- 'fileId' => array(
608
- 'location' => 'path',
609
- 'type' => 'string',
610
- 'required' => true,
611
- ),
612
- 'convert' => array(
613
- 'location' => 'query',
614
- 'type' => 'boolean',
615
- ),
616
- 'updateViewedDate' => array(
617
- 'location' => 'query',
618
- 'type' => 'boolean',
619
- ),
620
- 'setModifiedDate' => array(
621
- 'location' => 'query',
622
- 'type' => 'boolean',
623
- ),
624
- 'useContentAsIndexableText' => array(
625
- 'location' => 'query',
626
- 'type' => 'boolean',
627
- ),
628
- 'ocrLanguage' => array(
629
- 'location' => 'query',
630
- 'type' => 'string',
631
- ),
632
- 'pinned' => array(
633
- 'location' => 'query',
634
- 'type' => 'boolean',
635
- ),
636
- 'newRevision' => array(
637
- 'location' => 'query',
638
- 'type' => 'boolean',
639
- ),
640
- 'ocr' => array(
641
- 'location' => 'query',
642
- 'type' => 'boolean',
643
- ),
644
- 'timedTextLanguage' => array(
645
- 'location' => 'query',
646
- 'type' => 'string',
647
- ),
648
- 'timedTextTrackName' => array(
649
- 'location' => 'query',
650
- 'type' => 'string',
651
- ),
652
- ),
653
- ),'watch' => array(
654
- 'path' => 'files/{fileId}/watch',
655
- 'httpMethod' => 'POST',
656
- 'parameters' => array(
657
- 'fileId' => array(
658
- 'location' => 'path',
659
- 'type' => 'string',
660
- 'required' => true,
661
- ),
662
- 'updateViewedDate' => array(
663
- 'location' => 'query',
664
- 'type' => 'boolean',
665
- ),
666
- 'projection' => array(
667
- 'location' => 'query',
668
- 'type' => 'string',
669
- ),
670
- ),
671
- ),
672
- )
673
- )
674
- );
675
- $this->parents = new IWP_google_Service_Drive_Parents_Resource(
676
- $this,
677
- $this->serviceName,
678
- 'parents',
679
- array(
680
- 'methods' => array(
681
- 'delete' => array(
682
- 'path' => 'files/{fileId}/parents/{parentId}',
683
- 'httpMethod' => 'DELETE',
684
- 'parameters' => array(
685
- 'fileId' => array(
686
- 'location' => 'path',
687
- 'type' => 'string',
688
- 'required' => true,
689
- ),
690
- 'parentId' => array(
691
- 'location' => 'path',
692
- 'type' => 'string',
693
- 'required' => true,
694
- ),
695
- ),
696
- ),'get' => array(
697
- 'path' => 'files/{fileId}/parents/{parentId}',
698
- 'httpMethod' => 'GET',
699
- 'parameters' => array(
700
- 'fileId' => array(
701
- 'location' => 'path',
702
- 'type' => 'string',
703
- 'required' => true,
704
- ),
705
- 'parentId' => array(
706
- 'location' => 'path',
707
- 'type' => 'string',
708
- 'required' => true,
709
- ),
710
- ),
711
- ),'insert' => array(
712
- 'path' => 'files/{fileId}/parents',
713
- 'httpMethod' => 'POST',
714
- 'parameters' => array(
715
- 'fileId' => array(
716
- 'location' => 'path',
717
- 'type' => 'string',
718
- 'required' => true,
719
- ),
720
- ),
721
- ),'list' => array(
722
- 'path' => 'files/{fileId}/parents',
723
- 'httpMethod' => 'GET',
724
- 'parameters' => array(
725
- 'fileId' => array(
726
- 'location' => 'path',
727
- 'type' => 'string',
728
- 'required' => true,
729
- ),
730
- ),
731
- ),
732
- )
733
- )
734
- );
735
- $this->permissions = new IWP_google_Service_Drive_Permissions_Resource(
736
- $this,
737
- $this->serviceName,
738
- 'permissions',
739
- array(
740
- 'methods' => array(
741
- 'delete' => array(
742
- 'path' => 'files/{fileId}/permissions/{permissionId}',
743
- 'httpMethod' => 'DELETE',
744
- 'parameters' => array(
745
- 'fileId' => array(
746
- 'location' => 'path',
747
- 'type' => 'string',
748
- 'required' => true,
749
- ),
750
- 'permissionId' => array(
751
- 'location' => 'path',
752
- 'type' => 'string',
753
- 'required' => true,
754
- ),
755
- ),
756
- ),'get' => array(
757
- 'path' => 'files/{fileId}/permissions/{permissionId}',
758
- 'httpMethod' => 'GET',
759
- 'parameters' => array(
760
- 'fileId' => array(
761
- 'location' => 'path',
762
- 'type' => 'string',
763
- 'required' => true,
764
- ),
765
- 'permissionId' => array(
766
- 'location' => 'path',
767
- 'type' => 'string',
768
- 'required' => true,
769
- ),
770
- ),
771
- ),'getIdForEmail' => array(
772
- 'path' => 'permissionIds/{email}',
773
- 'httpMethod' => 'GET',
774
- 'parameters' => array(
775
- 'email' => array(
776
- 'location' => 'path',
777
- 'type' => 'string',
778
- 'required' => true,
779
- ),
780
- ),
781
- ),'insert' => array(
782
- 'path' => 'files/{fileId}/permissions',
783
- 'httpMethod' => 'POST',
784
- 'parameters' => array(
785
- 'fileId' => array(
786
- 'location' => 'path',
787
- 'type' => 'string',
788
- 'required' => true,
789
- ),
790
- 'emailMessage' => array(
791
- 'location' => 'query',
792
- 'type' => 'string',
793
- ),
794
- 'sendNotificationEmails' => array(
795
- 'location' => 'query',
796
- 'type' => 'boolean',
797
- ),
798
- ),
799
- ),'list' => array(
800
- 'path' => 'files/{fileId}/permissions',
801
- 'httpMethod' => 'GET',
802
- 'parameters' => array(
803
- 'fileId' => array(
804
- 'location' => 'path',
805
- 'type' => 'string',
806
- 'required' => true,
807
- ),
808
- ),
809
- ),'patch' => array(
810
- 'path' => 'files/{fileId}/permissions/{permissionId}',
811
- 'httpMethod' => 'PATCH',
812
- 'parameters' => array(
813
- 'fileId' => array(
814
- 'location' => 'path',
815
- 'type' => 'string',
816
- 'required' => true,
817
- ),
818
- 'permissionId' => array(
819
- 'location' => 'path',
820
- 'type' => 'string',
821
- 'required' => true,
822
- ),
823
- 'transferOwnership' => array(
824
- 'location' => 'query',
825
- 'type' => 'boolean',
826
- ),
827
- ),
828
- ),'update' => array(
829
- 'path' => 'files/{fileId}/permissions/{permissionId}',
830
- 'httpMethod' => 'PUT',
831
- 'parameters' => array(
832
- 'fileId' => array(
833
- 'location' => 'path',
834
- 'type' => 'string',
835
- 'required' => true,
836
- ),
837
- 'permissionId' => array(
838
- 'location' => 'path',
839
- 'type' => 'string',
840
- 'required' => true,
841
- ),
842
- 'transferOwnership' => array(
843
- 'location' => 'query',
844
- 'type' => 'boolean',
845
- ),
846
- ),
847
- ),
848
- )
849
- )
850
- );
851
- $this->properties = new IWP_google_Service_Drive_Properties_Resource(
852
- $this,
853
- $this->serviceName,
854
- 'properties',
855
- array(
856
- 'methods' => array(
857
- 'delete' => array(
858
- 'path' => 'files/{fileId}/properties/{propertyKey}',
859
- 'httpMethod' => 'DELETE',
860
- 'parameters' => array(
861
- 'fileId' => array(
862
- 'location' => 'path',
863
- 'type' => 'string',
864
- 'required' => true,
865
- ),
866
- 'propertyKey' => array(
867
- 'location' => 'path',
868
- 'type' => 'string',
869
- 'required' => true,
870
- ),
871
- 'visibility' => array(
872
- 'location' => 'query',
873
- 'type' => 'string',
874
- ),
875
- ),
876
- ),'get' => array(
877
- 'path' => 'files/{fileId}/properties/{propertyKey}',
878
- 'httpMethod' => 'GET',
879
- 'parameters' => array(
880
- 'fileId' => array(
881
- 'location' => 'path',
882
- 'type' => 'string',
883
- 'required' => true,
884
- ),
885
- 'propertyKey' => array(
886
- 'location' => 'path',
887
- 'type' => 'string',
888
- 'required' => true,
889
- ),
890
- 'visibility' => array(
891
- 'location' => 'query',
892
- 'type' => 'string',
893
- ),
894
- ),
895
- ),'insert' => array(
896
- 'path' => 'files/{fileId}/properties',
897
- 'httpMethod' => 'POST',
898
- 'parameters' => array(
899
- 'fileId' => array(
900
- 'location' => 'path',
901
- 'type' => 'string',
902
- 'required' => true,
903
- ),
904
- ),
905
- ),'list' => array(
906
- 'path' => 'files/{fileId}/properties',
907
- 'httpMethod' => 'GET',
908
- 'parameters' => array(
909
- 'fileId' => array(
910
- 'location' => 'path',
911
- 'type' => 'string',
912
- 'required' => true,
913
- ),
914
- ),
915
- ),'patch' => array(
916
- 'path' => 'files/{fileId}/properties/{propertyKey}',
917
- 'httpMethod' => 'PATCH',
918
- 'parameters' => array(
919
- 'fileId' => array(
920
- 'location' => 'path',
921
- 'type' => 'string',
922
- 'required' => true,
923
- ),
924
- 'propertyKey' => array(
925
- 'location' => 'path',
926
- 'type' => 'string',
927
- 'required' => true,
928
- ),
929
- 'visibility' => array(
930
- 'location' => 'query',
931
- 'type' => 'string',
932
- ),
933
- ),
934
- ),'update' => array(
935
- 'path' => 'files/{fileId}/properties/{propertyKey}',
936
- 'httpMethod' => 'PUT',
937
- 'parameters' => array(
938
- 'fileId' => array(
939
- 'location' => 'path',
940
- 'type' => 'string',
941
- 'required' => true,
942
- ),
943
- 'propertyKey' => array(
944
- 'location' => 'path',
945
- 'type' => 'string',
946
- 'required' => true,
947
- ),
948
- 'visibility' => array(
949
- 'location' => 'query',
950
- 'type' => 'string',
951
- ),
952
- ),
953
- ),
954
- )
955
- )
956
- );
957
- $this->realtime = new IWP_google_Service_Drive_Realtime_Resource(
958
- $this,
959
- $this->serviceName,
960
- 'realtime',
961
- array(
962
- 'methods' => array(
963
- 'get' => array(
964
- 'path' => 'files/{fileId}/realtime',
965
- 'httpMethod' => 'GET',
966
- 'parameters' => array(
967
- 'fileId' => array(
968
- 'location' => 'path',
969
- 'type' => 'string',
970
- 'required' => true,
971
- ),
972
- ),
973
- ),'update' => array(
974
- 'path' => 'files/{fileId}/realtime',
975
- 'httpMethod' => 'PUT',
976
- 'parameters' => array(
977
- 'fileId' => array(
978
- 'location' => 'path',
979
- 'type' => 'string',
980
- 'required' => true,
981
- ),
982
- 'baseRevision' => array(
983
- 'location' => 'query',
984
- 'type' => 'string',
985
- ),
986
- ),
987
- ),
988
- )
989
- )
990
- );
991
- $this->replies = new IWP_google_Service_Drive_Replies_Resource(
992
- $this,
993
- $this->serviceName,
994
- 'replies',
995
- array(
996
- 'methods' => array(
997
- 'delete' => array(
998
- 'path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}',
999
- 'httpMethod' => 'DELETE',
1000
- 'parameters' => array(
1001
- 'fileId' => array(
1002
- 'location' => 'path',
1003
- 'type' => 'string',
1004
- 'required' => true,
1005
- ),
1006
- 'commentId' => array(
1007
- 'location' => 'path',
1008
- 'type' => 'string',
1009
- 'required' => true,
1010
- ),
1011
- 'replyId' => array(
1012
- 'location' => 'path',
1013
- 'type' => 'string',
1014
- 'required' => true,
1015
- ),
1016
- ),
1017
- ),'get' => array(
1018
- 'path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}',
1019
- 'httpMethod' => 'GET',
1020
- 'parameters' => array(
1021
- 'fileId' => array(
1022
- 'location' => 'path',
1023
- 'type' => 'string',
1024
- 'required' => true,
1025
- ),
1026
- 'commentId' => array(
1027
- 'location' => 'path',
1028
- 'type' => 'string',
1029
- 'required' => true,
1030
- ),
1031
- 'replyId' => array(
1032
- 'location' => 'path',
1033
- 'type' => 'string',
1034
- 'required' => true,
1035
- ),
1036
- 'includeDeleted' => array(
1037
- 'location' => 'query',
1038
- 'type' => 'boolean',
1039
- ),
1040
- ),
1041
- ),'insert' => array(
1042
- 'path' => 'files/{fileId}/comments/{commentId}/replies',
1043
- 'httpMethod' => 'POST',
1044
- 'parameters' => array(
1045
- 'fileId' => array(
1046
- 'location' => 'path',
1047
- 'type' => 'string',
1048
- 'required' => true,
1049
- ),
1050
- 'commentId' => array(
1051
- 'location' => 'path',
1052
- 'type' => 'string',
1053
- 'required' => true,
1054
- ),
1055
- ),
1056
- ),'list' => array(
1057
- 'path' => 'files/{fileId}/comments/{commentId}/replies',
1058
- 'httpMethod' => 'GET',
1059
- 'parameters' => array(
1060
- 'fileId' => array(
1061
- 'location' => 'path',
1062
- 'type' => 'string',
1063
- 'required' => true,
1064
- ),
1065
- 'commentId' => array(
1066
- 'location' => 'path',
1067
- 'type' => 'string',
1068
- 'required' => true,
1069
- ),
1070
- 'pageToken' => array(
1071
- 'location' => 'query',
1072
- 'type' => 'string',
1073
- ),
1074
- 'includeDeleted' => array(
1075
- 'location' => 'query',
1076
- 'type' => 'boolean',
1077
- ),
1078
- 'maxResults' => array(
1079
- 'location' => 'query',
1080
- 'type' => 'integer',
1081
- ),
1082
- ),
1083
- ),'patch' => array(
1084
- 'path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}',
1085
- 'httpMethod' => 'PATCH',
1086
- 'parameters' => array(
1087
- 'fileId' => array(
1088
- 'location' => 'path',
1089
- 'type' => 'string',
1090
- 'required' => true,
1091
- ),
1092
- 'commentId' => array(
1093
- 'location' => 'path',
1094
- 'type' => 'string',
1095
- 'required' => true,
1096
- ),
1097
- 'replyId' => array(
1098
- 'location' => 'path',
1099
- 'type' => 'string',
1100
- 'required' => true,
1101
- ),
1102
- ),
1103
- ),'update' => array(
1104
- 'path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}',
1105
- 'httpMethod' => 'PUT',
1106
- 'parameters' => array(
1107
- 'fileId' => array(
1108
- 'location' => 'path',
1109
- 'type' => 'string',
1110
- 'required' => true,
1111
- ),
1112
- 'commentId' => array(
1113
- 'location' => 'path',
1114
- 'type' => 'string',
1115
- 'required' => true,
1116
- ),
1117
- 'replyId' => array(
1118
- 'location' => 'path',
1119
- 'type' => 'string',
1120
- 'required' => true,
1121
- ),
1122
- ),
1123
- ),
1124
- )
1125
- )
1126
- );
1127
- $this->revisions = new IWP_google_Service_Drive_Revisions_Resource(
1128
- $this,
1129
- $this->serviceName,
1130
- 'revisions',
1131
- array(
1132
- 'methods' => array(
1133
- 'delete' => array(
1134
- 'path' => 'files/{fileId}/revisions/{revisionId}',
1135
- 'httpMethod' => 'DELETE',
1136
- 'parameters' => array(
1137
- 'fileId' => array(
1138
- 'location' => 'path',
1139
- 'type' => 'string',
1140
- 'required' => true,
1141
- ),
1142
- 'revisionId' => array(
1143
- 'location' => 'path',
1144
- 'type' => 'string',
1145
- 'required' => true,
1146
- ),
1147
- ),
1148
- ),'get' => array(
1149
- 'path' => 'files/{fileId}/revisions/{revisionId}',
1150
- 'httpMethod' => 'GET',
1151
- 'parameters' => array(
1152
- 'fileId' => array(
1153
- 'location' => 'path',
1154
- 'type' => 'string',
1155
- 'required' => true,
1156
- ),
1157
- 'revisionId' => array(
1158
- 'location' => 'path',
1159
- 'type' => 'string',
1160
- 'required' => true,
1161
- ),
1162
- ),
1163
- ),'list' => array(
1164
- 'path' => 'files/{fileId}/revisions',
1165
- 'httpMethod' => 'GET',
1166
- 'parameters' => array(
1167
- 'fileId' => array(
1168
- 'location' => 'path',
1169
- 'type' => 'string',
1170
- 'required' => true,
1171
- ),
1172
- ),
1173
- ),'patch' => array(
1174
- 'path' => 'files/{fileId}/revisions/{revisionId}',
1175
- 'httpMethod' => 'PATCH',
1176
- 'parameters' => array(
1177
- 'fileId' => array(
1178
- 'location' => 'path',
1179
- 'type' => 'string',
1180
- 'required' => true,
1181
- ),
1182
- 'revisionId' => array(
1183
- 'location' => 'path',
1184
- 'type' => 'string',
1185
- 'required' => true,
1186
- ),
1187
- ),
1188
- ),'update' => array(
1189
- 'path' => 'files/{fileId}/revisions/{revisionId}',
1190
- 'httpMethod' => 'PUT',
1191
- 'parameters' => array(
1192
- 'fileId' => array(
1193
- 'location' => 'path',
1194
- 'type' => 'string',
1195
- 'required' => true,
1196
- ),
1197
- 'revisionId' => array(
1198
- 'location' => 'path',
1199
- 'type' => 'string',
1200
- 'required' => true,
1201
- ),
1202
- ),
1203
- ),
1204
- )
1205
- )
1206
- );
1207
- }
1208
- }
1209
-
1210
-
1211
- /**
1212
- * The "about" collection of methods.
1213
- * Typical usage is:
1214
- * <code>
1215
- * $driveService = new IWP_google_Service_Drive(...);
1216
- * $about = $driveService->about;
1217
- * </code>
1218
- */
1219
- class IWP_google_Service_Drive_About_Resource extends IWP_google_Service_Resource
1220
- {
1221
-
1222
- /**
1223
- * Gets the information about the current user along with Drive API settings
1224
- * (about.get)
1225
- *
1226
- * @param array $optParams Optional parameters.
1227
- *
1228
- * @opt_param bool includeSubscribed
1229
- * When calculating the number of remaining change IDs, whether to include shared files and public
1230
- * files the user has opened. When set to false, this counts only change IDs for owned files and
1231
- * any shared or public files that the user has explictly added to a folder in Drive.
1232
- * @opt_param string maxChangeIdCount
1233
- * Maximum number of remaining change IDs to count
1234
- * @opt_param string startChangeId
1235
- * Change ID to start counting from when calculating number of remaining change IDs
1236
- * @return IWP_google_Service_Drive_About
1237
- */
1238
- public function get($optParams = array())
1239
- {
1240
- $params = array();
1241
- $params = array_merge($params, $optParams);
1242
- return $this->call('get', array($params), "IWP_google_Service_Drive_About");
1243
- }
1244
- }
1245
-
1246
- /**
1247
- * The "apps" collection of methods.
1248
- * Typical usage is:
1249
- * <code>
1250
- * $driveService = new IWP_google_Service_Drive(...);
1251
- * $apps = $driveService->apps;
1252
- * </code>
1253
- */
1254
- class IWP_google_Service_Drive_Apps_Resource extends IWP_google_Service_Resource
1255
- {
1256
-
1257
- /**
1258
- * Gets a specific app. (apps.get)
1259
- *
1260
- * @param string $appId
1261
- * The ID of the app.
1262
- * @param array $optParams Optional parameters.
1263
- * @return IWP_google_Service_Drive_App
1264
- */
1265
- public function get($appId, $optParams = array())
1266
- {
1267
- $params = array('appId' => $appId);
1268
- $params = array_merge($params, $optParams);
1269
- return $this->call('get', array($params), "IWP_google_Service_Drive_App");
1270
- }
1271
- /**
1272
- * Lists a user's installed apps. (apps.listApps)
1273
- *
1274
- * @param array $optParams Optional parameters.
1275
- * @return IWP_google_Service_Drive_AppList
1276
- */
1277
- public function listApps($optParams = array())
1278
- {
1279
- $params = array();
1280
- $params = array_merge($params, $optParams);
1281
- return $this->call('list', array($params), "IWP_google_Service_Drive_AppList");
1282
- }
1283
- }
1284
-
1285
- /**
1286
- * The "changes" collection of methods.
1287
- * Typical usage is:
1288
- * <code>
1289
- * $driveService = new IWP_google_Service_Drive(...);
1290
- * $changes = $driveService->changes;
1291
- * </code>
1292
- */
1293
- class IWP_google_Service_Drive_Changes_Resource extends IWP_google_Service_Resource
1294
- {
1295
-
1296
- /**
1297
- * Gets a specific change. (changes.get)
1298
- *
1299
- * @param string $changeId
1300
- * The ID of the change.
1301
- * @param array $optParams Optional parameters.
1302
- * @return IWP_google_Service_Drive_Change
1303
- */
1304
- public function get($changeId, $optParams = array())
1305
- {
1306
- $params = array('changeId' => $changeId);
1307
- $params = array_merge($params, $optParams);
1308
- return $this->call('get', array($params), "IWP_google_Service_Drive_Change");
1309
- }
1310
- /**
1311
- * Lists the changes for a user. (changes.listChanges)
1312
- *
1313
- * @param array $optParams Optional parameters.
1314
- *
1315
- * @opt_param bool includeSubscribed
1316
- * Whether to include shared files and public files the user has opened. When set to false, the
1317
- * list will include owned files plus any shared or public files the user has explictly added to a
1318
- * folder in Drive.
1319
- * @opt_param string startChangeId
1320
- * Change ID to start listing changes from.
1321
- * @opt_param bool includeDeleted
1322
- * Whether to include deleted items.
1323
- * @opt_param int maxResults
1324
- * Maximum number of changes to return.
1325
- * @opt_param string pageToken
1326
- * Page token for changes.
1327
- * @return IWP_google_Service_Drive_ChangeList
1328
- */
1329
- public function listChanges($optParams = array())
1330
- {
1331
- $params = array();
1332
- $params = array_merge($params, $optParams);
1333
- return $this->call('list', array($params), "IWP_google_Service_Drive_ChangeList");
1334
- }
1335
- /**
1336
- * Subscribe to changes for a user. (changes.watch)
1337
- *
1338
- * @param IWP_google_Channel $postBody
1339
- * @param array $optParams Optional parameters.
1340
- *
1341
- * @opt_param bool includeSubscribed
1342
- * Whether to include shared files and public files the user has opened. When set to false, the
1343
- * list will include owned files plus any shared or public files the user has explictly added to a
1344
- * folder in Drive.
1345
- * @opt_param string startChangeId
1346
- * Change ID to start listing changes from.
1347
- * @opt_param bool includeDeleted
1348
- * Whether to include deleted items.
1349
- * @opt_param int maxResults
1350
- * Maximum number of changes to return.
1351
- * @opt_param string pageToken
1352
- * Page token for changes.
1353
- * @return IWP_google_Service_Drive_Channel
1354
- */
1355
- public function watch(IWP_google_Service_Drive_Channel $postBody, $optParams = array())
1356
- {
1357
- $params = array('postBody' => $postBody);
1358
- $params = array_merge($params, $optParams);
1359
- return $this->call('watch', array($params), "IWP_google_Service_Drive_Channel");
1360
- }
1361
- }
1362
-
1363
- /**
1364
- * The "channels" collection of methods.
1365
- * Typical usage is:
1366
- * <code>
1367
- * $driveService = new IWP_google_Service_Drive(...);
1368
- * $channels = $driveService->channels;
1369
- * </code>
1370
- */
1371
- class IWP_google_Service_Drive_Channels_Resource extends IWP_google_Service_Resource
1372
- {
1373
-
1374
- /**
1375
- * Stop watching resources through this channel (channels.stop)
1376
- *
1377
- * @param IWP_google_Channel $postBody
1378
- * @param array $optParams Optional parameters.
1379
- */
1380
- public function stop(IWP_google_Service_Drive_Channel $postBody, $optParams = array())
1381
- {
1382
- $params = array('postBody' => $postBody);
1383
- $params = array_merge($params, $optParams);
1384
- return $this->call('stop', array($params));
1385
- }
1386
- }
1387
-
1388
- /**
1389
- * The "children" collection of methods.
1390
- * Typical usage is:
1391
- * <code>
1392
- * $driveService = new IWP_google_Service_Drive(...);
1393
- * $children = $driveService->children;
1394
- * </code>
1395
- */
1396
- class IWP_google_Service_Drive_Children_Resource extends IWP_google_Service_Resource
1397
- {
1398
-
1399
- /**
1400
- * Removes a child from a folder. (children.delete)
1401
- *
1402
- * @param string $folderId
1403
- * The ID of the folder.
1404
- * @param string $childId
1405
- * The ID of the child.
1406
- * @param array $optParams Optional parameters.
1407
- */
1408
- public function delete($folderId, $childId, $optParams = array())
1409
- {
1410
- $params = array('folderId' => $folderId, 'childId' => $childId);
1411
- $params = array_merge($params, $optParams);
1412
- return $this->call('delete', array($params));
1413
- }
1414
- /**
1415
- * Gets a specific child reference. (children.get)
1416
- *
1417
- * @param string $folderId
1418
- * The ID of the folder.
1419
- * @param string $childId
1420
- * The ID of the child.
1421
- * @param array $optParams Optional parameters.
1422
- * @return IWP_google_Service_Drive_ChildReference
1423
- */
1424
- public function get($folderId, $childId, $optParams = array())
1425
- {
1426
- $params = array('folderId' => $folderId, 'childId' => $childId);
1427
- $params = array_merge($params, $optParams);
1428
- return $this->call('get', array($params), "IWP_google_Service_Drive_ChildReference");
1429
- }
1430
- /**
1431
- * Inserts a file into a folder. (children.insert)
1432
- *
1433
- * @param string $folderId
1434
- * The ID of the folder.
1435
- * @param IWP_google_ChildReference $postBody
1436
- * @param array $optParams Optional parameters.
1437
- * @return IWP_google_Service_Drive_ChildReference
1438
- */
1439
- public function insert($folderId, IWP_google_Service_Drive_ChildReference $postBody, $optParams = array())
1440
- {
1441
- $params = array('folderId' => $folderId, 'postBody' => $postBody);
1442
- $params = array_merge($params, $optParams);
1443
- return $this->call('insert', array($params), "IWP_google_Service_Drive_ChildReference");
1444
- }
1445
- /**
1446
- * Lists a folder's children. (children.listChildren)
1447
- *
1448
- * @param string $folderId
1449
- * The ID of the folder.
1450
- * @param array $optParams Optional parameters.
1451
- *
1452
- * @opt_param string q
1453
- * Query string for searching children.
1454
- * @opt_param string pageToken
1455
- * Page token for children.
1456
- * @opt_param int maxResults
1457
- * Maximum number of children to return.
1458
- * @return IWP_google_Service_Drive_ChildList
1459
- */
1460
- public function listChildren($folderId, $optParams = array())
1461
- {
1462
- $params = array('folderId' => $folderId);
1463
- $params = array_merge($params, $optParams);
1464
- return $this->call('list', array($params), "IWP_google_Service_Drive_ChildList");
1465
- }
1466
- }
1467
-
1468
- /**
1469
- * The "comments" collection of methods.
1470
- * Typical usage is:
1471
- * <code>
1472
- * $driveService = new IWP_google_Service_Drive(...);
1473
- * $comments = $driveService->comments;
1474
- * </code>
1475
- */
1476
- class IWP_google_Service_Drive_Comments_Resource extends IWP_google_Service_Resource
1477
- {
1478
-
1479
- /**
1480
- * Deletes a comment. (comments.delete)
1481
- *
1482
- * @param string $fileId
1483
- * The ID of the file.
1484
- * @param string $commentId
1485
- * The ID of the comment.
1486
- * @param array $optParams Optional parameters.
1487
- */
1488
- public function delete($fileId, $commentId, $optParams = array())
1489
- {
1490
- $params = array('fileId' => $fileId, 'commentId' => $commentId);
1491
- $params = array_merge($params, $optParams);
1492
- return $this->call('delete', array($params));
1493
- }
1494
- /**
1495
- * Gets a comment by ID. (comments.get)
1496
- *
1497
- * @param string $fileId
1498
- * The ID of the file.
1499
- * @param string $commentId
1500
- * The ID of the comment.
1501
- * @param array $optParams Optional parameters.
1502
- *
1503
- * @opt_param bool includeDeleted
1504
- * If set, this will succeed when retrieving a deleted comment, and will include any deleted
1505
- * replies.
1506
- * @return IWP_google_Service_Drive_Comment
1507
- */
1508
- public function get($fileId, $commentId, $optParams = array())
1509
- {
1510
- $params = array('fileId' => $fileId, 'commentId' => $commentId);
1511
- $params = array_merge($params, $optParams);
1512
- return $this->call('get', array($params), "IWP_google_Service_Drive_Comment");
1513
- }
1514
- /**
1515
- * Creates a new comment on the given file. (comments.insert)
1516
- *
1517
- * @param string $fileId
1518
- * The ID of the file.
1519
- * @param IWP_google_Comment $postBody
1520
- * @param array $optParams Optional parameters.
1521
- * @return IWP_google_Service_Drive_Comment
1522
- */
1523
- public function insert($fileId, IWP_google_Service_Drive_Comment $postBody, $optParams = array())
1524
- {
1525
- $params = array('fileId' => $fileId, 'postBody' => $postBody);
1526
- $params = array_merge($params, $optParams);
1527
- return $this->call('insert', array($params), "IWP_google_Service_Drive_Comment");
1528
- }
1529
- /**
1530
- * Lists a file's comments. (comments.listComments)
1531
- *
1532
- * @param string $fileId
1533
- * The ID of the file.
1534
- * @param array $optParams Optional parameters.
1535
- *
1536
- * @opt_param string pageToken
1537
- * The continuation token, used to page through large result sets. To get the next page of results,
1538
- * set this parameter to the value of "nextPageToken" from the previous response.
1539
- * @opt_param string updatedMin
1540
- * Only discussions that were updated after this timestamp will be returned. Formatted as an RFC
1541
- * 3339 timestamp.
1542
- * @opt_param bool includeDeleted
1543
- * If set, all comments and replies, including deleted comments and replies (with content stripped)
1544
- * will be returned.
1545
- * @opt_param int maxResults
1546
- * The maximum number of discussions to include in the response, used for paging.
1547
- * @return IWP_google_Service_Drive_CommentList
1548
- */
1549
- public function listComments($fileId, $optParams = array())
1550
- {
1551
- $params = array('fileId' => $fileId);
1552
- $params = array_merge($params, $optParams);
1553
- return $this->call('list', array($params), "IWP_google_Service_Drive_CommentList");
1554
- }
1555
- /**
1556
- * Updates an existing comment. This method supports patch semantics.
1557
- * (comments.patch)
1558
- *
1559
- * @param string $fileId
1560
- * The ID of the file.
1561
- * @param string $commentId
1562
- * The ID of the comment.
1563
- * @param IWP_google_Comment $postBody
1564
- * @param array $optParams Optional parameters.
1565
- * @return IWP_google_Service_Drive_Comment
1566
- */
1567
- public function patch($fileId, $commentId, IWP_google_Service_Drive_Comment $postBody, $optParams = array())
1568
- {
1569
- $params = array('fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody);
1570
- $params = array_merge($params, $optParams);
1571
- return $this->call('patch', array($params), "IWP_google_Service_Drive_Comment");
1572
- }
1573
- /**
1574
- * Updates an existing comment. (comments.update)
1575
- *
1576
- * @param string $fileId
1577
- * The ID of the file.
1578
- * @param string $commentId
1579
- * The ID of the comment.
1580
- * @param IWP_google_Comment $postBody
1581
- * @param array $optParams Optional parameters.
1582
- * @return IWP_google_Service_Drive_Comment
1583
- */
1584
- public function update($fileId, $commentId, IWP_google_Service_Drive_Comment $postBody, $optParams = array())
1585
- {
1586
- $params = array('fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody);
1587
- $params = array_merge($params, $optParams);
1588
- return $this->call('update', array($params), "IWP_google_Service_Drive_Comment");
1589
- }
1590
- }
1591
-
1592
- /**
1593
- * The "files" collection of methods.
1594
- * Typical usage is:
1595
- * <code>
1596
- * $driveService = new IWP_google_Service_Drive(...);
1597
- * $files = $driveService->files;
1598
- * </code>
1599
- */
1600
- class IWP_google_Service_Drive_Files_Resource extends IWP_google_Service_Resource
1601
- {
1602
-
1603
- /**
1604
- * Creates a copy of the specified file. (files.copy)
1605
- *
1606
- * @param string $fileId
1607
- * The ID of the file to copy.
1608
- * @param IWP_google_DriveFile $postBody
1609
- * @param array $optParams Optional parameters.
1610
- *
1611
- * @opt_param bool convert
1612
- * Whether to convert this file to the corresponding Google Docs format.
1613
- * @opt_param string ocrLanguage
1614
- * If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
1615
- * @opt_param string visibility
1616
- * The visibility of the new file. This parameter is only relevant when the source is not a native
1617
- * Google Doc and convert=false.
1618
- * @opt_param bool pinned
1619
- * Whether to pin the head revision of the new copy.
1620
- * @opt_param bool ocr
1621
- * Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1622
- * @opt_param string timedTextTrackName
1623
- * The timed text track name.
1624
- * @opt_param string timedTextLanguage
1625
- * The language of the timed text.
1626
- * @return IWP_google_Service_Drive_DriveFile
1627
- */
1628
- public function copy($fileId, IWP_google_Service_Drive_DriveFile $postBody, $optParams = array())
1629
- {
1630
- $params = array('fileId' => $fileId, 'postBody' => $postBody);
1631
- $params = array_merge($params, $optParams);
1632
- return $this->call('copy', array($params), "IWP_google_Service_Drive_DriveFile");
1633
- }
1634
- /**
1635
- * Permanently deletes a file by ID. Skips the trash. (files.delete)
1636
- *
1637
- * @param string $fileId
1638
- * The ID of the file to delete.
1639
- * @param array $optParams Optional parameters.
1640
- */
1641
- public function delete($fileId, $optParams = array())
1642
- {
1643
- $params = array('fileId' => $fileId);
1644
- $params = array_merge($params, $optParams);
1645
- return $this->call('delete', array($params));
1646
- }
1647
- /**
1648
- * Gets a file's metadata by ID. (files.get)
1649
- *
1650
- * @param string $fileId
1651
- * The ID for the file in question.
1652
- * @param array $optParams Optional parameters.
1653
- *
1654
- * @opt_param bool updateViewedDate
1655
- * Whether to update the view date after successfully retrieving the file.
1656
- * @opt_param string projection
1657
- * This parameter is deprecated and has no function.
1658
- * @return IWP_google_Service_Drive_DriveFile
1659
- */
1660
- public function get($fileId, $optParams = array())
1661
- {
1662
- $params = array('fileId' => $fileId);
1663
- $params = array_merge($params, $optParams);
1664
- return $this->call('get', array($params), "IWP_google_Service_Drive_DriveFile");
1665
- }
1666
- /**
1667
- * Insert a new file. (files.insert)
1668
- *
1669
- * @param IWP_google_DriveFile $postBody
1670
- * @param array $optParams Optional parameters.
1671
- *
1672
- * @opt_param bool convert
1673
- * Whether to convert this file to the corresponding Google Docs format.
1674
- * @opt_param bool useContentAsIndexableText
1675
- * Whether to use the content as indexable text.
1676
- * @opt_param string ocrLanguage
1677
- * If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
1678
- * @opt_param string visibility
1679
- * The visibility of the new file. This parameter is only relevant when convert=false.
1680
- * @opt_param bool pinned
1681
- * Whether to pin the head revision of the uploaded file.
1682
- * @opt_param bool ocr
1683
- * Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1684
- * @opt_param string timedTextTrackName
1685
- * The timed text track name.
1686
- * @opt_param string timedTextLanguage
1687
- * The language of the timed text.
1688
- * @return IWP_google_Service_Drive_DriveFile
1689
- */
1690
- public function insert(IWP_google_Service_Drive_DriveFile $postBody, $optParams = array())
1691
- {
1692
- $params = array('postBody' => $postBody);
1693
- $params = array_merge($params, $optParams);
1694
- return $this->call('insert', array($params), "IWP_google_Service_Drive_DriveFile");
1695
- }
1696
- /**
1697
- * Lists the user's files. (files.listFiles)
1698
- *
1699
- * @param array $optParams Optional parameters.
1700
- *
1701
- * @opt_param string q
1702
- * Query string for searching files.
1703
- * @opt_param string pageToken
1704
- * Page token for files.
1705
- * @opt_param string projection
1706
- * This parameter is deprecated and has no function.
1707
- * @opt_param int maxResults
1708
- * Maximum number of files to return.
1709
- * @return IWP_google_Service_Drive_FileList
1710
- */
1711
- public function listFiles($optParams = array())
1712
- {
1713
- $params = array();
1714
- $params = array_merge($params, $optParams);
1715
- return $this->call('list', array($params), "IWP_google_Service_Drive_FileList");
1716
- }
1717
- /**
1718
- * Updates file metadata and/or content. This method supports patch semantics.
1719
- * (files.patch)
1720
- *
1721
- * @param string $fileId
1722
- * The ID of the file to update.
1723
- * @param IWP_google_DriveFile $postBody
1724
- * @param array $optParams Optional parameters.
1725
- *
1726
- * @opt_param bool convert
1727
- * Whether to convert this file to the corresponding Google Docs format.
1728
- * @opt_param bool updateViewedDate
1729
- * Whether to update the view date after successfully updating the file.
1730
- * @opt_param bool setModifiedDate
1731
- * Whether to set the modified date with the supplied modified date.
1732
- * @opt_param bool useContentAsIndexableText
1733
- * Whether to use the content as indexable text.
1734
- * @opt_param string ocrLanguage
1735
- * If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
1736
- * @opt_param bool pinned
1737
- * Whether to pin the new revision.
1738
- * @opt_param bool newRevision
1739
- * Whether a blob upload should create a new revision. If false, the blob data in the current head
1740
- * revision is replaced. If not set or true, a new blob is created as head revision, and previous
1741
- * revisions are preserved (causing increased use of the user's data storage quota).
1742
- * @opt_param bool ocr
1743
- * Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1744
- * @opt_param string timedTextLanguage
1745
- * The language of the timed text.
1746
- * @opt_param string timedTextTrackName
1747
- * The timed text track name.
1748
- * @return IWP_google_Service_Drive_DriveFile
1749
- */
1750
- public function patch($fileId, IWP_google_Service_Drive_DriveFile $postBody, $optParams = array())
1751
- {
1752
- $params = array('fileId' => $fileId, 'postBody' => $postBody);
1753
- $params = array_merge($params, $optParams);
1754
- return $this->call('patch', array($params), "IWP_google_Service_Drive_DriveFile");
1755
- }
1756
- /**
1757
- * Set the file's updated time to the current server time. (files.touch)
1758
- *
1759
- * @param string $fileId
1760
- * The ID of the file to update.
1761
- * @param array $optParams Optional parameters.
1762
- * @return IWP_google_Service_Drive_DriveFile
1763
- */
1764
- public function touch($fileId, $optParams = array())
1765
- {
1766
- $params = array('fileId' => $fileId);
1767
- $params = array_merge($params, $optParams);
1768
- return $this->call('touch', array($params), "IWP_google_Service_Drive_DriveFile");
1769
- }
1770
- /**
1771
- * Moves a file to the trash. (files.trash)
1772
- *
1773
- * @param string $fileId
1774
- * The ID of the file to trash.
1775
- * @param array $optParams Optional parameters.
1776
- * @return IWP_google_Service_Drive_DriveFile
1777
- */
1778
- public function trash($fileId, $optParams = array())
1779
- {
1780
- $params = array('fileId' => $fileId);
1781
- $params = array_merge($params, $optParams);
1782
- return $this->call('trash', array($params), "IWP_google_Service_Drive_DriveFile");
1783
- }
1784
- /**
1785
- * Restores a file from the trash. (files.untrash)
1786
- *
1787
- * @param string $fileId
1788
- * The ID of the file to untrash.
1789
- * @param array $optParams Optional parameters.
1790
- * @return IWP_google_Service_Drive_DriveFile
1791
- */
1792
- public function untrash($fileId, $optParams = array())
1793
- {
1794
- $params = array('fileId' => $fileId);
1795
- $params = array_merge($params, $optParams);
1796
- return $this->call('untrash', array($params), "IWP_google_Service_Drive_DriveFile");
1797
- }
1798
- /**
1799
- * Updates file metadata and/or content. (files.update)
1800
- *
1801
- * @param string $fileId
1802
- * The ID of the file to update.
1803
- * @param IWP_google_DriveFile $postBody
1804
- * @param array $optParams Optional parameters.
1805
- *
1806
- * @opt_param bool convert
1807
- * Whether to convert this file to the corresponding Google Docs format.
1808
- * @opt_param bool updateViewedDate
1809
- * Whether to update the view date after successfully updating the file.
1810
- * @opt_param bool setModifiedDate
1811
- * Whether to set the modified date with the supplied modified date.
1812
- * @opt_param bool useContentAsIndexableText
1813
- * Whether to use the content as indexable text.
1814
- * @opt_param string ocrLanguage
1815
- * If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
1816
- * @opt_param bool pinned
1817
- * Whether to pin the new revision.
1818
- * @opt_param bool newRevision
1819
- * Whether a blob upload should create a new revision. If false, the blob data in the current head
1820
- * revision is replaced. If not set or true, a new blob is created as head revision, and previous
1821
- * revisions are preserved (causing increased use of the user's data storage quota).
1822
- * @opt_param bool ocr
1823
- * Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1824
- * @opt_param string timedTextLanguage
1825
- * The language of the timed text.
1826
- * @opt_param string timedTextTrackName
1827
- * The timed text track name.
1828
- * @return IWP_google_Service_Drive_DriveFile
1829
- */
1830
- public function update($fileId, IWP_google_Service_Drive_DriveFile $postBody, $optParams = array())
1831
- {
1832
- $params = array('fileId' => $fileId, 'postBody' => $postBody);
1833
- $params = array_merge($params, $optParams);
1834
- return $this->call('update', array($params), "IWP_google_Service_Drive_DriveFile");
1835
- }
1836
- /**
1837
- * Subscribe to changes on a file (files.watch)
1838
- *
1839
- * @param string $fileId
1840
- * The ID for the file in question.
1841
- * @param IWP_google_Channel $postBody
1842
- * @param array $optParams Optional parameters.
1843
- *
1844
- * @opt_param bool updateViewedDate
1845
- * Whether to update the view date after successfully retrieving the file.
1846
- * @opt_param string projection
1847
- * This parameter is deprecated and has no function.
1848
- * @return IWP_google_Service_Drive_Channel
1849
- */
1850
- public function watch($fileId, IWP_google_Service_Drive_Channel $postBody, $optParams = array())
1851
- {
1852
- $params = array('fileId' => $fileId, 'postBody' => $postBody);
1853
- $params = array_merge($params, $optParams);
1854
- return $this->call('watch', array($params), "IWP_google_Service_Drive_Channel");
1855
- }
1856
- }
1857
-
1858
- /**
1859
- * The "parents" collection of methods.
1860
- * Typical usage is:
1861
- * <code>
1862
- * $driveService = new IWP_google_Service_Drive(...);
1863
- * $parents = $driveService->parents;
1864
- * </code>
1865
- */
1866
- class IWP_google_Service_Drive_Parents_Resource extends IWP_google_Service_Resource
1867
- {
1868
-
1869
- /**
1870
- * Removes a parent from a file. (parents.delete)
1871
- *
1872
- * @param string $fileId
1873
- * The ID of the file.
1874
- * @param string $parentId
1875
- * The ID of the parent.
1876
- * @param array $optParams Optional parameters.
1877
- */
1878
- public function delete($fileId, $parentId, $optParams = array())
1879
- {
1880
- $params = array('fileId' => $fileId, 'parentId' => $parentId);
1881
- $params = array_merge($params, $optParams);
1882
- return $this->call('delete', array($params));
1883
- }
1884
- /**
1885
- * Gets a specific parent reference. (parents.get)
1886
- *
1887
- * @param string $fileId
1888
- * The ID of the file.
1889
- * @param string $parentId
1890
- * The ID of the parent.
1891
- * @param array $optParams Optional parameters.
1892
- * @return IWP_google_Service_Drive_ParentReference
1893
- */
1894
- public function get($fileId, $parentId, $optParams = array())
1895
- {
1896
- $params = array('fileId' => $fileId, 'parentId' => $parentId);
1897
- $params = array_merge($params, $optParams);
1898
- return $this->call('get', array($params), "IWP_google_Service_Drive_ParentReference");
1899
- }
1900
- /**
1901
- * Adds a parent folder for a file. (parents.insert)
1902
- *
1903
- * @param string $fileId
1904
- * The ID of the file.
1905
- * @param IWP_google_ParentReference $postBody
1906
- * @param array $optParams Optional parameters.
1907
- * @return IWP_google_Service_Drive_ParentReference
1908
- */
1909
- public function insert($fileId, IWP_google_Service_Drive_ParentReference $postBody, $optParams = array())
1910
- {
1911
- $params = array('fileId' => $fileId, 'postBody' => $postBody);
1912
- $params = array_merge($params, $optParams);
1913
- return $this->call('insert', array($params), "IWP_google_Service_Drive_ParentReference");
1914
- }
1915
- /**
1916
- * Lists a file's parents. (parents.listParents)
1917
- *
1918
- * @param string $fileId
1919
- * The ID of the file.
1920
- * @param array $optParams Optional parameters.
1921
- * @return IWP_google_Service_Drive_ParentList
1922
- */
1923
- public function listParents($fileId, $optParams = array())
1924
- {
1925
- $params = array('fileId' => $fileId);
1926
- $params = array_merge($params, $optParams);
1927
- return $this->call('list', array($params), "IWP_google_Service_Drive_ParentList");
1928
- }
1929
- }
1930
-
1931
- /**
1932
- * The "permissions" collection of methods.
1933
- * Typical usage is:
1934
- * <code>
1935
- * $driveService = new IWP_google_Service_Drive(...);
1936
- * $permissions = $driveService->permissions;
1937
- * </code>
1938
- */
1939
- class IWP_google_Service_Drive_Permissions_Resource extends IWP_google_Service_Resource
1940
- {
1941
-
1942
- /**
1943
- * Deletes a permission from a file. (permissions.delete)
1944
- *
1945
- * @param string $fileId
1946
- * The ID for the file.
1947
- * @param string $permissionId
1948
- * The ID for the permission.
1949
- * @param array $optParams Optional parameters.
1950
- */
1951
- public function delete($fileId, $permissionId, $optParams = array())
1952
- {
1953
- $params = array('fileId' => $fileId, 'permissionId' => $permissionId);
1954
- $params = array_merge($params, $optParams);
1955
- return $this->call('delete', array($params));
1956
- }
1957
- /**
1958
- * Gets a permission by ID. (permissions.get)
1959
- *
1960
- * @param string $fileId
1961
- * The ID for the file.
1962
- * @param string $permissionId
1963
- * The ID for the permission.
1964
- * @param array $optParams Optional parameters.
1965
- * @return IWP_google_Service_Drive_Permission
1966
- */
1967
- public function get($fileId, $permissionId, $optParams = array())
1968
- {
1969
- $params = array('fileId' => $fileId, 'permissionId' => $permissionId);
1970
- $params = array_merge($params, $optParams);
1971
- return $this->call('get', array($params), "IWP_google_Service_Drive_Permission");
1972
- }
1973
- /**
1974
- * Returns the permission ID for an email address. (permissions.getIdForEmail)
1975
- *
1976
- * @param string $email
1977
- * The email address for which to return a permission ID
1978
- * @param array $optParams Optional parameters.
1979
- * @return IWP_google_Service_Drive_PermissionId
1980
- */
1981
- public function getIdForEmail($email, $optParams = array())
1982
- {
1983
- $params = array('email' => $email);
1984
- $params = array_merge($params, $optParams);
1985
- return $this->call('getIdForEmail', array($params), "IWP_google_Service_Drive_PermissionId");
1986
- }
1987
- /**
1988
- * Inserts a permission for a file. (permissions.insert)
1989
- *
1990
- * @param string $fileId
1991
- * The ID for the file.
1992
- * @param IWP_google_Permission $postBody
1993
- * @param array $optParams Optional parameters.
1994
- *
1995
- * @opt_param string emailMessage
1996
- * A custom message to include in notification emails.
1997
- * @opt_param bool sendNotificationEmails
1998
- * Whether to send notification emails when sharing to users or groups.
1999
- * @return IWP_google_Service_Drive_Permission
2000
- */
2001
- public function insert($fileId, IWP_google_Service_Drive_Permission $postBody, $optParams = array())
2002
- {
2003
- $params = array('fileId' => $fileId, 'postBody' => $postBody);
2004
- $params = array_merge($params, $optParams);
2005
- return $this->call('insert', array($params), "IWP_google_Service_Drive_Permission");
2006
- }
2007
- /**
2008
- * Lists a file's permissions. (permissions.listPermissions)
2009
- *
2010
- * @param string $fileId
2011
- * The ID for the file.
2012
- * @param array $optParams Optional parameters.
2013
- * @return IWP_google_Service_Drive_PermissionList
2014
- */
2015
- public function listPermissions($fileId, $optParams = array())
2016
- {
2017
- $params = array('fileId' => $fileId);
2018
- $params = array_merge($params, $optParams);
2019
- return $this->call('list', array($params), "IWP_google_Service_Drive_PermissionList");
2020
- }
2021
- /**
2022
- * Updates a permission. This method supports patch semantics.
2023
- * (permissions.patch)
2024
- *
2025
- * @param string $fileId
2026
- * The ID for the file.
2027
- * @param string $permissionId
2028
- * The ID for the permission.
2029
- * @param IWP_google_Permission $postBody
2030
- * @param array $optParams Optional parameters.
2031
- *
2032
- * @opt_param bool transferOwnership
2033
- * Whether changing a role to 'owner' should also downgrade the current owners to writers.
2034
- * @return IWP_google_Service_Drive_Permission
2035
- */
2036
- public function patch($fileId, $permissionId, IWP_google_Service_Drive_Permission $postBody, $optParams = array())
2037
- {
2038
- $params = array('fileId' => $fileId, 'permissionId' => $permissionId, 'postBody' => $postBody);
2039
- $params = array_merge($params, $optParams);
2040
- return $this->call('patch', array($params), "IWP_google_Service_Drive_Permission");
2041
- }
2042
- /**
2043
- * Updates a permission. (permissions.update)
2044
- *
2045
- * @param string $fileId
2046
- * The ID for the file.
2047
- * @param string $permissionId
2048
- * The ID for the permission.
2049
- * @param IWP_google_Permission $postBody
2050
- * @param array $optParams Optional parameters.
2051
- *
2052
- * @opt_param bool transferOwnership
2053
- * Whether changing a role to 'owner' should also downgrade the current owners to writers.
2054
- * @return IWP_google_Service_Drive_Permission
2055
- */
2056
- public function update($fileId, $permissionId, IWP_google_Service_Drive_Permission $postBody, $optParams = array())
2057
- {
2058
- $params = array('fileId' => $fileId, 'permissionId' => $permissionId, 'postBody' => $postBody);
2059
- $params = array_merge($params, $optParams);
2060
- return $this->call('update', array($params), "IWP_google_Service_Drive_Permission");
2061
- }
2062
- }
2063
-
2064
- /**
2065
- * The "properties" collection of methods.
2066
- * Typical usage is:
2067
- * <code>
2068
- * $driveService = new IWP_google_Service_Drive(...);
2069
- * $properties = $driveService->properties;
2070
- * </code>
2071
- */
2072
- class IWP_google_Service_Drive_Properties_Resource extends IWP_google_Service_Resource
2073
- {
2074
-
2075
- /**
2076
- * Deletes a property. (properties.delete)
2077
- *
2078
- * @param string $fileId
2079
- * The ID of the file.