moby/graph
Doug Davis d942c59b69 Wrap strings that could look like ints in quotes
When we use the engine/env object we can run into a situation where
a string is passed in as the value but later on when we json serialize
the name/value pairs, because the string is made up of just numbers
it appears as an integer and not a string - meaning no quotes.  This
can cause parsing issues for clients.

I tried to find all spots where we call env.Set() and the type of the
name being set might end up having a value that could look like an int
(like author). In those cases I switched it to use env.SetJson() instead
because that will wrap it in quotes.

One interesting thing to note about the testcase that I modified is that
the escaped quotes should have been there all along and we were incorrectly
letting it thru. If you look at the metadata stored for that resource you
can see the quotes were escaped and we lost them during the serialization
steps because of the env.Set() stuff.  The use of env is probably not the
best way to do all of this.

Closes: #9602

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-12-15 05:10:49 -08:00
..
export.go fix missing layers when exporting a full repository 2014-11-14 14:41:35 +01:00
graph.go Remove jsonData argument from image.StoreImage 2014-11-03 17:39:21 -08:00
history.go Wrap strings that could look like ints in quotes 2014-12-15 05:10:49 -08:00
import.go Add import/pull events to the stream 2014-11-06 12:12:41 -08:00
list.go Wrap strings that could look like ints in quotes 2014-12-15 05:10:49 -08:00
load.go validate image ID properly & before load 2014-12-11 16:29:27 -05:00
load_unsupported.go graph/load: add build tags to fix make cross 2014-11-25 02:06:45 +02:00
MAINTAINERS Add maintainers to daemon/ and graph/ 2014-08-06 10:29:15 +00:00
pools_test.go don't call reexec.Init from chrootarchive 2014-11-25 01:03:40 +02:00
pull.go registry: refactor registry.IsSecure calls into registry.NewEndpoint 2014-11-12 20:34:03 -06:00
push.go registry: refactor registry.IsSecure calls into registry.NewEndpoint 2014-11-12 20:34:03 -06:00
service.go Wrap strings that could look like ints in quotes 2014-12-15 05:10:49 -08:00
tag.go Move "image_tag" and "tag" to graph/tag.go 2014-08-06 17:18:51 -04:00
tags.go Refactor IsSecure change 2014-10-30 19:41:55 -04:00
tags_unit_test.go validate image ID properly & before load 2014-12-11 16:29:27 -05:00
viz.go Move "viz" to graph/viz.go 2014-08-06 17:18:50 -04:00