Inserting config from JSON skips validation
Bug #1983584 reported by
Alexander Kilroy
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_
}
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.
# 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.