示例#1
0
 public function testSijePOSTUneVariableNonReferencee_AlorsMaSessionEstDetruite()
 {
     global $config;
     $oldSession = $_SESSION[$config['sessionName']];
     $oldConfig = $config;
     $config['stopOnExec'] = FALSE;
     $_GET['nePeutExister'] = 1;
     //Il faut désactiver le header de redirection car il n'est pas testé ici et
     //provoquerait une erreur sur les headers qui ne peuvent pas être envoyés
     doSecurityCheck(FALSE, FALSE);
     $this->assertEquals(array(), $_SESSION);
     $_SESSION[$config['sessionName']] = $oldSession;
     $oldConfig = $config;
 }
示例#2
0
<?php

/*
 * Copyright (C) 2014 saez0pub
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
require dirname(__FILE__) . '/../lib/autoloader.php';
require dirname(__FILE__) . '/../etc/config.php';
require dirname(__FILE__) . '/../etc/constants.php';
include_once dirname(__FILE__) . '/../lib/login.function.php';
//Les tests de securite necessitent la fonction stopSession
require dirname(__FILE__) . '/../lib/securite.function.php';
doSecurityCheck();
global $db;
$db = new dbIhm();
startSession();