--- a/plugins/yubikey/auth.php Sat May 16 18:24:45 2009 -0400
+++ b/plugins/yubikey/auth.php Fri Jul 17 17:15:10 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 Sat May 16 18:24:45 2009 -0400
+++ b/plugins/yubikey/yubikey.js Fri Jul 17 17:15:10 2009 -0400
@@ -212,7 +212,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' )
{
@@ -220,7 +220,7 @@
}
});
-function yk_login_dlg_hook(table)
+function yk_login_dlg_hook(table, data)
{
window.yubikey_otp_current = false;
var tr = document.createElement('tr');
@@ -236,7 +236,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()
{