Should work with Yubico's official server now - forgot to account for newlines.
--- a/plugins/yubikey/corelib.php Thu Feb 26 11:30:17 2009 -0500
+++ b/plugins/yubikey/corelib.php Thu Feb 26 16:33:06 2009 -0500
@@ -85,8 +85,7 @@
);
}
$response = trim($response);
- $response_nosig = preg_replace('/^h=(.+?)$/m', '', $response);
- if ( !preg_match_all('/^([a-z0-9_]+)=(.*?)$/m', $response, $matches) )
+ if ( !preg_match_all('/^([a-z0-9_]+)=(.*?)\r?$/m', $response, $matches) )
{
return array(
'success' => false,
@@ -145,8 +144,6 @@
static $api_key = false;
ksort($arr);
- if ( isset($arr['h']) )
- unset($arr['h']);
if ( !$api_key )
{
@@ -154,6 +151,9 @@
$api_key = hexencode(base64_decode($api_key), '', '');
}
+ if ( isset($arr['h']) )
+ unset($arr['h']);
+
$req = array();
foreach ( $arr as $key => $val )
{