Skip to content
Snippets Groups Projects
Commit 1d1970b5 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Sec: Bad security test

parent a2c9d5bd
No related branches found
No related tags found
No related merge requests found
......@@ -4,11 +4,14 @@ define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
require '../../main.inc.php';
if ($_SERVER['HTTP_HOST'] != 'localhost')
if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1')
{
print "Page available only with url http://localhost/...";
print "Page available only frome remote address 127.0.0.1";
exit;
}
$usedolheader=0; // 1 = Test inside a dolibarr page, 0 = Use hard coded header
......
......@@ -6,9 +6,9 @@ define('REQUIRE_JQUERY_MULTISELECT','select2');
require '../../main.inc.php';
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
if ($_SERVER['HTTP_HOST'] != 'localhost')
if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1')
{
print "Page available only with url http://localhost/...";
print "Page available only frome remote address 127.0.0.1";
exit;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment