Re: "Attaque" bizarre sur 2 sites que j'h éberge

nicod_ <[email protected]>
Newsgroups gmane.comp.web.spip.devel
Message-ID <[email protected]>
Le 12/04/2018 à 16:49, Cerdic a écrit :
> Le bout de code auquel je pensais n’est pas dans le repo public, je vais 
> remettre la main dessus

Même problème à l'instant sur un autre site.

J'ai mis ça dans mes_options pour bloquer et logger les IPs :

if (substr(_request('recherche'),0,4)=='http'){
	if ($GLOBALS['ip']) {
		touch('tmp/flood/'.$GLOBALS['ip']);
	}
	header("HTTP/1.0 403 Forbidden");
	header("Expires: Wed, 11 Jan 1984 05:00:00 GMT");
	header("Cache-Control: no-cache, must-revalidate");
	header("Pragma: no-cache");
	header("Content-Type: text/html");
	die("<html><title>Error 403: Forbidden</title><body><h1>Error 
403</h1><p>You are not authorized to view this page.</p></body></html>");
}

j'ai mis tmp en dur dans le touch car _DIR_TMP n'était pas déclaré à ce 
moment là sur mes premiers tests (je ne sais pas pourquoi).

-- 
nicod_
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.