![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Data corresponding to excluded characters must be escaped in order to be properly represented within a URI. |
|
Special care should be taken when the URI path interpretation process involves the use of a back-end file system or related system functions. File systems typically assign an operational meaning to special characters, such as the "/", "\", ":", "[", and "]" |
|
Shouldn't backslash itself be included in the must-be-escaped list? |
#2
| |||
| |||
|
|
In http://lists.w3.org/Archives/Public/...5May/0004.html , I found a top-posted "answer" which is resolutely ignoring the bottom-quoted question - | > Shouldn't backslash itself be included in the must-be-escaped | list? Shouldn't it? |
|
It seems from my tests that IE6 makes no attempt to access the cited URL directly - it replaces the "\" by "/" before even trying |
#3
| |||
| |||
|
|
Alan J. Flavell inquired: In http://lists.w3.org/Archives/Public/...5May/0004.html , I found a top-posted "answer" which is resolutely ignoring the bottom-quoted question - | > Shouldn't backslash itself be included in the must-be-escaped | list? Shouldn't it? I think it should. I think it's rather obvious[1]; regardless of language, an escape character should always itself be escaped if it is to take its "normal" value in some expression. |
#4
| |||
| |||
|
|
The only substantive mention of "\" which I can find is in section 7.3 under the main heading of "7. Security Considerations": |Special care should be taken when the URI path interpretation process | involves the use of a back-end file system or related system | functions. File systems typically assign an operational meaning to | special characters, such as the "/", "\", ":", "[", and "]" Aside from this potential security exposure, it appears to me that the cited URL, which I would like to have categorised as defective, would be rated as OK by this latest RFC. And since the server returns the desired resource when this misbegotten URL is presented, I can't even rate it as a blunder - can I? Any suggestions why this apparently risky, and IMHO undesirable, change was smuggled into the RFC without mentioning it in the changes? |
#5
| |||
| |||
|
|
Jack wrote: - - I think it should. I think it's rather obvious[1]; regardless of language, an escape character should always itself be escaped if it is to take its "normal" value in some expression. How can you mean "regardless of language", given that which characters are escape characters depends entirely on what language is in use? |
#6
| ||||
| ||||
|
|
Alan J. Flavell wrote: The only substantive mention of "\" which I can find is in section 7.3 under the main heading of "7. Security Considerations": |Special care should be taken when the URI path interpretation process | involves the use of a back-end file system or related system | functions. File systems typically assign an operational meaning to | special characters, such as the "/", "\", ":", "[", and "]" [...] |
|
Any suggestions why this apparently risky, and IMHO undesirable, change was smuggled into the RFC without mentioning it in the changes? May I ask what the source of risk is? You mention that backslash being the path delimiter on a back-end file system, |
|
but that can't be the problem, since the forward slash is the path delimiter on other file systems, |
|
and the interpretation of the forward slash in URIs as a path delimiter doesn't create risk on that account. |
#7
| |||
| |||
|
|
Jack wrote: Alan J. Flavell inquired: In http://lists.w3.org/Archives/Public/...5May/0004.html , I found a top-posted "answer" which is resolutely ignoring the bottom-quoted question - | > Shouldn't backslash itself be included in the must-be-escaped | > list? Shouldn't it? I think it should. I think it's rather obvious[1]; regardless of language, an escape character should always itself be escaped if it is to take its "normal" value in some expression. How can you mean "regardless of language", given that which characters are escape characters depends entirely on what language is in use? |
#8
| |||
| |||
|
|
Alan J. Flavell In http://lists.w3.org/Archives/Public/...5May/0004.html , I found a top-posted "answer" which is resolutely ignoring the bottom-quoted question - | > Shouldn't backslash itself be included in the must-be-escaped | > list? Shouldn't it? I suppose you could say backslashes *are* included in the must-be-escaped list, if you recognise the list as implied. The explicit list seems to have been silently dropped: the word 'excluded' appears in RFC3986 only in unrelated contexts, and I can't find mention of this removal anywhere in the changeover notes: http://www.gbiv.com/protocols/uri/rev-2002/issues.html Anyway, backslashes still can't occur in URLs, since no production allows them. |
#9
| |||
| |||
|
|
Harlan Messinger wrote: Jack wrote: Alan J. Flavell inquired: In http://lists.w3.org/Archives/Public/...5May/0004.html , I found a top-posted "answer" which is resolutely ignoring the bottom-quoted question - | > Shouldn't backslash itself be included in the must-be-escaped | > list? Shouldn't it? I think it should. I think it's rather obvious[1]; regardless of language, an escape character should always itself be escaped if it is to take its "normal" value in some expression. How can you mean "regardless of language", given that which characters are escape characters depends entirely on what language is in use? Try this: "For any language x, that set of characters which are escape characters in x should themselvesd be escaped if they are to take their normal values in some expression." I thought that was obviously my meaning, and it seems to require some perverse gymnastics to get my original utterance to mean something different. |
#10
| |||
| |||
|
|
On Sat, 10 Jun 2006, Harlan Messinger wrote: Alan J. Flavell wrote: The only substantive mention of "\" which I can find is in section 7.3 under the main heading of "7. Security Considerations": |Special care should be taken when the URI path interpretation process | involves the use of a back-end file system or related system | functions. File systems typically assign an operational meaning to | special characters, such as the "/", "\", ":", "[", and "]" [...] Any suggestions why this apparently risky, and IMHO undesirable, change was smuggled into the RFC without mentioning it in the changes? May I ask what the source of risk is? You mention that backslash being the path delimiter on a back-end file system, Well, I might have done so, if I had thought about it; but in fairness it wasn't *my* mention, it was a quote from the RFC. :-} but that can't be the problem, since the forward slash is the path delimiter on other file systems, I don't agree. In principle, the "/" has a defined meaning in a URL (it's a hierarchy separator, if I can put it loosely), and anyone interpreting a URL is required to attribute that meaning to it - no matter what their local file system separator might be. Whereas "\" has no defined meaning in the structure of a URL, and could (given an insufficiently paranoid parser) possibly find its way into a filesystem reference. Which could have significant consequences on, say, Windows. and the interpretation of the forward slash in URIs as a path delimiter doesn't create risk on that account. Because the URL "/" (the one that functions as a URL hierarchy separator) never gets that far. By then it would have been turned into the filesystem hiararchy separator, whatever that might be. Yes, it might sometimes be "/", but don't let that fool you. It might just as well been turned into ":" for a different filesystem, or into a hierarchical database query or whatever, in the general case. |
![]() |
| Thread Tools | |
| Display Modes | |
| |