PowerPress Podcasting plugin by Blubrry - Version 8.4.8

Version Description

  • Released 01/13/2021
  • Fixed a bug in the Blubrry account linking
Download this release

Release Info

Developer benbeecroft
Plugin Icon 128x128 PowerPress Podcasting plugin by Blubrry
Version 8.4.8
Comparing to
See all releases

Code changes from version 8.4.7 to 8.4.8

powerpress.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Blubrry PowerPress
4
  Plugin URI: http://create.blubrry.com/resources/powerpress/
5
  Description: <a href="https://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> is the No. 1 Podcasting plugin for WordPress. Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast tools, podcast SEO features, and more! Fully supports Apple Podcasts (previously iTunes), Google Podcasts, Spotify, Stitcher, and Blubrry Podcasting directories, as well as all podcast applications and clients.
6
- Version: 8.4.7
7
  Author: Blubrry
8
  Author URI: https://blubrry.com/
9
  Requires at least: 3.6
@@ -36,7 +36,7 @@ if( !function_exists('add_action') ) {
36
 
37
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
38
 
39
- define('POWERPRESS_VERSION', '8.4.7' );
40
 
41
  // Translation support:
42
  if ( !defined('POWERPRESS_ABSPATH') )
3
  Plugin Name: Blubrry PowerPress
4
  Plugin URI: http://create.blubrry.com/resources/powerpress/
5
  Description: <a href="https://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> is the No. 1 Podcasting plugin for WordPress. Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast tools, podcast SEO features, and more! Fully supports Apple Podcasts (previously iTunes), Google Podcasts, Spotify, Stitcher, and Blubrry Podcasting directories, as well as all podcast applications and clients.
6
+ Version: 8.4.8
7
  Author: Blubrry
8
  Author URI: https://blubrry.com/
9
  Requires at least: 3.6
36
 
37
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
38
 
39
+ define('POWERPRESS_VERSION', '8.4.8' );
40
 
41
  // Translation support:
42
  if ( !defined('POWERPRESS_ABSPATH') )
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: podcasting, podcast, podcaster, powerpress, itunes, apple, apple podcasts,
4
  Requires at least: 3.6
5
  Requires PHP: 5.2
6
  Tested up to: 5.6
7
- Stable tag: 8.4.7
8
  Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
9
  License: GPLv2 or later
10
 
@@ -186,6 +186,10 @@ If you are a fan of PowerPress, we would greatly appreciate it if you could take
186
 
187
  == Changelog ==
188
 
 
 
 
 
189
  = 8.4.7 =
190
  * Released 12/22/2020
191
  * Added destinations for JioSaavn, Gaana, and Podchaser
4
  Requires at least: 3.6
5
  Requires PHP: 5.2
6
  Tested up to: 5.6
7
+ Stable tag: 8.4.8
8
  Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
9
  License: GPLv2 or later
10
 
186
 
187
  == Changelog ==
188
 
189
+ = 8.4.8 =
190
+ * Released 01/13/2021
191
+ * Fixed a bug in the Blubrry account linking
192
+
193
  = 8.4.7 =
194
  * Released 12/22/2020
195
  * Added destinations for JioSaavn, Gaana, and Podchaser
views/onboarding/blubrry_signin.php CHANGED
@@ -60,55 +60,51 @@
60
  } elseif (empty($_GET['state']) || empty($_GET['code'])) {
61
  powerpress_page_message_add_error(__('An error occurred linking your account. Missing parameters.', 'powerpress'));
62
  }
