Beispiel #1
0
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();
        }
    }
}
Beispiel #2
0
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;
    }
}