Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 3087 → Rev 3088

/web/intercept.php
444,16 → 444,13
//thanks to http://www.stochasticgeometry.ie/2009/09/09/maximum-password-length-in-coova-chilli/
$hexchal = pack('H*', $challenge);
$newchal = pack('H*', hash('sha256',$hexchal . $uamsecret));
 
// If challenge isn't long enough, repeat it until it is
while (strlen($newchal) < strlen($password)) {
$newchal .= $newchal;
}
 
$newpwd = pack('a*', $password);
// Encode plain text password with challenge
$pappassword = implode('', unpack('H*', ($newpwd ^ $newchal)));
 
header("Location: $uamproto://$uamip:$uamport/logon?username=$username&password=$pappassword&userurl=$userurl");
exit();
}