diff --git a/htdocs/public/test/badges.php b/htdocs/public/test/badges.php
index 2190b96db7e..1090da5445a 100644
--- a/htdocs/public/test/badges.php
+++ b/htdocs/public/test/badges.php
@@ -28,11 +28,16 @@ session_cache_limiter('public');
require_once '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
+// Security
if ($dolibarr_main_prod) {
accessforbidden();
}
+/*
+ * View
+ */
+
llxHeader('', 'Documentation and examples for theme');
?>
Badges
diff --git a/htdocs/public/test/buttons.php b/htdocs/public/test/buttons.php
index 9e0335e2913..4621ad0f340 100644
--- a/htdocs/public/test/buttons.php
+++ b/htdocs/public/test/buttons.php
@@ -28,11 +28,16 @@ session_cache_limiter('public');
require_once '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
+// Security
if ($dolibarr_main_prod) {
accessforbidden();
}
+/*
+ * View
+ */
+
llxHeader('', 'Documentation and examples for theme');
?>
diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php
index b2a87a75480..05fc13c0dbc 100644
--- a/htdocs/public/test/test_arrays.php
+++ b/htdocs/public/test/test_arrays.php
@@ -22,19 +22,22 @@ if (!defined("NOLOGIN")) {
define("NOLOGIN", '1'); // If this page is public (can be called outside logged session)
}
-
require '../../main.inc.php';
+// Security
if ($dolibarr_main_prod) {
accessforbidden();
}
-$usedolheader = 1; // 1 = Test inside a dolibarr page, 0 = Use hard coded header
+
+
+/*
+ * View
+ */
$form = new Form($db);
-
-
+$usedolheader = 1; // 1 = Test inside a dolibarr page, 0 = Use hard coded header
// HEADER
//--------
diff --git a/htdocs/public/test/test_csrf.php b/htdocs/public/test/test_csrf.php
index c66ac19c423..94d76469f81 100644
--- a/htdocs/public/test/test_csrf.php
+++ b/htdocs/public/test/test_csrf.php
@@ -1,5 +1,38 @@
diff --git a/htdocs/public/test/test_exec.php b/htdocs/public/test/test_exec.php
new file mode 100644
index 00000000000..8464ba2eb4f
--- /dev/null
+++ b/htdocs/public/test/test_exec.php
@@ -0,0 +1,72 @@
+\n";
+print 'PHP_SESSION_DISABLED='.PHP_SESSION_DISABLED."
\n";
+print 'PHP_SESSION_NONE='.PHP_SESSION_NONE."
\n";
+print 'PHP_SESSION_ACTIVE='.PHP_SESSION_ACTIVE."
\n";
+print '
';
+
+print 'session_status='.session_status().' (before main.inc.php)';
+print '
';
+
+require '../../main.inc.php';
+
+// Security
+if ($dolibarr_main_prod) {
+ accessforbidden();
+}
+
+
+/*
+ * View
+ */
+
+print 'session_status='.session_status().' (after main.inc.php)';
+print '
';
+
+//print 'a'.$_SESSION['disablemodules'].'b';
+
+print "\n
This page is visible. It means you are not locked by another page called in same session.";
+
+//session_write_close();
diff --git a/htdocs/public/test/test_forms.php b/htdocs/public/test/test_forms.php
index d89e04e12a6..c025151bdb9 100644
--- a/htdocs/public/test/test_forms.php
+++ b/htdocs/public/test/test_forms.php
@@ -8,10 +8,16 @@ if (!defined('NOSESSION')) {
require '../../main.inc.php';
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
+// Security
if ($dolibarr_main_prod) {
accessforbidden();
}
+
+/*
+ * View
+ */
+
llxHeader();
?>
diff --git a/htdocs/public/test/test_sessionlock.php b/htdocs/public/test/test_sessionlock.php
index 18a1ef73d08..83d21f38aae 100644
--- a/htdocs/public/test/test_sessionlock.php
+++ b/htdocs/public/test/test_sessionlock.php
@@ -52,17 +52,34 @@ print '
';
require '../../main.inc.php';
-/* No need for this.
+// Security
if ($dolibarr_main_prod) {
accessforbidden();
}
-*/
-print 'session_status='.session_status().' (after main.inc.php)';
-print '
';
-//print 'a'.$_SESSION['disablemodules'].'b';
+/*
+ * View
+ */
-print "\n
This page is visible. It means you are not locked by another page called in same session.";
+echo "Test\n";
+$out='';
+$ret=0;
-//session_write_close();
+$file = '/tmp/aaa';
+$f=fopen($file, 'r');
+if ($f) {
+ $s=fread($f, 4096);
+ print $s;
+ fclose($f);
+} else {
+ print "Failed to open file ".$file."\n";
+}
+
+exec('ls /dev/std*; sleep 1;', $out, $ret);
+var_dump($ret);
+var_dump($out);
+
+exec('/usr/bin/clamdscan --fdpass filethatdoesnotexists.php', $out, $ret);
+var_dump($ret);
+var_dump($out);