Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.1.4
-
Fix Version/s: 6.1.7
-
Component/s: None
-
Labels:None
-
Environment:Linux
-
Number of attachments :
Description
The following request works fine:
wget http://localhost:8080/test/favicon.ico
While the following request fails (note the double slashes in the url):
wget http://localhost:8080/test//favicon.ico
On Tomcat both requests are handled ok.
Activity
Greg Wilkins
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 6.1.5rc0 [ 13601 ] | |
| Resolution | Fixed [ 1 ] |
Greg Wilkins
made changes -
| Attachment | CompactHandler.java [ 31424 ] |
Greg Wilkins
made changes -
| Attachment | JETTY-386-6.1.5.jar [ 31425 ] |
Greg Wilkins
made changes -
| Fix Version/s | 6.1.7 [ 13950 ] | |
| Fix Version/s | 6.1.5rc0 [ 13601 ] |
According to RFC2396:
path_segments = segment *( "/" segment )
so // is significant in a URI
So your URI has three segments:
"test"
""
"favicon.ico"
Now it turns out that the implementation of FileURL Handler interprests
"" segments as ".". But I can't see anywhere that is mandated.
Jetty has a very strict policy on file aliases, because they can be used to pass security constraints.
Eg. on VMS you can try hit /snoop.jsp;4 and the ;4 passes anything mapped to *.jsp. But for a VMS file
system ;4 is a version number, so you will get the source code of the JSP!
Thus by default, Jetty does not accept any file requests for aliases files - because who knows what strange
file system it will be run on.
Is it possible to get this test changed.... it looks to be a bug in the test to me.