function dvwaPageStartup($pActions) { if (in_array('authenticated', $pActions)) { if (!dvwaIsLoggedIn()) { dvwaRedirect(DVWA_WEB_PAGE_TO_ROOT . 'login.php'); } } if (in_array('phpids', $pActions)) { if (dvwaPhpIdsIsEnabled()) { dvwaPhpIdsTrap(); } } }
function dvwaPageStartup($pActions) { if (in_array('authenticated', $pActions)) { if (!dvwaIsLoggedIn()) { dvwaRedirect(DVWA_WEB_PAGE_TO_ROOT . 'login.php'); } } if (in_array('phpids', $pActions)) { if (dvwaPhpIdsIsEnabled()) { dvwaPhpIdsTrap(); } } if (in_array('admin', $pActions)) { if (!xlabisadmin()) { dvwaRedirect(DVWA_WEB_PAGE_TO_ROOT . 'login.php'); } } $setuser = xlabGetSqli('setuser', $_REQUEST); if (dvwaGetuser() == "admin" && !empty($setuser)) { $dvwasession =& dvwaSessionGrab(); $dvwasession['username'] = $setuser; } }