Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.5, JRuby 1.7.0.pre1
-
Fix Version/s: JRuby 1.6.6, JRuby 1.7.0.pre1
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:OS X 10.7.2
-
Number of attachments :
Description
It all boils down to org.jruby.runtime.load.LoadService#expandRelativeJarPath using File#getCanonicalPath to expand the JAR entry path. A quick fix is to change expandRelativeJarPath like this:
private String expandRelativeJarPath(String path) {
return path.replaceAll("/[^/]+/\\.\\.|[^/]+/\\.\\./|\\./","").replace("^\\\\","/");
}
This passes all existing tests and fixes the problem. I can add a test and submit a patch if desired.
Activity
Uwe Kubosch
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Attachment | 0001-JRUBY-6172-Avoid-using-getCanonicalPath-to-expand-JA.patch [ 57536 ] |
Uwe Kubosch
made changes -
| Attachment |
0001- |
Uwe Kubosch
made changes -
| Attachment | 0001-JRUBY-6172-Avoid-using-getCanonicalPath-to-expand-JA.patch [ 57541 ] |
Hiro Asari
made changes -
| Assignee | Hiro Asari [ asari ] |
Uwe Kubosch
made changes -
| Attachment | 0001-JRUBY-6172-Test.patch [ 57572 ] |
Uwe Kubosch
made changes -
| Attachment |
0001- |
Uwe Kubosch
made changes -
| Attachment | 0001-JRUBY-6172-Test.patch [ 57585 ] |
Hiro Asari
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
Uwe Kubosch
made changes -
| Resolution | Fixed [ 1 ] | |
| Status | Resolved [ 5 ] | Reopened [ 4 ] |
Hiro Asari
made changes -
| Status | Reopened [ 4 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
Charles Oliver Nutter
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |