diff --git a/app/helpers/pagination.php b/app/helpers/pagination.php index 601a124..d626de6 100644 --- a/app/helpers/pagination.php +++ b/app/helpers/pagination.php @@ -26,7 +26,7 @@ $step_pages = 10; if ($browse_page > 1) { - echo 'first'; + echo 'first'; } else { echo 'first'; } @@ -47,20 +47,20 @@ if ($i === $browse_page) { // current page, no link if ($browse_page > 1) { - echo '<<'; + echo '<<'; } else { echo '<<'; } - echo '[' . $i . ']'; + echo '[' . htmlspecialchars($i) . ']'; if ($browse_page < $page_count) { - echo '>>'; + echo '>>'; } else { echo '>>'; } } else { // other pages - echo '[' . $i . ']'; + echo '[' . htmlspecialchars($i) . ']'; } // show ellipses between distant pages } elseif ( @@ -72,7 +72,7 @@ } if ($browse_page < $page_count) { - echo 'last'; + echo 'last'; } else { echo 'last'; } diff --git a/app/helpers/sanitize.php b/app/helpers/sanitize.php index 4ed6b19..be9bcf8 100644 --- a/app/helpers/sanitize.php +++ b/app/helpers/sanitize.php @@ -1,5 +1,6 @@ diff --git a/app/pages/config.php b/app/pages/config.php index 1ef2604..90eea9a 100644 --- a/app/pages/config.php +++ b/app/pages/config.php @@ -17,12 +17,6 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // $content = file_get_contents($config_file); // $updatedContent = $content; - // sanitize - $type = htmlspecialchars($_POST['type']); - $url = htmlspecialchars($_POST['url']); - $secret_key = htmlspecialchars($_POST['secret_key']); - $name = htmlspecialchars($_POST['name']); - // new agent adding if (isset($_POST['new']) && isset($_POST['item']) && $_POST['new'] === 'true' && $_POST['item'] === 'agent') { $newAgent = [ diff --git a/app/templates/agent-list.php b/app/templates/agent-list.php index bba0403..8cb9797 100644 --- a/app/templates/agent-list.php +++ b/app/templates/agent-list.php @@ -1,14 +1,14 @@
Jilo Agents on platform = $platform_id ?> (= $platformDetails[0]['name'] ?>)
+Jilo Agents on platform = htmlspecialchars($platform_id) ?> (= htmlspecialchars($platformDetails[0]['name']) ?>)
- agent id: = $agent['id'] ?>
- agent type: = $agent['agent_type_id'] ?> (= $agent['agent_description'] ?>)
+ agent id: = htmlspecialchars($agent['id']) ?>
+ agent type: = htmlspecialchars($agent['agent_type_id']) ?> (= htmlspecialchars($agent['agent_description']) ?>)
- endpoint: = $agent['url'] ?>= $agent['agent_endpoint'] ?>
+ endpoint: = htmlspecialchars($agent['url']) ?>= htmlspecialchars($agent['agent_endpoint']) ?>
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
click a button to display data from the agent.+
click a button to display data from the agent.diff --git a/app/templates/block-message.php b/app/templates/block-message.php index 50a3133..4cb5df0 100644 --- a/app/templates/block-message.php +++ b/app/templates/block-message.php @@ -1,7 +1,7 @@ - +