1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00
webvirtcloud/vrtManager
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
..
__init__.py Initial commit 2015-02-27 10:53:51 +02:00
connection.py network interface model selection added for new instance and new interface 2023-08-16 09:13:11 +03:00
create.py network interface model selection added for new instance and new interface 2023-08-16 09:13:11 +03:00
hostdetails.py fix cpu_usage waiting for instance creation. 2023-05-18 14:35:19 +03:00
instance.py fix(instances): restrict disk views to superusers and validate disk input 2026-10-02 17:11:12 +03:00
interface.py reorg imports and black format 2022-11-02 16:05:41 +03:00
network.py feat(security): harden storage uploads and vrtManager snapshot XML handling 2026-09-27 13:28:17 +03:00
nwfilters.py format python code with black 2022-11-02 08:54:35 +03:00
rwlock.py fix(vrtManager): modernize rwlock for Python 3.12 compatibility and add tests 2026-09-24 21:49:52 +03:00
storage.py Detect RDB pools too 2025-03-14 10:31:40 +01:00
test_network_ip.py test: expand unit test coverage across admin, accounts, vrtManager, logs, appsettings, and datasource 2026-09-25 11:26:53 +03:00
test_rwlock.py fix(vrtManager): modernize rwlock for Python 3.12 compatibility and add tests 2026-09-24 21:49:52 +03:00
test_util.py test: expand unit test coverage across admin, accounts, vrtManager, logs, appsettings, and datasource 2026-09-25 11:26:53 +03:00
test_xml_safety.py fix(instances): restrict disk views to superusers and validate disk input 2026-10-02 17:11:12 +03:00
util.py Get MAC OUI from settings.py 2023-10-18 17:34:40 -04:00
virtsecrets.py Django 3.2.4 LTS upgrade 2021-06-15 13:28:47 +03:00