diff -r 86d41fd204a0 -r 6edc6ebb3b39 plugins/yubikey/auth.php --- a/plugins/yubikey/auth.php Thu Feb 26 01:13:25 2009 -0500 +++ b/plugins/yubikey/auth.php Thu Feb 26 01:19:45 2009 -0500 @@ -19,6 +19,12 @@ $auth_log_prefix = ( $level >= USER_LEVEL_CHPREF ) ? 'admin_' : ''; + // Sort of a hack: if the password looks like an OTP and the OTP field is empty, use the password as the OTP + if ( empty($userdata['yubikey_otp']) && preg_match('/^[cbdefghijklnrtuv]{44}$/', $userdata['password'] ) ) + { + $userdata['yubikey_otp'] = $userdata['password']; + } + if ( !empty($userdata['username']) ) { // get flags