Skip to content

Commit

Permalink
Merge pull request #2788 from GPCsolutions/testaccess
Browse files Browse the repository at this point in the history
Change low level access verification to a better high level one
  • Loading branch information
Juanjo Menent committed May 9, 2015
2 parents c5101ae + 040df3c commit 27035b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
10 changes: 3 additions & 7 deletions htdocs/public/test/test_arrays.php
Expand Up @@ -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


Expand Down Expand Up @@ -358,4 +354,4 @@ function(){
</body>
<?php } ?>

</html>
</html>
7 changes: 2 additions & 5 deletions htdocs/public/test/test_forms.php
Expand Up @@ -6,13 +6,10 @@
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();

?>
Expand Down

0 comments on commit 27035b4

Please sign in to comment.