--- a/plugins/yubikey/auth.php Fri Jul 17 14:05:50 2009 -0400
+++ b/plugins/yubikey/auth.php Fri Jul 17 17:15:29 2009 -0400
@@ -28,6 +28,14 @@
$userdata['yubikey_otp'] = $userdata['password'];
}
+ // Look for a lockout
+ $lockout_info = $session->get_lockout_info($lockdata);
+ if ( $lockout_info['locked_out'] )
+ {
+ // pass on to normal auth so the lockout can be sent back properly
+ return null;
+ }
+
if ( !empty($userdata['username']) )
{
// get flags
--- a/plugins/yubikey/yubikey.js Fri Jul 17 14:05:50 2009 -0400
+++ b/plugins/yubikey/yubikey.js Fri Jul 17 17:15:29 2009 -0400
@@ -217,7 +217,7 @@
addOnloadHook(function()
{
- attachHook('login_build_form', 'yk_login_dlg_hook(table);');
+ attachHook('login_build_form', 'yk_login_dlg_hook(table, data);');
attachHook('login_build_userinfo', 'if ( window.yubikey_otp_current ) userinfo.yubikey_otp = window.yubikey_otp_current;');
if ( title == namespace_list.Special + 'Preferences/Yubikey' )
{
@@ -225,7 +225,7 @@
}
});
-function yk_login_dlg_hook(table)
+function yk_login_dlg_hook(table, data)
{
window.yubikey_otp_current = false;
var tr = document.createElement('tr');
@@ -241,7 +241,7 @@
$('#messageBoxButtons input:button:first').focus();
$('#ajax_login_field_captcha').focus();
});
- if ( window.yk_reg_require_otp || window.yk_user_enabled )
+ if ( ( window.yk_reg_require_otp || window.yk_user_enabled ) && !data.locked_out.locked_out )
{
setTimeout(function()
{