
OAuth Specificity
By:
simonwheatley on
Aug 24th, 2012 | syntax:
Diff | size: 1.27 KB | hits: 49 | expires: Never
diff --git a/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php b/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php
index ecf4267..ecc7243 100644
--- a/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php
+++ b/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php
@@ -822,7 +822,7 @@ if ( is_admin() && ( !defined('DOING_AJAX') || !DOING_AJAX ) && !class_exists( '
function authenticate() {
- if ( isset( $_REQUEST['oauth_token'] ) ) {
+ if ( isset( $_REQUEST['ga_oauth_callback'] ) ) {
$o = get_option( $this->optionname );
if ( isset( $o['gawp_oauth']['oauth_token'] ) && $o['gawp_oauth']['oauth_token'] == $_REQUEST['oauth_token'] ) {
$gdata = new WP_GData(
@@ -854,7 +854,8 @@ if ( is_admin() && ( !defined('DOING_AJAX') || !DOING_AJAX ) && !class_exists( '
)
);
- $request_token = $gdata->get_request_token( menu_page_url( 'google-analytics-for-wordpress', false ) );
+ $oauth_callback = add_query_arg( array( 'ga_oauth_callback' => 1 ), menu_page_url( 'google-analytics-for-wordpress', false ) );
+ $request_token = $gdata->get_request_token( $oauth_callback );
$options = get_option( $this->optionname );
unset( $options['ga_token'] );