1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00
webvirtcloud/instances
catborise 8a3ee13b41 fix(instances): restrict disk views to superusers and validate disk input
Disk and media mutation views (add_new_vol, add_existing_vol, edit_volume,
delete_vol, detach_vol, add_cdrom, detach_cdrom, mount_iso, unmount_iso)
were reachable by any owner with is_change, although the UI only shows the
Disk tab to superusers. An ordinary user could delete any volume on the
compute or attach arbitrary host files to their VM.

- Require superuser for all disk/media views, matching the UI.
- delete_vol resolves the volume from the VM's own disk XML by dev and
  ignores the posted storage/name.
- Validate bus/cache/io/discard/detect_zeroes against the hypervisor's
  lists, and format/serial/volume name against strict patterns.
- add_existing_vol only accepts volumes that exist in the selected pool.
- edit_volume only accepts a dev attached to the VM.
- vrtManager: escape all values interpolated into disk XML and pass dev
  as an XPath variable in detach_disk/edit_disk.
2026-10-02 17:11:12 +03:00
..
api fix(reconciliation): serialize compute sync and enforce UUID identity 2026-09-28 14:55:49 +03:00
fixtures Instances overhaul 2020-07-13 15:33:09 +06:00
migrations fix(reconciliation): serialize compute sync and enforce UUID identity 2026-09-28 14:55:49 +03:00
templates fix(instances): guard mutations and refresh lists after sync 2026-09-28 14:56:19 +03:00
templatetags lint with black python. convert f style strings to old one. some small fixes 2020-11-05 12:34:31 +03:00
__init__.py Fixe migrations for new deployments 2020-05-28 18:19:25 +06:00
apps.py format python code with black 2022-11-02 08:54:35 +03:00
forms.py Corrected untranslated items 2023-12-13 14:00:02 +08:00
models.py fix(reconciliation): serialize compute sync and enforce UUID identity 2026-09-28 14:55:49 +03:00
test_create_instance.py fix(instances): guard mutations and refresh lists after sync 2026-09-28 14:56:19 +03:00
test_disk_isolation.py fix(instances): restrict disk views to superusers and validate disk input 2026-10-02 17:11:12 +03:00
test_index.py fix(instances): guard mutations and refresh lists after sync 2026-09-28 14:56:19 +03:00
test_root_pass.py fix(instances): guard mutations and refresh lists after sync 2026-09-28 14:56:19 +03:00
test_security_mutations.py fix(instances): restrict disk views to superusers and validate disk input 2026-10-02 17:11:12 +03:00
tests.py fix(instances): guard mutations and refresh lists after sync 2026-09-28 14:56:19 +03:00
urls.py external snapshot implementation 2023-04-13 12:25:42 +03:00
utils.py fix(reconciliation): serialize compute sync and enforce UUID identity 2026-09-28 14:55:49 +03:00
views.py fix(instances): restrict disk views to superusers and validate disk input 2026-10-02 17:11:12 +03:00