LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > default autoindex script

Reply
 
Thread Tools Display Modes
  #1  
Old 05-07-2005, 07:38 AM
djkoopman djkoopman is offline
New Member
 
Join Date: May 2005
Posts: 4
Default default autoindex script

The default autoindex script gives the wrong url in the HREF= "foo", to correct that apply this patch:-

--- default.php.orig 2005-05-07 15:26:27.000000000 +0100
+++ default.php 2005-05-07 15:26:34.000000000 +0100
@@ -171,7 +171,7 @@
function printOneEntry( $base, $name, $fileStat, $setting )
{
$buf = '<img SRC="' . $setting->IconPath . '/' . $fileStat->img->imageName .
- '" ALT="' . $fileStat->img->alt . '"> <A HREF="' . $base . $fileStat->name.$fileStat->isdir.'">';
+ '" ALT="' . $fileStat->img->alt . '"> <A HREF="' . $fileStat->name.$fileStat->isdir.'">';
if ( strlen( $name ) > $setting->nameWidth )
{
$name = substr( $name, 0, $setting->nameWidth - 3 ). '...';


Whilst I am about it, it would be nice to be able to select which index script I use on a server level. I cannot find a screen with a slot for that. I know I can select it on a virtual server basis (but why a URI and not a path when the default obviously uses a path)?
Reply With Quote
  #2  
Old 05-07-2005, 08:22 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Thank you for the patch, will apply it.

We can add server level configuration. Actaully, you can just modify the default script, it affects all vhosts, and creat a specific one for one vhost when needed.

The reason we use URI not path is for security reason, it makes sure that only scripts available to vhost can be used.
Reply With Quote
  #3  
Old 05-09-2005, 11:12 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Your patch does not fix the problem completely,
The correct fix should be replacing all "PHP_SELF" with "REQUEST_URI".

"PHP_SELF" was the same value as "REQUEST_URI" before 2.0.4 release.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
XSS is autoindex | patch included felosi Bug Reports 2 07-29-2007 04:23 PM
syntax of Expires Default gjanga Install/Configuration 1 05-22-2007 04:27 AM
install from script? djsodom Install/Configuration 6 04-02-2007 05:18 PM
context for CGI script always says "access denied" henpa Install/Configuration 1 03-28-2006 09:43 AM
Upgrade replaced some content in DEFAULT directory pcguru Bug Reports 1 01-15-2006 11:51 AM


All times are GMT -7. The time now is 12:49 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.