inconsistent apps/key validation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
click-reviewers-tools (Ubuntu) |
Fix Released
|
High
|
Jamie Strandboge | ||
Xenial |
Fix Released
|
High
|
Jamie Strandboge | ||
snapd (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Xenial |
Fix Released
|
High
|
Unassigned | ||
ubuntu-core-launcher (Ubuntu) |
Fix Released
|
High
|
Jamie Strandboge | ||
Xenial |
Fix Released
|
High
|
Jamie Strandboge |
Bug Description
The following snap.yaml:
name: network-manager
...
apps:
NetworkManager:
...
results in the following:
Apr 15 14:09:02 localhost.
This is because verify_appname() in src/main.c does not allow upper case letters. This is easy enough to fix but then I noticed that:
1. docs/meta.md is silent on the issue of what is allowed for the keys in the apps dictionary (app names) of the snap.yaml
2. validate.go is not checking the contents of the key name in the apps dictionary
Looking at 15.04, I see this regex that applies to 'name': `^[A-Za-z0-9/. _#:-]*$` but this is too lenient for the app name for several reasons (so 15.04 was buggy). 16.04 uses this same regex for validating things in apps[key], but neglects to verify 'key' itself.
I suggest we:
1. update snapd to use "^[a-zA-
2. adjust docs/meta.md accordingly
3. adjust ubuntu-
Changed in snapd (Ubuntu): | |
status: | New → Confirmed |
Changed in ubuntu-core-launcher (Ubuntu): | |
status: | New → Confirmed |
Changed in snapd (Ubuntu): | |
importance: | Undecided → High |
Changed in ubuntu-core-launcher (Ubuntu): | |
importance: | Undecided → High |
Changed in click-reviewers-tools (Ubuntu): | |
status: | New → Fix Committed |
importance: | Undecided → High |
assignee: | nobody → Jamie Strandboge (jdstrand) |
Changed in snapd (Ubuntu Xenial): | |
assignee: | Michael Vogt (mvo) → nobody |
The review tools don't verify this name either. I'm adding a check now since it can be rolled out faster (and easily changed) since including '.' and '_' are delimiters in various parts of the system.