Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

OAuth Specificity

By: simonwheatley on Aug 24th, 2012  |  syntax: Diff  |  size: 1.27 KB  |  views: 55  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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'] );