Skip to content

Commit 6404556

Browse files
authored
Merge pull request #465 from nextcloud/fix/3.2/use_correct_names
use the correct session names
2 parents fd7e0e6 + f2cee7c commit 6404556

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

lib/Controller/SAMLController.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ public function login($idp) {
189189
// Small hack to make user_saml work with the loginflows
190190
$flowData = [];
191191

192-
if ($this->session->get(ClientFlowLoginController::STATE_NAME) !== null) {
193-
$flowData['cf1'] = $this->session->get(ClientFlowLoginController::STATE_NAME);
194-
} else if ($this->session->get(ClientFlowLoginV2Controller::TOKEN_NAME) !== null) {
192+
if ($this->session->get('client.flow.state.token') !== null) {
193+
$flowData['cf1'] = $this->session->get('client.flow.state.token');
194+
} else if ($this->session->get('client.flow.v2.login.token') !== null) {
195195
$flowData['cf2'] = [
196-
'name' => $this->session->get(ClientFlowLoginV2Controller::TOKEN_NAME),
197-
'state' => $this->session->get(ClientFlowLoginV2Controller::STATE_NAME),
196+
'name' => $this->session->get('client.flow.v2.login.token'),
197+
'state' => $this->session->get('client.flow.v2.state.token'),
198198
];
199199
}
200200

@@ -301,10 +301,10 @@ public function assertionConsumerService(): Http\RedirectResponse {
301301

302302
if (isset($data['flow'])) {
303303
if (isset($data['flow']['cf1'])) {
304-
$this->session->set(ClientFlowLoginController::STATE_NAME, $data['flow']['cf1']);
304+
$this->session->set('client.flow.state.token', $data['flow']['cf1']);
305305
} else if (isset($data['flow']['cf2'])) {
306-
$this->session->set(ClientFlowLoginV2Controller::TOKEN_NAME, $data['flow']['cf2']['token']);
307-
$this->session->set(ClientFlowLoginV2Controller::STATE_NAME, $data['flow']['cf2']['state']);
306+
$this->session->set('client.flow.v2.login.token', $data['flow']['cf2']['token']);
307+
$this->session->set('client.flow.v2.state.token', $data['flow']['cf2']['state']);
308308
}
309309

310310
}

0 commit comments

Comments
 (0)