Skip to content

Commit 490fc61

Browse files
authored
Merge pull request #114 from chrisvanpatten/patch-1
Use add_query_arg to better adjust login URLs
2 parents f48d7e1 + 015eeb5 commit 490fc61

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

onelogin-saml-sso/php/settings.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@
5858
}
5959
}
6060

61-
$acs_endpoint = get_option('onelogin_saml_alternative_acs', false) ? plugins_url( 'alternative_acs.php', dirname( __FILE__ ) ) : wp_login_url() . '?saml_acs';
61+
$acs_endpoint = get_option('onelogin_saml_alternative_acs', false)
62+
? plugins_url( 'alternative_acs.php', dirname( __FILE__ ) )
63+
: add_query_arg( [ 'saml_acs' => '' ], wp_login_url() );
6264

6365
$settings = array (
6466

@@ -71,7 +73,7 @@
7173
'url' => $acs_endpoint
7274
),
7375
'singleLogoutService' => array (
74-
'url' => get_site_url().'/wp-login.php?saml_sls'
76+
'url' => add_query_arg( [ 'saml_sls' => '' ], wp_login_url() )
7577
),
7678
'NameIDFormat' => $opt['NameIDFormat'],
7779
'x509cert' => get_option('onelogin_saml_advanced_settings_sp_x509cert'),

0 commit comments

Comments
 (0)