Advertisement
simonwheatley

OAuth Specificity

Aug 24th, 2012
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.27 KB | None | 0 0
  1. diff --git a/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php b/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php
  2. index ecf4267..ecc7243 100644
  3. --- a/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php
  4. +++ b/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php
  5. @@ -822,7 +822,7 @@ if ( is_admin() && ( !defined('DOING_AJAX') || !DOING_AJAX ) && !class_exists( '
  6.  
  7.  
  8.         function authenticate() {
  9. -           if ( isset( $_REQUEST['oauth_token'] ) ) {
  10. +           if ( isset( $_REQUEST['ga_oauth_callback'] ) ) {
  11.                 $o = get_option( $this->optionname );
  12.                 if ( isset( $o['gawp_oauth']['oauth_token'] ) && $o['gawp_oauth']['oauth_token'] == $_REQUEST['oauth_token'] ) {
  13.                     $gdata = new WP_GData(
  14. @@ -854,7 +854,8 @@ if ( is_admin() && ( !defined('DOING_AJAX') || !DOING_AJAX ) && !class_exists( '
  15.                     )
  16.                 );
  17.  
  18. -               $request_token = $gdata->get_request_token( menu_page_url( 'google-analytics-for-wordpress', false ) );
  19. +               $oauth_callback = add_query_arg( array( 'ga_oauth_callback' => 1 ),  menu_page_url( 'google-analytics-for-wordpress', false ) );
  20. +               $request_token = $gdata->get_request_token( $oauth_callback );
  21.  
  22.                 $options = get_option( $this->optionname );
  23.                 unset( $options['ga_token'] );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement