Merge pull request #2788 from GPCsolutions/testaccess

Change low level access verification to a better high level one
This commit is contained in:
Juanjo Menent 2015-05-09 13:55:17 +02:00
commit 27035b42b0
2 changed files with 5 additions and 12 deletions

View File

@ -2,16 +2,12 @@
//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.
require '../../main.inc.php';
if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1')
{
print "Page available only from remote address 127.0.0.1";
exit;
if ($dolibarr_main_prod) {
accessforbidden();
}
$usedolheader=1; // 1 = Test inside a dolibarr page, 0 = Use hard coded header
@ -358,4 +354,4 @@ if (! empty($usedolheader))
</body>
<?php } ?>
</html>
</html>

View File

@ -6,13 +6,10 @@ define('REQUIRE_JQUERY_MULTISELECT','select2');
require '../../main.inc.php';
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1')
{
print "Page available only from remote address 127.0.0.1";
exit;
if ($dolibarr_main_prod) {
accessforbidden();
}
llxHeader();
?>