Merge pull request #2788 from GPCsolutions/testaccess
Change low level access verification to a better high level one
This commit is contained in:
commit
27035b42b0
@ -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
|
||||||
|
|
||||||
|
|
||||||
@ -358,4 +354,4 @@ if (! empty($usedolheader))
|
|||||||
</body>
|
</body>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -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();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user