diff --git a/action.php b/action.php index 26681da1a..aa18b27e2 100644 --- a/action.php +++ b/action.php @@ -155,13 +155,14 @@ foreach ($reqs as $reqData) { case 'getassertion': // direct $servertoken = getServerToken($users->getCookiePath()); - if (!$servertoken || empty($reqData['userid'])) { + if (!$servertoken) { die('Bogus request.'); } $challengekeyid = !isset($reqData['challengekeyid']) ? -1 : intval($reqData['challengekeyid']); $challenge = !isset($reqData['challenge']) ? '' : $reqData['challenge']; header('Content-type: text/plain'); - $userid = $users->userid($reqData['userid']); + if (empty($reqData['userid'])) $userid = $curuser['userid']; + else $userid = $users->userid($reqData['userid']); $servertoken = htmlspecialchars($servertoken); // Protect against theoretical IE6 XSS die($users->getAssertion($userid, $servertoken, null, $challengekeyid, $challenge)); break; diff --git a/js/sim.js b/js/sim.js index 407e0879e..aa87a199f 100644 --- a/js/sim.js +++ b/js/sim.js @@ -2892,7 +2892,7 @@ function overlay(overlayType, data) { case 'testclientgetassertion': contents += '
Because of the same-origin policy, some manual work is required to log in using testclient.html.
Please copy all the text from the box above and paste it in the box below. If the box above just shows a semi-colon (;) or says "Bogus request", log in using the official client and then refresh this page.
'; + contents += 'Please copy all the text from the box above and paste it in the box below. If the box above just shows a semi-colon (;), log in using the official client and then refresh this page.
'; contents += ''; contents += ''; contents += '
'; @@ -3242,11 +3242,7 @@ var cookieTeams = true; if (parts[1] === 'challenge-string') { me.challengekeyid = parseInt(parts[2], 10); me.challenge = parts[3]; - if (name !== '') { - renameMe(name); - } else { - overlay('rename'); - } + renameMe(name); return true; } return false;