Skip to content
Snippets Groups Projects
Commit 2142cfe2 authored by Olav Morken's avatar Olav Morken
Browse files

multiauth: Fix bug that breaks compatibility with old IE versions.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3160 44740490-163a-0410-bde0-09ae8108e29a
parent 5b6c1d49
No related branches found
No related tags found
No related merge requests found
...@@ -19,11 +19,10 @@ foreach($this->data['sources'] as $source) { ...@@ -19,11 +19,10 @@ foreach($this->data['sources'] as $source) {
} else { } else {
$autofocus = ''; $autofocus = '';
} }
echo '<button type="submit" name="source"' . $autofocus . ' ' . $name = 'src-' . base64_encode($source['source']);
echo '<input type="submit" name="' . htmlspecialchars($name) . '"' . $autofocus . ' ' .
'id="button-' . htmlspecialchars($source['source']) . '" ' . 'id="button-' . htmlspecialchars($source['source']) . '" ' .
'value="' . htmlspecialchars($source['source']) . '">'; 'value="' . htmlspecialchars($this->t($source['text'])) . '" />';
echo htmlspecialchars($this->t($source['text']));
echo '</button>';
echo '</li>'; echo '</li>';
} }
?> ?>
......
...@@ -26,13 +26,25 @@ if (array_key_exists("SimpleSAML_Auth_Default.id", $state)) { ...@@ -26,13 +26,25 @@ if (array_key_exists("SimpleSAML_Auth_Default.id", $state)) {
$as = NULL; $as = NULL;
} }
$source = NULL;
if (array_key_exists('source', $_REQUEST)) { if (array_key_exists('source', $_REQUEST)) {
$source = $_REQUEST['source']; $source = $_REQUEST['source'];
} else {
foreach ($_REQUEST as $k => $v) {
$k = explode('-', $k, 2);
if (count($k) === 2 && $k[0] === 'src') {
$source = base64_decode($k[1]);
}
}
}
if ($source !== NULL) {
if ($as !== NULL) { if ($as !== NULL) {
$as->setPreviousSource($source); $as->setPreviousSource($source);
} }
sspmod_multiauth_Auth_Source_MultiAuth::delegateAuthentication($source, $state); sspmod_multiauth_Auth_Source_MultiAuth::delegateAuthentication($source, $state);
} elseif (array_key_exists('multiauth:preselect', $state)) { }
if (array_key_exists('multiauth:preselect', $state)) {
$source = $state['multiauth:preselect']; $source = $state['multiauth:preselect'];
sspmod_multiauth_Auth_Source_MultiAuth::delegateAuthentication($source, $state); sspmod_multiauth_Auth_Source_MultiAuth::delegateAuthentication($source, $state);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment