[Lxr-dev] [ lxr-Bugs-536369 ] opendir doesn't work?
Brought to you by:
ajlittoz
From: <no...@so...> - 2002-04-30 10:33:22
|
Bugs item #536369, was opened at 2002-03-29 02:59 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=390117&aid=536369&group_id=27350 Category: None Group: v0.9.1 Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: opendir doesn't work? Initial Comment: I have downloaded & installed the latest lxr version. I have always preferred python, php or csh-gawk-grep-sed to do scripting stuff over perl, so i will need your help here :) My problem is that when i point my browser to http://localhost/lxr/source i get a message that my src directory can't be read (although it is guo+xrw) So even though i get the header stuff of the page, etc i don't get the contents of the src dir in the browser. Error is in : lib/LXR/File/Plain.pm line 104 So what can the problem be? I know that somehow apache must have access to that directory. I put a link from /usr/local/lxr to my source dir, so that permissions in .htacess apply to src dir too, but i still can't have access to the src dir !!! How can i solve this ?? Now, i tried to debug Plain.pm, by printing some stuff, but the fact is i keep getting the error for line 104 again, although it is now 107! I have diabled caching in the browser, so i guess it is apache who has cached the Plain.pm How can i solve this too?? Many thanks ! Manolis Perakakis ---------------------------------------------------------------------- >Comment By: Malcolm Box (mbox) Date: 2002-04-30 19:33 Message: Logged In: YES user_id=215386 The problem is in http_wash in Common.pm. This function is quite aggressive in cleaning "special" characters out of input values, to prevent security attacks. I haven't done a full security check to see whether this could be relaxed somewhat, but if you're not so concerned about security the easiest thing to do is to remove the call to http_wash: $HTTP->{'path_info'} = http_wash($ENV{'PATH_INFO'}); in the httpinit function in Common.pm. ---------------------------------------------------------------------- Comment By: Robbie Ye (robbieye) Date: 2002-04-28 14:32 Message: Logged In: YES user_id=507870 Hi, I have an error reported at the same file, same line number, i.e. Plain.pm line 104. The complete error message is like this: ** Fatal: Can't open /home/robbieye/indexed-src/GEANT4/4.0/source/digits hits/ at /home/robbieye/lxr-0.9.1//lib/LXR/Files/Plain.pm line 104. I am using LXR 0.9.1 to cross reference Geant4 4.0 package. Every directory in the source tree is cross referenced and browsable except for this particular one with a '+' in the directory name: "digits+hits". So apparently the perl scripts changed the '+' to ' ' and so the opendir() fails Now let me explain my story more precisely. So, most of the things work fine, except for the following case. When I browse the parent directory of "digits+hits", which is: http://localhost.localdomain:8080/lxr/GEANT4/source/source/ On the shown page, there is a link to the sub directory "digits+hits", the link is shown correctly as:http://localhost.localdomain:8080/lxr/GEANT4/source/source/digits%2Bhits/ Then when I clicked on this link, the returned URL in the browser's (i'm using Opera) address bar is: http://localhost.localdomain:8080/lxr/GEANT4/source/source/digits%2Bhits/ So this is still correct. But the return page itself contains the error message: ** Fatal: Can't open /home/robbieye/indexed-src/GEANT4/4.0/source/digits hits/ at /home/robbieye/lxr-0.9.1//lib/LXR/Files/Plain.pm line 104. Also, the directory title in the page is showed as "GEANT4/ source/ digits hits/", so the '+' is substituted by a blank space somehow. And when I move my browser to the "digits hits" portion of this erroroneous link, it reads: http://localhost.localdomain:8080/lxr/GEANT4/source/source/digits%20hits/, so the "%2B" is changed to "%20" in the address. I knew little about Perl to fix the problem myself, can someone out there help me with this? Thank you very much, I'd be more than happy to verify your solutions! Actually i tried to look into the Perl scripts, and I stop at the function http_wash in file /lib/LXR/Common.pm and comment out the line: "$t =~ s/\+/ /g;", but the error is still there(i didn't restart my browser though). Robbie <rob...@cc...> ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=390117&aid=536369&group_id=27350 |