Inserting config from JSON skips validation

Bug #1983584 reported by Alexander Kilroy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Confirmed
High
Unassigned

Bug Description

Hi,

I noticed some strange behaviour when trying to retrieve my keys. I forgotten my JSON base doc had underscores and noticed it did in fact set them, consider this example:

```
CONFIG="$(cat <<EOF
{
  "key_with_underscores": null
}
EOF
)"

echo $CONFIG | xargs -d'\n' -I {} snapctl set toplevelkey={}

# If I go to retrieve this key, it is set with the underscores as:
`toplevelkey.key_with_underscores`
# And is therefor not retrievable
```

By setting JSON into snapd via snapctl, it circumvents the validation, allowing keys with underscores to be set but not retrieved.

Changed in snapd:
importance: Undecided → High
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.