summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/security.lib.php25
-rw-r--r--templates/show_info.inc.php12
-rw-r--r--templates/sidebar_admin.inc.php1
3 files changed, 29 insertions, 9 deletions
diff --git a/lib/security.lib.php b/lib/security.lib.php
index 7f076fb5..ce647eb6 100644
--- a/lib/security.lib.php
+++ b/lib/security.lib.php
@@ -37,14 +37,14 @@
*/
/**
- * check_ampache
+ * check_ampache_version
*
* This function checks latest ampache stable from Ampache web site.
* If new version found, return error message.
*
* @return string
*/
-function check_ampache() {
+function check_ampache_version() {
$my_ampache = Config::get('version');
if(preg_match('#-#', $my_ampache)) {
@@ -64,10 +64,10 @@ function check_ampache() {
return $results;
-} // check_ampache
+} // check_ampache_version
/**
- * check_php_security
+ * check_php_version
*
* This function checks latest PHP stable from php web site.
* If new version found, return error message.
@@ -75,7 +75,7 @@ function check_ampache() {
*
* @return string
*/
-function check_php_security() {
+function check_php_version() {
$my_php = PHP_VERSION;
@@ -99,7 +99,7 @@ function check_php_security() {
return $results;
-} // check_php_security
+} // check_php_version
/**
* get_latest
@@ -169,5 +169,16 @@ function get_latest($type = null) {
return $version;
-}
+} // get_latest
+
+/**
+ * check_security
+ *
+ * This function tests wheter vulnerable settings on your php.ini
+ *
+ * @return array Show security messages, if found.
+ */
+function check_security() {
+
+} // check_security
?>
diff --git a/templates/show_info.inc.php b/templates/show_info.inc.php
index 64646979..35b5abe8 100644
--- a/templates/show_info.inc.php
+++ b/templates/show_info.inc.php
@@ -45,6 +45,7 @@
<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>
@@ -55,19 +56,25 @@
</tr>
<tr>
<td valign="top"><?php echo _('Ampache Version'); ?></td>
- <td valign="top">[<?php echo check_ampache(); ?>]</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_security(); ?>]</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">[]</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>
@@ -82,6 +89,7 @@
</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>
diff --git a/templates/sidebar_admin.inc.php b/templates/sidebar_admin.inc.php
index 77935832..493b4273 100644
--- a/templates/sidebar_admin.inc.php
+++ b/templates/sidebar_admin.inc.php
@@ -55,6 +55,7 @@
<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')) { ?>