Yubikey user CP now requires re-auth to CHPREF. Didn't win YubiKing :-(
--- a/plugins/yubikey/usercp.php Thu Mar 19 09:21:56 2009 -0400
+++ b/plugins/yubikey/usercp.php Thu Mar 19 09:27:52 2009 -0400
@@ -12,7 +12,7 @@
function yubikey_ucp_setup()
{
- userprefs_menu_add('usercp_sec_profile', 'yubiucp_panel_title', makeUrlNS('Special', 'Preferences/Yubikey'));
+ userprefs_menu_add('usercp_sec_profile', 'yubiucp_panel_title', makeUrlNS('Special', 'Preferences/Yubikey') . '" onclick="ajaxLoginNavTo(\'Special\', \'Preferences/Yubikey\', '.USER_LEVEL_CHPREF.'); return false;');
}
function yubikey_user_cp($section)
@@ -23,6 +23,11 @@
if ( $section !== 'Yubikey' )
return false;
+ if ( $session->auth_level < USER_LEVEL_CHPREF )
+ {
+ redirect(makeUrlNS('Special', 'Login/' . $paths->fullpage, 'level=' . USER_LEVEL_CHPREF, true), 'Authentication required', 'You need to re-authenticate to access this page.', 0);
+ }
+
$count_enabled = intval(getConfig('yubikey_enroll_limit', '3'));
if ( isset($_POST['submit']) )