Verify on resolute: PASS
========================
1. Confirm dotted invalid names are already rejected (old and new
snapd):
```
sudo snap set lxd x.Y=z
error: cannot perform the following tasks:
- Run configure hook of "lxd" snap (invalid option name: "Y")
```
2. Reproduce on unfixed snapd (2.76.3+ubuntu26.04). The deb was kept in
front of the seeded snapd snap with SNAP_REEXEC=0:
```
snap version --verbose
snap 2.76.3
snapd 2.76.3
series 16
ubuntu 26.04
kernel 7.0.0-34-generic
architecture amd64
snapd-bin-from native-package
snap-bin-from native-package
sudo snap set lxd -t 'x={"Y": "z"}'
snap warnings
No further warnings.
sudo snap get lxd -d
{
"x": {
"Y": "z"
}
}
```
3. Nested and list cases warn on 2.77.1+ubuntu26.04.2 from resolute-
proposed. lxd 5.21 is not core26, so the set is kept and snapd warns.
Fresh field names were used so the warnings were not suppressed by an
earlier acknowledgement:
```
snap version --verbose
snap 2.77.1+ubuntu26.04.2
snapd 2.77.1+ubuntu26.04.2
series 16
ubuntu 26.04
kernel 7.0.0-34-generic
architecture amd64
snapd-bin-from native-package
snap-bin-from native-package
sudo snap set lxd -t 'fresh={"Q": 1}'
WARNING: There is 1 new warning. See 'snap warnings'.
sudo snap set lxd -t 'nest={"good":{"Nope":1}}'
WARNING: There are 2 new warnings. See 'snap warnings'.
sudo snap set lxd -t 'items=[{"Zz":1}]'
WARNING: There are 3 new warnings. See 'snap warnings'.
snap warnings
warning: |
Option value has invalid field name "Q". For core26+ snaps, fields must be
dash separated lowercase alphanumerics.
---
warning: |
Option value has invalid field name "Nope". For core26+ snaps, fields must be
dash separated lowercase alphanumerics.
---
warning: |
Option value has invalid field name "Zz". For core26+ snaps, fields must be
dash separated lowercase alphanumerics.
```
4. Valid JSON keys still work:
```
sudo snap set lxd -t 'fresh={"q": 1}'
sudo snap get lxd fresh
{
"q": 1
}
sudo snap set lxd plain=ok
sudo snap get lxd plain
ok
```
** Tags removed: verification-needed-jammy verification-needed-noble
verification-needed-resolute
** Tags added: verification-done-jammy verification-done-noble
verification-done-resolute
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2072331
Title:
dash-case-subset config on snap set not being validated when passing
JSON
To manage notifications about this bug go to:
https://bugs.launchpad.net/snapd/+bug/2072331/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs