diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-15 08:54:54 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-15 08:54:54 +0000 |
commit | d3176c22e90e0a09b22790036f1f61fc926912c9 (patch) | |
tree | b944432cd2b93eae5f1426cb4937f7b8389bdff8 | |
parent | 1cf10721654764b366f6b105e76da071aa3c7f66 (diff) | |
download | ampache-d3176c22e90e0a09b22790036f1f61fc926912c9.tar.gz ampache-d3176c22e90e0a09b22790036f1f61fc926912c9.tar.bz2 ampache-d3176c22e90e0a09b22790036f1f61fc926912c9.zip |
added little note on access add as to the defaults, fixed api to use session_length added check for session functions with redirect to /test.php on failure
-rwxr-xr-x | docs/CHANGELOG | 2 | ||||
-rw-r--r-- | lib/class/api.class.php | 2 | ||||
-rw-r--r-- | modules/vauth/session.lib.php | 7 | ||||
-rw-r--r-- | templates/show_add_access.inc.php | 4 | ||||
-rw-r--r-- | themes/classic/templates/default.css | 6 |
5 files changed, 19 insertions, 2 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 6d0ade3f..10ddbc6f 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,8 @@ -------------------------------------------------------------------------- v.3.4-Alpha4 + - Added function exists check for session with redirect to /test.php + on failure - Fixed incorrect extension and stream command being sent when using transcode for type other then mp3 - Fixed default flac downsample command, removed -r as flac decode diff --git a/lib/class/api.class.php b/lib/class/api.class.php index 592ae953..40cff61f 100644 --- a/lib/class/api.class.php +++ b/lib/class/api.class.php @@ -104,7 +104,7 @@ class Api { $token = md5(uniqid(rand(), true)); $level = Dba::escape($level); $agent = Dba::escape($_SERVER['HTTP_USER_AGENT']); - $expire = time() + 3600; + $expire = time() + Config::('session_length'); $sql = "REPLACE INTO `session_api` (`id`,`user`,`agent`,`level`,`expire`,`ip`) " . "VALUES ('$token','$user_id','$agent','$level','$expire','$ip')"; diff --git a/modules/vauth/session.lib.php b/modules/vauth/session.lib.php index 36931d68..ef91a473 100644 --- a/modules/vauth/session.lib.php +++ b/modules/vauth/session.lib.php @@ -25,6 +25,13 @@ * and then contains the functions that the session handler references */ +// Quick check for the session functions if they don't exist redirect to /test.php +if (!function_exists('session_set_save_handler')) { + header("Location: " . Config::get('web_path') . "/test.php"); + debug_event('ERROR','Missing PHP Session Module','1'); + exit; +} + /* Always register the customer handler */ session_set_save_handler( 'vauth_sess_open', diff --git a/templates/show_add_access.inc.php b/templates/show_add_access.inc.php index 8cea9ab6..28f592a1 100644 --- a/templates/show_add_access.inc.php +++ b/templates/show_add_access.inc.php @@ -32,12 +32,14 @@ <td><?php echo _('Start IP Address'); ?>:</td> <td> <input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" maxlength="15" /> + <span class="information">(0.0.0.0)</span> </td> </tr> <tr> <td><?php echo _('End IP Address'); ?>:</td> <td> <input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" maxlength="15" /> + <span class="information">(0.0.0.0)</span> </td> </tr> <tr> @@ -74,7 +76,7 @@ <tr> <td><?php echo _('Remote Key'); ?>:</td> <td> - <input type="text" name="key" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="32" maxlength="32" /> + <input type="text" name="key" value="<?php echo scrub_out($_REQUEST['end']); ?>" maxlength="32" /> </td> </tr> </table> diff --git a/themes/classic/templates/default.css b/themes/classic/templates/default.css index 06fabf73..ba71d503 100644 --- a/themes/classic/templates/default.css +++ b/themes/classic/templates/default.css @@ -682,3 +682,9 @@ a.button{padding:1px 3px;} display: none;
text-indent:-9999em;
}
+
+.information {
+ font-size: 0.9em;
+ font-style: italic;
+ color: #c0c0c0;
+}
|