cujojs / jiff

JSON Patch and diff based on rfc6902
Other
627 stars 41 forks source link

Validate array indices before calling parseInt #5

Closed briancavalier closed 10 years ago

briancavalier commented 10 years ago

See json-patch/json-patch-tests#5 and here in the JSON Pointer RFC. Numeric array indexes have a much tighter format than lenient parseInt allows. We may need to check via regex before parsing.