X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/6b3d5ba966ffd150d635a618593295958233baef..HEAD:/show_headers.php diff --git a/show_headers.php b/show_headers.php index 7cee6dc..34ca065 100644 --- a/show_headers.php +++ b/show_headers.php @@ -8,13 +8,18 @@ $util = new Utils; $loggedIn = $util->isLoggedIn(); if ($loggedIn && isset($_GET['id'])) { + $id = $_GET['id']; + $mail = unserialize($_SESSION['mailInfo'][$id]); + + if (! is_object($mail) || false == $util->authorized($mail->recipient)) { + header('Location: qtadmin.php'); + exit; + } + $util->setHeading('Full Headers Report'); echo $util->getHeader(); echo $util->getHeading(); - $id = $_GET['id']; - $mail = unserialize($_SESSION['mailInfo'][$id]); - $row = $DB->getMail($id); $string = $row->mail_text; $sa_tests = null; @@ -51,7 +56,7 @@ echo $output; echo $util->getFooter(); } else if ($loggedIn) { - header('Location: index.php'); + header('Location: qtadmin.php'); } else { header('Location: auth.php'); }