63
- //First, check if we're already logged in. If we are, we'll skip the client issuing and get access token
64
- $creds = get_option('powerpress_creds');
65
- if (!$creds) {
66
- $tempClient = get_option('powerpress_temp_client');
67
- if ($_GET['state'] != $tempClient['state']) {
68
- powerpress_page_message_add_error(__('An error occurred linking your account. State does not match.', 'powerpress'));
69
- return false;
70
- }
71
- $redirectUri = get_option('powerpress_blubrry_api_redirect_uri');
72
 
73
- // Get the client ID for this installation
74
- $resultClient = $auth->issueClient($_GET['code'], $tempClient['temp_client_id'], $tempClient['temp_client_secret'], $redirectUri);
75
- if ($resultClient === false || empty($resultClient['client_id']) || empty($resultClient['client_secret'])) {
76
- if (!empty($resultTokens['error_description']))
77
- powerpress_page_message_add_error($resultTokens['error_description']);
78
- else if (!empty($resultTokens['error']))
79
- powerpress_page_message_add_error($resultTokens['error']);
80
- else
81
- powerpress_page_message_add_error(__('Error issuing client:', 'powerpress-network') . ' ' . $auth->GetLastError() . $auth->getDebugInfo());
82
- powerpress_page_message_print();
83
- exit;
84
- }
85
 
86
- // Get the access and refresh token for this client
87
- $resultTokens = $auth->getAccessTokenFromCode($_GET['code'], $resultClient['client_id'], $resultClient['client_secret'], $redirectUri);
 
 
 
 
88
 
89
- if ($resultTokens === false || empty($resultTokens['access_token']) || empty($resultTokens['refresh_token'])) {
90
- if (!empty($resultTokens['error_description']))
91
- powerpress_page_message_add_error($resultTokens['error_description']);
92
- else if (!empty($resultTokens['error']))
93
- powerpress_page_message_add_error($resultTokens['error']);
94
- else
95
- powerpress_page_message_add_error(__('Error retrieving access token:', 'powerpress-network') . ' ' . $auth->GetLastError());
96
- powerpress_page_message_print();
97
- exit;
98
- }
 
 
99
 
100
- $props = array();
101
- $props['code'] = $_GET['code'];
102
- $props['client_id'] = $resultClient['client_id'];
103
- $props['client_secret'] = $resultClient['client_secret'];
104
- $props['access_token'] = $resultTokens['access_token'];
105
- $props['access_expires'] = (time() + $resultTokens['expires_in'] - 10);
106
- $props['refresh_token'] = $resultTokens['refresh_token'];
107
- powerpress_save_settings($props, 'powerpress_creds');
108
 
109
- } else {
110
- $props = $creds;
 
 
 
 
 
 
 
111
  }
 
 
 
 
 
 
 
 
 
 
112
  $result = $auth->checkAccountVerified();
113
  if (isset($result['account_enabled']) && isset($result['account_confirmed'])) {
114
  if (!$result['account_enabled'] || !$result['account_confirmed']) {
60
  } elseif (empty($_GET['state']) || empty($_GET['code'])) {
61
  powerpress_page_message_add_error(__('An error occurred linking your account. Missing parameters.', 'powerpress'));
62
  }
 
 
 
 
 
 
 
 
 
63
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
+ $tempClient = get_option('powerpress_temp_client');
66
+ if ($_GET['state'] != $tempClient['state']) {
67
+ powerpress_page_message_add_error(__('An error occurred linking your account. State does not match.', 'powerpress'));
68
+ return false;
69
+ }
70
+ $redirectUri = get_option('powerpress_blubrry_api_redirect_uri');
71
 
72
+ // Get the client ID for this installation
73
+ $resultClient = $auth->issueClient($_GET['code'], $tempClient['temp_client_id'], $tempClient['temp_client_secret'], $redirectUri);
74
+ if ($resultClient === false || empty($resultClient['client_id']) || empty($resultClient['client_secret'])) {
75
+ if (!empty($resultTokens['error_description']))
76
+ powerpress_page_message_add_error($resultTokens['error_description']);
77
+ else if (!empty($resultTokens['error']))
78
+ powerpress_page_message_add_error($resultTokens['error']);
79
+ else
80
+ powerpress_page_message_add_error(__('Error issuing client:', 'powerpress-network') . ' ' . $auth->GetLastError() . $auth->getDebugInfo());
81
+ powerpress_page_message_print();
82
+ exit;
83
+ }
84
 
85
+ // Get the access and refresh token for this client
86
+ $resultTokens = $auth->getAccessTokenFromCode($_GET['code'], $resultClient['client_id'], $resultClient['client_secret'], $redirectUri);
 
 
 
 
 
 
87
 
88
+ if ($resultTokens === false || empty($resultTokens['access_token']) || empty($resultTokens['refresh_token'])) {
89
+ if (!empty($resultTokens['error_description']))
90
+ powerpress_page_message_add_error($resultTokens['error_description']);
91
+ else if (!empty($resultTokens['error']))
92
+ powerpress_page_message_add_error($resultTokens['error']);
93
+ else
94
+ powerpress_page_message_add_error(__('Error retrieving access token:', 'powerpress-network') . ' ' . $auth->GetLastError());
95
+ powerpress_page_message_print();
96
+ exit;
97
  }
98
+
99
+ $props = array();
100
+ $props['code'] = $_GET['code'];
101
+ $props['client_id'] = $resultClient['client_id'];
102
+ $props['client_secret'] = $resultClient['client_secret'];
103
+ $props['access_token'] = $resultTokens['access_token'];
104
+ $props['access_expires'] = (time() + $resultTokens['expires_in'] - 10);
105
+ $props['refresh_token'] = $resultTokens['refresh_token'];
106
+ powerpress_save_settings($props, 'powerpress_creds');
107
+
108
  $result = $auth->checkAccountVerified();
109
  if (isset($result['account_enabled']) && isset($result['account_confirmed'])) {
110
  if (!$result['account_enabled'] || !$result['account_confirmed']) {