PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > alt.apache.configuration > Passing a backspace as part of PATH_INFO
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.apache.configuration Apache web server configuration issues.

Passing a backspace as part of PATH_INFO

Réponse
 
LinkBack Outils de la discussion
Vieux 18/05/2007, 10h32   #1
Csaba Gabor
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Passing a backspace as part of PATH_INFO

OK, I am passing some convoluted urls back to apache and evidently
apache does not like by backspace. Is there anything that I can do to
have apache accept them?

The following works just fine:
http://mydomain.org/DE/d^|[^;:]{7}(;|:|$)/o:-DE;US;-US

but the following fails (the only difference is [^;:] goes to \w):
http://mydomain.org/DE/d^|\w{7}(;|:|$)/o:-DE;US;-US

In this case I get:
Not Found
The requested URL /DE/d^|\w{7}(;|:$)/o:-DE;US;-US was not found on
this server.

To me, the fact that it shows me the request as I gave it implies that
apache has some issue with that backspace character.

my rewrite log does not show the request being processed, error log
shows nothing. The access log shows:

127.0.0.1 127.0.0.1 - - [18/May/2007:11:16:45 +0200] - "GET /DE/d:
(%5E|%5Cw%7B7%7D(;|:$)/o:-DE;US;-US HTTP/1.1" /DE/d^|\\w{7}(;|:
$)/o:-DE;US;-US MyDomain.org mydomain.org 404 232 "-" "Mozilla/5.0
(Windows; U; Windows NT 5.1; en-US; rv:1.8.0.11) Gecko/20070312
Firefox/1.5.0.11" - "-"

Thanks,
Csaba Gabor from Vienna

  Réponse avec citation
Vieux 18/05/2007, 12h06   #2
HansH
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Passing a backspace as part of PATH_INFO

"Csaba Gabor" <danswer@gmail.com> schreef in bericht
news:1179480729.038170.84650@u30g2000hsc.googlegro ups.com...
> OK, I am passing some convoluted urls back to apache and evidently
> apache does not like by backspace. Is there anything that I can do to
> have apache accept them?
>
> The following works just fine:
> http://mydomain.org/DE/d^|[^;:]{7}(;|:|$)/o:-DE;US;-US
>
> but the following fails (the only difference is [^;:] goes to \w):
> http://mydomain.org/DE/d^|\w{7}(;|:|$)/o:-DE;US;-US
>

That's a back_slash_ not a back_space_.

Naming it correctly allows you to find a related directive:
http://httpd.apache.org/docs/2.2/mod...encodedslashes

HansH


  Réponse avec citation
Vieux 18/05/2007, 14h06   #3
Csaba Gabor
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Passing a backslash as part of PATH_INFO

On May 18, 1:06 pm, "HansH" <h...@invalid.invalid> wrote:
> "Csaba Gabor" <dans...@gmail.com> schreef in berichtnews:1179480729.038170.84650@u30g2000hsc.go oglegroups.com...> OK, I am passing some convoluted urls back to apache and evidently
> > apache does not like by backspace. Is there anything that I can do to
> > have apache accept them?

>
> > The following works just fine:
> >http://mydomain.org/DE/d^|[^;:]{7}(;|:|$)/o:-DE;US;-US

>
> > but the following fails (the only difference is [^;:] goes to \w):
> >http://mydomain.org/DE/d^|\w{7}(;|:|$)/o:-DE;US;-US

>
> That's a back_slash_ not a back_space_.
>
> Naming it correctly allows you to find a related directive:http://httpd.apache.org/docs/2.2/mod...encodedslashes
>
> HansH


Drat. You are correct about the title. Sorry about that.
Thanks for your response Hans - that was a very useful link, much
appreciated. Tried it right out.
Unfortunately, although apache accepts the backslash, it converts it
to a forward slash. Major bummer.

I have a solution to my original problem although I am not very happy
about it.
In apache's configuration file, httpd.conf, (or in my case: httpd-
vhosts.conf) under my virtual domain I put:
ErrorDocument 404 "/search.php"
Search.php is the page that would otherwise be handling the request.

In Search.php I added the third line (the first two were already
there):
$path_info = @$_SERVER['ORIG_PATH_INFO'];
if (!$path_info) $path_info = @$_SERVER['PATH_INFO'];
if (($ru=$_SERVER['REDIRECT_URL']) && !$path_info) $path_info = $ru;


And everything appears to be working again.

I found this approach at:
http://www.devarticles.com/c/a/Apach...ents-with-PHP/

Csaba Gabor from Vienna

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 00h42.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09247 seconds with 11 queries