Skip to content

Commit

Permalink
urlencode() redirect_uri
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfoell committed Mar 23, 2018
1 parent 1556977 commit a7d7cbe
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/WPStrava/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function maybe_oauth( $value ) {
$client_id = $_POST['strava_client_id'];
$client_secret = $_POST['strava_client_secret'];

$redirect = admin_url( "options-general.php?page={$this->page_name}" );
$redirect = urlencode( admin_url( "options-general.php?page={$this->page_name}" ) );
$url = "https://www.strava.com/oauth/authorize?client_id={$client_id}&response_type=code&redirect_uri={$redirect}&approval_prompt=force";
wp_redirect( $url );
exit();
Expand Down
12 changes: 11 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,37 @@ If your API key works with other Google Maps plugins but not WP Strava, you may

== Changelog ==

= 1.5.1 =

urlencode() redirect_uri so authentication works more consistently.


= 1.5.0 =

Added additional checks for abridged club data to avoid undefined index/property errors https://wordpress.org/support/topic/club-activities-bugs-strava/
Added composer with PSR-0 autoloader (will switch to PSR-4 once WP's PHP 5.2 requirement goes away).
Moved files into appropriate place to support autoloader.
Added WordPress-Extra coding standards rule definition to project


= 1.4.3 =

Fix WPStrava_Activity class not found error.


= 1.4.2 =

Better Club ID support.
Refined cache clearing to include club IDs.
Removed links to 'app.strava.com'
Fixed unclosed href anchor on activity shortcode.


= 1.4.1 =

Fix array indices on map widget


= 1.4.0 =

Added dlintott to contributors.
Expand All @@ -107,6 +117,7 @@ Removed target="_blank" from hrefs for accessibility best practices.
Added links from activity and route shortcodes to respective strava page.
Removed all instances of extract().


= 1.3.0 =

Added [route] shortcode and start/finish https://github.com/cmanon/wp-strava/pull/10/
Expand Down Expand Up @@ -168,4 +179,3 @@ Added option to select unit of measurements on the widget. https://wordpress.org
= 0.6 =

Initial version.

2 changes: 1 addition & 1 deletion wp-strava.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WP Strava
* Plugin URI: https://wordpress.org/plugins/wp-strava/
* Description: Show your strava.com activity on your WordPress site. Some Icons are Copyright © Yusuke Kamiyamane. All rights reserved. Licensed under a Creative Commons Attribution 3.0 license.
* Version: 1.5.0
* Version: 1.5.1-rc1
* Author: Carlos Santa Cruz, Justin Foell, Lance Willett, Daniel Lintott
* License: GPL2
* Text Domain: wp-strava
Expand Down

0 comments on commit a7d7cbe

Please sign in to comment.