Skip to content
Snippets Groups Projects
Commit 27035b42 authored by Juanjo Menent's avatar Juanjo Menent
Browse files

Merge pull request #2788 from GPCsolutions/testaccess

Change low level access verification to a better high level one
parents c5101ae5 040df3c9
No related branches found
No related tags found
No related merge requests found
...@@ -2,16 +2,12 @@ ...@@ -2,16 +2,12 @@
//define("NOLOGIN",1); // This means this output page does not require to be logged. //define("NOLOGIN",1); // This means this output page does not require to be logged.
define("NOCSRFCHECK",1); // We accept to go on this page from external web site. define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
require '../../main.inc.php'; require '../../main.inc.php';
if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1') if ($dolibarr_main_prod) {
{ accessforbidden();
print "Page available only from remote address 127.0.0.1";
exit;
} }
$usedolheader=1; // 1 = Test inside a dolibarr page, 0 = Use hard coded header $usedolheader=1; // 1 = Test inside a dolibarr page, 0 = Use hard coded header
......
...@@ -6,13 +6,10 @@ define('REQUIRE_JQUERY_MULTISELECT','select2'); ...@@ -6,13 +6,10 @@ define('REQUIRE_JQUERY_MULTISELECT','select2');
require '../../main.inc.php'; require '../../main.inc.php';
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1') if ($dolibarr_main_prod) {
{ accessforbidden();
print "Page available only from remote address 127.0.0.1";
exit;
} }
llxHeader(); llxHeader();
?> ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment