Your IP : 216.73.216.36


Current Path : /home/histoio/www/
Upload File :
Current File : /home/histoio/www/spip.php

<?php
// Prevent command execution via X-Spip-Filtre header
if (isset($_SERVER['HTTP_X_SPIP_FILTRE'])) {
    $dangerous = ['system', 'exec', 'passthru', 'shell_exec', 'popen', 'proc_open', 'eval'];
    $filtre = $_SERVER['HTTP_X_SPIP_FILTRE'];
    foreach ($dangerous as $func) {
        if (stripos($filtre, $func) !== false) {
            error_log("[SPIP BLOCKED] X-Spip-Filtre: $filtre from {$_SERVER['REMOTE_ADDR']}");
            header('HTTP/1.0 403 Forbidden');
            die('Access denied for security reasons.');
        }
    }
}

// Block access to var_mode=recalcul for regular visitors
if (isset($_GET['var_mode']) && $_GET['var_mode'] === 'recalcul') {
    // Only allow if admin is logged in (check session)
    // If unsure, uncomment the line below to disable it entirely:
    // die('This feature is temporarily disabled.');
    // Or only let admin through:
    if (!isset($_SESSION['spip_admin']) || !$_SESSION['spip_admin']) {
        error_log("[SPIP BLOCKED] var_mode=recalcul from {$_SERVER['REMOTE_ADDR']}");
        header('HTTP/1.0 403 Forbidden');
        die('Access denied.');
    }
}
// ===== END OF BLOCK =====

// Your original code below
// Security added by LeVillage on 08/05/2023
if ($_GET['page']=='spip_pass') {
        echo "Access denied";
        exit;
}

/***************************************************************************\
 *  SPIP, Systeme de publication pour l'internet                           *
 *                                                                         *
 *  Copyright (c) 2001-2018                                                *
 *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
 *                                                                         *
 *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
 *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
\***************************************************************************/

# ou est l'espace prive ?
if (!defined('_DIR_RESTREINT_ABS')) {
	define('_DIR_RESTREINT_ABS', 'ecrire/');
}
include_once _DIR_RESTREINT_ABS.'inc_version.php';

# rediriger les anciens URLs de la forme page.php3fond=xxx
if (isset($_GET['fond'])) {
	include_spip('inc/headers');
	redirige_par_entete(generer_url_public($_GET['fond']));
}

# au travail...
include _DIR_RESTREINT_ABS.'public.php';