- Issue created by @ambient.impact
- Merge request !8Issue #3538890: Use \Drupal\Core\Url to build log in destination. → (Open) created by ambient.impact
The SSO controller has this:
protected function login(): RedirectResponse {
$_SESSION['discourse_sso_sig'] = $this->sig;
$_SESSION['discourse_sso_payload'] = $this->payload;
$options = [
'query' => ['destination' => 'discourse_sso?sso=' . $this->payload . '&sig=' . $this->sig],
'absolute' => TRUE,
];
return $this->redirect('user.login', [], $options);
}
There are multiple problems with how the destination is built like this:
👀
protected function login(): RedirectResponse {
$_SESSION['discourse_sso_sig'] = $this->sig;
$_SESSION['discourse_sso_payload'] = $this->payload;
$url = Url::fromRoute('discourse_sso.sso', [], [
'sso' => $this->payload,
'sig' => $this->sig,
]);
$options = [
'query' => ['destination' => $url->toString()],
'absolute' => TRUE,
];
return $this->redirect('user.login', [], $options);
}
See above.
None.
None.
None.
Active
2.0
Code