Commit dbf821c
admin: validate feature name in vm_feature_remove
Feature name validation was missing in vm_feature_remove while
vm_feature_set already validated it, causing inconsistent behavior
between dom0 and management qube.
Add shared _validate_feature_name() function to avoid future
discrepancies. Use ProtocolError consistent with PR #751.
Also validate arg in AbstractQubesAPI.__init__() consistent with
sanitize_name() in qrexec-daemon.c.
Fixes: QubesOS/qubes-issues#7186
Related: #7511 parent 53ca30f commit dbf821c
3 files changed
Lines changed: 41 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
169 | 173 | | |
170 | 174 | | |
171 | 175 | | |
| |||
232 | 236 | | |
233 | 237 | | |
234 | 238 | | |
235 | | - | |
| 239 | + | |
236 | 240 | | |
237 | 241 | | |
238 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
103 | 115 | | |
104 | 116 | | |
105 | 117 | | |
| |||
1162 | 1174 | | |
1163 | 1175 | | |
1164 | 1176 | | |
1165 | | - | |
1166 | | - | |
| 1177 | + | |
1167 | 1178 | | |
1168 | 1179 | | |
1169 | 1180 | | |
| |||
1175 | 1186 | | |
1176 | 1187 | | |
1177 | 1188 | | |
1178 | | - | |
1179 | | - | |
1180 | | - | |
1181 | | - | |
| 1189 | + | |
1182 | 1190 | | |
1183 | 1191 | | |
1184 | 1192 | | |
| |||
2021 | 2029 | | |
2022 | 2030 | | |
2023 | 2031 | | |
2024 | | - | |
| 2032 | + | |
2025 | 2033 | | |
2026 | 2034 | | |
2027 | 2035 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1694 | 1694 | | |
1695 | 1695 | | |
1696 | 1696 | | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
1697 | 1718 | | |
1698 | 1719 | | |
1699 | 1720 | | |
| |||
0 commit comments