Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create echo.php #2959

Merged
merged 3 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions echo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
// Copyright 2023 Catchpoint Systems Inc.
// Use of this source code is governed by the Polyform Shield 1.0.0 license that can be
// found in the LICENSE.md file.
require_once __DIR__ . '/common.inc';
if (!$privateInstall && !$admin) {
header("HTTP/1.1 403 Unauthorized");
exit;
}
set_time_limit(0);
$admin = true;

$title = 'WebPageTest - Echo';
require_once INCLUDES_PATH . '/include/admin_header.inc';

$hidden = ["argv", "REDIRECT_DOCUMENT_ROOT", "DOCUMENT_ROOT","CONTEXT_DOCUMENT_ROOT","SCRIPT_FILENAME","ORIG_PATH_TRANSLATED","SERVER_ADMIN","SERVER_SOFTWARE","PATH","REDIRECT_HANDLER"];
foreach($hidden as $x) {
unset($_SERVER[$x]);
}
echo '<pre>'; print_r($_SERVER); echo '</pre>';

require_once INCLUDES_PATH . '/include/admin_footer.inc';
?>
3 changes: 2 additions & 1 deletion www/include/admin_header.inc
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ function header_link($url, $title)
<?php header_link('/checkIPs.php', 'Check IPs'); ?>
<?php header_link('/checkLocations.php', 'Check Locations'); ?>
<?php header_link('/admin.php?page=browsers', 'Browser config'); ?>
<?php header_link('/echo.php', 'Echo settings'); ?>
</ul>
</div>
</div>
</div>

<div class="container-fluid">
<div class="container-fluid">