Re: php scripts and tripple slashes
- From: "mijn naam" <whatever@xxxxxxxxxxxxxxx>
- Date: Mon, 29 Sep 2008 16:22:34 +0200
"Erwin Moller" <Since_humans_read_this_I_am_spammed_too_much@xxxxxxxxxxxxxxxx> schreef in bericht news:48e0d358$0$182$e4fe514c@xxxxxxxxxxxxxxxxx
mijn naam schreef:"Erwin Moller" <Since_humans_read_this_I_am_spammed_too_much@xxxxxxxxxxxxxxxx> schreef in bericht news:48e0cabf$0$185$e4fe514c@xxxxxxxxxxxxxxxxx
I bet you are using mod_rewrite for apache.
Have a look at the rewrite rules and conditions in your apache config.
Post it here if you are in doubt. Or better here: alt.apache.configuration
Thanks but no.
One machine is the provider's. I cannot look there.
The other one is my home box, this one doesn't do rewriting AFACT. Just to be sure: I placed RewriteLogLevel 2 and RewriteLog logs/rewrite in the config and that log stays empty.
Then I commented everything having to do with rewriting out, and restarted apache. Before and after the following happens on my machine:
_SERVER["REQUEST_URI"]=/debug/one/two///three/four
_SERVER["SCRIPT_NAME"]=/debug/one/two/debug.php
_SERVER["PHP_SELF"]=/debug/one/two/debug.php/one/two/three/four
Hi Stranger,
And what URL are you feeding excactly that gives the above result?
http://hostname/debug/one/two///three/four
in other words: http://{$_SERVER["SERVER_NAME"]}{$_SERVER["REQUEST_URI"]}
And secondly: What is it excactly you are trying to achieve?
Do you have an actual problem or is this just research?
I'm writing a script which is going to be used to find files in a directory structure. That script looks like a subdirectory in the normal tree.
E.g. http://servername/content/a/b/c/d will look at /home/user/private_html/a/b/c/d
While testing my script with various different problems ('never trust user input') I found the problem I'm trying to tackle.
I was using _SERVER["SCRIPT_NAME"] but obviously I run into trouble if I can't rely on its contents.
The only workaround I've found so far is to redirect(ereg_replace('///*','/',$_SERVER["REQUEST_URI"])) in case I find two slashes in a row in request_uri. Not a nice solution but it seems to do the job.
PS: Please 'mijn naam', use a (real) name, that makes conversations in here a bit more pleasant. ;-)
Just call me 'Mijn'. No problem.
.
- Follow-Ups:
- Re: php scripts and tripple slashes
- From: Erwin Moller
- Re: php scripts and tripple slashes
- References:
- php scripts and tripple slashes
- From: mijn naam
- Re: php scripts and tripple slashes
- From: Erwin Moller
- Re: php scripts and tripple slashes
- From: mijn naam
- Re: php scripts and tripple slashes
- From: Erwin Moller
- php scripts and tripple slashes
- Prev by Date: Re: html forms and spam-bots
- Next by Date: Re: html forms and spam-bots
- Previous by thread: Re: php scripts and tripple slashes
- Next by thread: Re: php scripts and tripple slashes
- Index(es):
Relevant Pages
|