summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Arthur <paul.arthur@flowerysong.com>2011-11-22 18:04:19 -0500
committerPaul Arthur <paul.arthur@flowerysong.com>2011-11-22 18:04:19 -0500
commit57135fe167b21354a1ac0ec6cec653324c4562b2 (patch)
tree2364590e26efd3ab579b0f9312a7879cce3d3d65
parentddff3237d9a9e63230b6b9d025401a87d1c9d49d (diff)
downloadampache-57135fe167b21354a1ac0ec6cec653324c4562b2.tar.gz
ampache-57135fe167b21354a1ac0ec6cec653324c4562b2.tar.bz2
ampache-57135fe167b21354a1ac0ec6cec653324c4562b2.zip
Clean up some more "security" things.
phpinfo might actually be useful.
-rw-r--r--phpinfo.php (renamed from info.php)7
-rw-r--r--templates/show_info.inc.php96
-rw-r--r--templates/sidebar_admin.inc.php1
3 files changed, 3 insertions, 101 deletions
diff --git a/info.php b/phpinfo.php
index 5231f93c..a77ce274 100644
--- a/info.php
+++ b/phpinfo.php
@@ -25,14 +25,13 @@
* @link http://www.ampache.org/
*/
-require 'lib/init.php';
+require_once 'lib/init.php';
-if (!Access::check('interface','100')) {
+if (!Access::check('interface', 100)) {
access_denied();
exit();
}
-require_once Config::get('prefix') . '/lib/debug.lib.php';
-require_once Config::get('prefix') . '/templates/show_info.inc.php';
+phpinfo();
?>
diff --git a/templates/show_info.inc.php b/templates/show_info.inc.php
deleted file mode 100644
index 299876b1..00000000
--- a/templates/show_info.inc.php
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-/* vim:set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: */
-/**
- * Show Information
- *
- *
- * LICENSE: GNU General Public License, version 2 (GPLv2)
- * Copyright (c) 2001 - 2011 Ampache.org All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License v2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * @package Ampache
- * @copyright 2001 - 2011 Ampache.org
- * @license http://opensource.org/licenses/gpl-2.0 GPLv2
- * @link http://www.ampache.org/
- */
-
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
-<html lang="en-US">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>Ampache -- Debug Page</title>
-<link rel="stylesheet" href="templates/install.css" type="text/css" media="screen" />
-</head>
-<body bgcolor="#f0f0f0">
-<div id="header">
-<h1><?php echo _('Ampache Security Information'); ?></h1>
-<p><?php echo _('This page shows security information and ampache update information.'); ?></p>
-</div>
-<div>
-<button onclick="window.close()"><?php echo _('Close this window'); ?></button>
-<table align="center" cellpadding="3" cellspacing="0">
-<tr>
- <td><font size="+1"><?php echo _('CHECK'); ?></font></td>
- <td>
- <font size="+1"><?php echo _('STATUS'); ?></font>
- </td>
- <td><font size="+1"><?php echo _('DESCRIPTION'); ?></font></td>
-</tr>
-<tr>
- <td valign="top"><?php echo _('Ampache Version'); ?></td>
- <td valign="top">[<?php echo check_ampache_version(); ?>]</td>
- <td>
- <?php echo _('Compare that you are running a version of Ampache and currently a version of Ampache.'); ?>
- </td>
-</tr>
-<tr>
- <td valign="top"><?php echo _('PHP Version'); ?></td>
- <td valign="top">[<?php echo check_php_version(); ?>]</td>
- <td>
- <?php echo _('This test checks for vulnerable PHP whether to use version.'); ?>
- </td>
-</tr>
-<tr>
- <td valign="top"><?php echo _('PHP recommendation settings'); ?></td>
- <td valign="top"><?php
- foreach(check_security() as $warning=>$message) {
- printf('<span title="%s">%s</span><br />', $message, $warning);
- }
- ?></td>
- <td>
- <?php echo _('This test checks whether the recommended security settings.'); ?></td>
-</tr>
-<tr>
- <td valign="top"><?php echo _('PHP Info'); ?></td>
- <td valign="top">-</td>
- <td>
- <?php echo _('This is the phpinfo() to display information.'); ?>
- </td>
-</tr>
-<tr>
- <td colspan="3" valign="top">
- <?php phpinfo(INFO_GENERAL|INFO_CONFIGURATION|INFO_MODULES); ?>
- </td>
-</tr>
-</table>
-</div>
-<div id="bottom">
-<button onclick="window.close()"><?php echo _('Close this window'); ?></button>
-<p><strong>Ampache Security Center.</strong><br />
-Pour l'Amour de la Musique.</p>
-</div>
-</body>
-</html>
diff --git a/templates/sidebar_admin.inc.php b/templates/sidebar_admin.inc.php
index 1b71a8d0..789d654d 100644
--- a/templates/sidebar_admin.inc.php
+++ b/templates/sidebar_admin.inc.php
@@ -50,7 +50,6 @@
<li><h4><?php echo _('Other Tools'); ?></h4>
<ul class="sb3" id="sb_admin_ot">
<li id="sb_admin_ot_Debug"><a href="<?php echo $web_path; ?>/admin/system.php?action=show_debug"><?php echo _('Ampache Debug'); ?></a></li>
- <li id="sb_admin_ot_Security"><a href="<?php echo $web_path; ?>/info.php" onclick="window.open(this.href, 'security', 'width=700, height=300, menubar=no, toolbar=no, scrollbars=yes'); return false;"><?php echo _("Security Check"); ?></a></li>
<li id="sb_admin_ot_ClearNowPlaying"><a href="<?php echo $web_path; ?>/admin/catalog.php?action=clear_now_playing"><?php echo _('Clear Now Playing'); ?></a></li>
<li id="sb_admin_ot_ExportCatalog"><a href="<?php echo $web_path; ?>/admin/export.php"><?php echo _('Export Catalog'); ?></a></li>
<?php if (Config::get('shoutbox')) { ?>