Changeset 3298575
- Timestamp:
- 05/22/2025 09:17:25 AM (9 months ago)
- Location:
- tims-nextcloud-sso-oauth2
- Files:
-
- 19 added
- 3 edited
-
tags/2.0.3 (added)
-
tags/2.0.3/LICENSE.txt (added)
-
tags/2.0.3/README.txt (added)
-
tags/2.0.3/assets (added)
-
tags/2.0.3/assets/css (added)
-
tags/2.0.3/assets/css/options-page.css (added)
-
tags/2.0.3/assets/scss (added)
-
tags/2.0.3/assets/scss/options-page.scss (added)
-
tags/2.0.3/includes (added)
-
tags/2.0.3/includes/button-shortcode.php (added)
-
tags/2.0.3/includes/functions.php (added)
-
tags/2.0.3/includes/options-page.php (added)
-
tags/2.0.3/languages (added)
-
tags/2.0.3/languages/tims-nextcloud-sso-oauth2-en_GB.mo (added)
-
tags/2.0.3/languages/tims-nextcloud-sso-oauth2-en_GB.po (added)
-
tags/2.0.3/languages/tims-nextcloud-sso-oauth2-en_US.mo (added)
-
tags/2.0.3/languages/tims-nextcloud-sso-oauth2-en_US.po (added)
-
tags/2.0.3/languages/tims-nextcloud-sso-oauth2.pot (added)
-
tags/2.0.3/tims-nextcloud-sso-oauth2.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/includes/functions.php (modified) (6 diffs)
-
trunk/tims-nextcloud-sso-oauth2.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tims-nextcloud-sso-oauth2/trunk/README.txt
r3291904 r3298575 5 5 Requires at least: 4.0.0 6 6 Tested up to: 6.8.1 7 Stable tag: 2.0. 28 Requires PHP: 7.07 Stable tag: 2.0.3 8 Requires PHP: 8.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 125 125 == Changelog == 126 126 127 = 2.0.3 = 128 Release Date: 22nd May 2025 129 130 - Improvements made to the Test Connection option in the settings 131 - Updated compatibility with WordPress 6.8.1 and Nextcloud 31.0.4 132 133 = 2.0.2 = 134 Release Date: 10th August 2023 135 136 - Implemented a feature request: When matching Nextcloud user groups to WordPress roles If no role matches there is now an option to select a default role for the user 137 - Corrected spelling mistakes on the options page 138 127 139 = 2.0.1 = 128 140 Release Date: 1st July 2022 -
tims-nextcloud-sso-oauth2/trunk/includes/functions.php
r2907447 r3298575 304 304 } 305 305 306 307 306 function tims_nso_redirect_wplogin(){ 308 307 global $GLOBALS; … … 339 338 add_action( 'login_form', 'tims_nso_login_button' ); 340 339 341 342 343 340 add_action("wp_ajax_tims_nso_test_connection", "tims_nso_test_connection"); 344 341 … … 350 347 $state = bin2hex(random_bytes(10)); 351 348 352 353 354 349 $authorize_url = $nextcloud_url.'apps/oauth2/authorize'.'?'.http_build_query([ 355 350 'response_type' => 'code', … … 360 355 ]); 361 356 362 363 364 357 $response = wp_remote_head($authorize_url); 365 358 if(!is_wp_error($response)){ … … 367 360 if(isset($headers['location'])){ 368 361 $response = esc_attr($headers['location']); 362 363 // old nextcloud response 369 364 $expected_response = esc_attr($nextcloud_url).'login/flow?clientIdentifier='.esc_attr($identifier); 370 if($response == $expected_response){ 365 366 // also check newer nextcloud response 367 if(($response && str_contains($response, esc_attr($nextcloud_url).'login/flow?') && str_contains($response, 'clientIdentifier='.esc_attr($identifier))) || ($response == $expected_response)){ 371 368 echo '<div class="status-success"><p>Looks Good!</p></div>'; 372 369 die(); … … 381 378 echo '<div class="status-error">'.$text.'</div>'; 382 379 die(); 383 384 } 385 386 387 388 389 390 391 392 380 } 393 381 394 382 function tims_nso_errors() { -
tims-nextcloud-sso-oauth2/trunk/tims-nextcloud-sso-oauth2.php
r2907450 r3298575 4 4 Plugin URI: https://www.timoxendale.co.uk/plugins/wordpress-nextcloud-sso-oauth2/ 5 5 Description: Enables you to login to your WordPress site with your Nextcloud account with OAuth2 6 Version: 2.0. 26 Version: 2.0.3 7 7 Author: Tim's Solutions 8 8 Author URI: https://www.timoxendale.co.uk/
Note: See TracChangeset
for help on using the changeset viewer.