]> git.eshelyaron.com Git - emacs.git/commit
Treat control characters in JSON strings as invalid
authorMark Oteiza <mvoteiza@udel.edu>
Fri, 18 Aug 2017 00:00:52 +0000 (20:00 -0400)
committerMark Oteiza <mvoteiza@udel.edu>
Fri, 18 Aug 2017 00:00:52 +0000 (20:00 -0400)
commit87645443b5c6dffea928a19c50aded605a28279c
tree77aa4d12f627f56250df2913f9eb5f1090a28cc7
parent61631476d79cdb10272091251f3b84817fbc631a
Treat control characters in JSON strings as invalid

* lisp/json.el (json-peek): Reduce to following-char.
(json-pop, json-read): Zero (null char) means end of file.
(json-read-escaped-char): Delimit URL properly.
(json-read-string): Signal error for ASCII control characters.
* test/lisp/json-tests.el (test-json-peek): Check for zero instead of
:json-eof symbol.
(test-json-read-string): New test for control characters in JSON
strings.
lisp/json.el
test/lisp/json-tests.el