Opened 8 years ago
Last modified 4 years ago
#17059 assigned defect
Path resolving in dojox/json/ref is incorrect
Reported by: | adros | Owned by: | dylan |
---|---|---|---|
Priority: | undecided | Milestone: | 1.15 |
Component: | Dojox | Version: | 1.9.0b2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Path resolving in dojox/json/ref module is realized using this regex
var pathResolveRegex = /^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/ (prefix + id).replace(pathResolveRegex,'$2$3');
It can handle resolving of situation where ID starts with one pair of 'dots'. E.g. "/a/b/c/../d" is corretly resolved as "/a/b/d". (Let assume that prefix is "/a/b/c/".)
But if ID starts with more pairs of "dots", the path is resolved incorrectly, e.g. "/a/b/c/../../d" is resolved as "/a/b/../d".
Also IDs starting with single dot are not handled correctly, e.g. "/a/b/c/./d" is resolved as "/a/b/c/./d".
Change History (3)
comment:1 Changed 8 years ago by
Owner: | changed from Adam Peller to Kris Zyp |
---|---|
Status: | new → assigned |
comment:2 Changed 5 years ago by
Milestone: | tbd → 1.12 |
---|---|
Owner: | changed from Kris Zyp to dylan |
comment:3 Changed 4 years ago by
Milestone: | 1.13 → 1.15 |
---|
Note: See
TracTickets for help on using
tickets.
Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.