Logout URL is incorrect.

Created on 12 May 2023, over 1 year ago
Updated 18 December 2023, 10 months ago

Problem/Motivation

It seems that the $logout_url variable in following line is getting a wrong value by calling getLoginUrl().

 $logout_url = parse_url($this_idp->getLoginUrl());
 $logout_url = $logout_url['scheme'] . '://' . $logout_url['host'];

Should it call getLogoutUrl() instead?

See
https://git.drupalcode.org/project/saml_sp/-/blob/4.2.1/modules/saml_sp_...

Proposed resolution

Replace follow line

 $logout_url = parse_url($this_idp->getLoginUrl());
 $logout_url = $logout_url['scheme'] . '://' . $logout_url['host'];

With:

 $logout_url = parse_url($this_idp->getLogoutUrl());
 $logout_url = $logout_url['scheme'] . '://' . $logout_url['host'];

Remaining tasks

Test to confirm.

🐛 Bug report
Status

Active

Version

4.2

Component

Code

Created by

🇦🇺Australia mingsong 🇦🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024