Opened 9 years ago

Last modified 5 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:


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 9 years ago by Adam Peller

Owner: changed from Adam Peller to Kris Zyp
Status: newassigned

comment:2 Changed 6 years ago by dylan

Milestone: tbd1.12
Owner: changed from Kris Zyp to dylan

comment:3 Changed 5 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.