Google Groups Home
Help | Sign in
IIS rewrites my URL's
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Peter Fastré  
View profile  
 More options Mar 11 2005, 8:12 am
Newsgroups: microsoft.public.inetserver.iis
From: Peter Fastré <peter.fas...@belgacom.be>
Date: Fri, 11 Mar 2005 13:12:13 GMT
Local: Fri, Mar 11 2005 8:12 am
Subject: IIS rewrites my URL's
Hello

I have a Windows 2003 Server with IIS. I make a virtual directory with
the name tp_static, and try the following URL:
http://srv003/tp_static

It works, but IIS encodes it to
http://srv003/tp%5Fstatic/

This way, I run into problems using cookies & paths, and besides that,
it looks very ugly. No other webserver (Apache, IIS<6, ...) does this.

Why is this, and is it possible to disable this stupid behaviour?

Regards

Peter


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Egbert Nierop (MVP for IIS)  
View profile  
 More options Mar 11 2005, 10:16 am
Newsgroups: microsoft.public.inetserver.iis
From: "Egbert Nierop \(MVP for IIS\)" <egbert_nie...@nospam.invalid>
Date: Fri, 11 Mar 2005 16:16:40 +0100
Local: Fri, Mar 11 2005 10:16 am
Subject: Re: IIS rewrites my URL's

"Peter Fastré" <peter.fas...@belgacom.be> wrote in message

news:NOgYd.35160$Fb7.3078265@phobos.telenet-ops.be...
> Hello

> I have a Windows 2003 Server with IIS. I make a virtual directory with
> the name tp_static, and try the following URL:
> http://srv003/tp_static

> It works, but IIS encodes it to
> http://srv003/tp%5Fstatic/

> This way, I run into problems using cookies & paths, and besides that,
> it looks very ugly. No other webserver (Apache, IIS<6, ...) does this.

This is not IIS but IE that does this.

> Why is this, and is it possible to disable this stupid behaviour?

This is not stupid. A space is a reserved character and should be encoded.
However, not IIS does this but IE.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kristofer Gafvert  
View profile  
 More options Mar 11 2005, 4:17 pm
Newsgroups: microsoft.public.inetserver.iis
From: "Kristofer Gafvert" <kgafv...@NEWSilopia.com>
Date: Fri, 11 Mar 2005 13:17:58 -0800
Local: Fri, Mar 11 2005 4:17 pm
Subject: Re: IIS rewrites my URL's
Hi Peter,

No, it is not possible to disable this behavior.

IIS is encoding characters in a redirect, to prevent cross site scripting.
I cannot tell why IIS encodes the underscore character (or the hyphen
character for that matter), because i cannot see any issues with that. I
can assume that the developers of IIS was looking at RFC 1738, which says
(section 2.2):

"On the other hand, characters that are not required to be encoded
(including alphanumerics) may be encoded within the scheme-specific part
of a URL, as long as they are not being used for a reserved purpose."

The developers are following this, and maybe they wanted to be on the
secure side, and encode the character.

I do not know what problems with cookies or paths you are referencing to,
but cookies are for sure not handled by IIS. Paths, maybe, depends on what
it is.

_ and %5F should be treated equally. IIS handles this, but for cookies, it
can be a problem with the client (the webbrowser), or ASP/something else,
depending on the problem, and if you are using ASP or some other scripting
technique.

In RFC 3986 (which updates RFC 1738, but was released 2005, so the IIS
developers could impossible follow it when developing IIS) the underscore
character should not be encoded.

I discussed this "problem" with Olaf Lüder, another MVP, and he wrote an
ISAPI filter to work-around this. If it fixes the cookies problem as well,
i have no idea. This is available here:

http://nogetec.de/files/courtesyredirect.zip

If you find this to be major problem, and nobody else responds with a
better explanation, you could contact Microsoft Support. It does however
not seem to be a bug in IIS, because the behavior seems to be intentional.

--
Regards,
Kristofer Gafvert
www.gafvert.info - My Articles and help
www.ilopia.com

Peter Fastré wrote:
> Hello

> I have a Windows 2003 Server with IIS. I make a virtual directory with

the name tp_static, and try the following url:
> http://srv003/tp_static

> It works, but IIS encodes it to
> http://srv003/tp%5Fstatic/

> This way, I run into problems using cookies & paths, and besides that,

it looks very ugly. No other webserver (Apache, IIS<6, ...) does this.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Cesta  
View profile  
 More options Mar 12 2005, 7:53 pm
Newsgroups: microsoft.public.inetserver.iis
From: John Cesta <li...@lookwww.com>
Date: Sun, 13 Mar 2005 00:53:28 GMT
Local: Sat, Mar 12 2005 7:53 pm
Subject: Re: IIS rewrites my URL's
On Fri, 11 Mar 2005 13:12:13 GMT, Peter Fastré

<peter.fas...@belgacom.be> wrote:
>Hello

>I have a Windows 2003 Server with IIS. I make a virtual directory with
>the name tp_static, and try the following URL:
>http://srv003/tp_static

>It works, but IIS encodes it to
>http://srv003/tp%5Fstatic/

It's called an encoded underscore. No web server does it. IE does it.
Really, do you think that IIS would produce such "stupid" behavior?

John Cesta

The CPU Checker - Monitors your CPU % while you sleep
LogFileManager - IIS LogFile Management Tool
WebPageChecker - Helps Maintain Server UpTime
DomainReportIt PRO - Helps Rebuild IIS
http://www.serverautomationtools.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Wang [Msft]  
View profile  
(1 user)  More options Mar 13 2005, 3:21 am
Newsgroups: microsoft.public.inetserver.iis
From: "David Wang [Msft]" <some...@online.microsoft.com>
Date: Sun, 13 Mar 2005 00:21:03 -0800
Local: Sun, Mar 13 2005 3:21 am
Subject: Re: IIS rewrites my URL's
As Kristopher pointed out, the reason for the encoding is for security
against cross-site scripting attacks. Despite the fact that XSS attacks are
fundamentally a client-side problem due to bad application code on the
server, people wanted a server-side heavy-hammer solution, and here it is.

Regarding your problems with cookies, paths, etc -- it simply points out
that your code contains potential canonicalization flaws in that it treats
the same URL as potentially different. Basically, it is the reverse of the
XSS attack but from the server to the client.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//

"Peter Fastré" <peter.fas...@belgacom.be> wrote in message

news:NOgYd.35160$Fb7.3078265@phobos.telenet-ops.be...
Hello

I have a Windows 2003 Server with IIS. I make a virtual directory with
the name tp_static, and try the following URL:
http://srv003/tp_static

It works, but IIS encodes it to
http://srv003/tp%5Fstatic/

This way, I run into problems using cookies & paths, and besides that,
it looks very ugly. No other webserver (Apache, IIS<6, ...) does this.

Why is this, and is it possible to disable this stupid behaviour?

Regards

Peter


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kristofer Gafvert  
View profile  
 More options Mar 13 2005, 5:44 am
Newsgroups: microsoft.public.inetserver.iis
From: "Kristofer Gafvert" <kgafv...@NEWSilopia.com>
Date: Sun, 13 Mar 2005 02:44:07 -0800
Local: Sun, Mar 13 2005 5:44 am
Subject: Re: IIS rewrites my URL's
David,

Is there any potential risk in _not_ encoding the underscore character? I
personally cannot understand why the underscore character is encoded.

--
Regards,
Kristofer Gafvert
www.gafvert.info - My Articles and help
www.ilopia.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google