Commit cc75d928 authored by pjcdawkins's avatar pjcdawkins

Issue #2362913: fix infinite loop with r4032login module.

parent dd4d7cc1
......@@ -101,6 +101,8 @@ abstract class OpenIDConnectClientBase implements OpenIDConnectClientInterface {
),
);
$endpoints = $this->getEndpoints();
// Clear $_GET['destination'] because we need to override it.
unset($_GET['destination']);
drupal_goto($endpoints['authorization'], $url_options);
}
......
......@@ -166,7 +166,8 @@ function openid_connect_login_form($form, &$form_state) {
function openid_connect_login_form_submit(&$form, &$form_state) {
// Save the current path in the session, so that we can redirect the user back
// there after the authorization.
$_SESSION['openid_connect_destination'] = request_path();
$destination = drupal_get_destination();
$_SESSION['openid_connect_destination'] = $destination['destination'];
$client_name = $form_state['triggering_element']['#name'];
$client = openid_connect_get_client($client_name);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment