From 06f7540b264baf6e8fd1802ba2db18f824a95495 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Fri, 7 Feb 2025 14:58:10 -0700 Subject: [PATCH] bug fixes. --- spies/index.php | 67 ++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/spies/index.php b/spies/index.php index b07f1c2..3a4dee4 100644 --- a/spies/index.php +++ b/spies/index.php @@ -9,7 +9,6 @@ if (isset($_POST['username']) && isset($_POST['password'])) { $username = $_POST['username']; $password = $_POST['password']; if (array_key_exists($username, $users) && $users[$username] === $password) { - $_GET['error'] = false; $_SESSION['access'] = true; $_GET['file'] = 'includes/fbi.txt'; } else { @@ -35,40 +34,40 @@ if (isset($_GET['logout'])) {

View Confidential Information

- - - -
-
Access Denied.
-
- - -
-
- - -
-
- - -
-
- - -
-
Access Granted.
-
-
-
- - - -
-
- - +
Access Denied.
+ + '; + } + echo ' +
+
+ + +
+
+ + +
+
+ '; +} else if (isset($_GET['file']) && isset($_SESSION['access'])) { + echo ' +
+
Access Granted.
+
+
+
+ + + +
+
+ '; fileRead($_GET['file']); } ?>