# HG changeset patch # User Dan # Date 1237469272 14400 # Node ID c479ca761d29d5ece1dba6c978f99be94795cb95 # Parent 800df1e3c69ab50657e52089d445d8814f60a1e5 Yubikey user CP now requires re-auth to CHPREF. Didn't win YubiKing :-( diff -r 800df1e3c69a -r c479ca761d29 plugins/yubikey/usercp.php --- 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']) )