5
0
mirror of git://git.proxmox.com/git/pxar.git synced 2025-03-11 20:58:47 +03:00
Christian Ebner c13df75243 accessor: adapt and restrict contents access
Add checks for split variant inputs when accessing the payload
contents via the accessor instance. Both cases, accessing via the
safe `contents` method and via the previousely unsafe
`open_contents_at_range` call are covered.

Reduce possible misuse by wrapping the current plain content range
into an opaque `ContentRange` type with an additional optional
payload reference field to check consistency between the payload
reference encoded in the metadata archive and the payload header'
found in the payload data archive.

Because of the additional type wrapping and the payload header check,
the `open_contents_at_range` is considered safe now, dropping the
previously unsafe implementation.
The corresponding interfaces have been adapted accordingly.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2024-06-13 09:24:35 +02:00
2024-06-10 13:45:23 +02:00
2020-03-05 10:46:18 +01:00
2024-06-10 13:36:27 +02:00
2022-10-27 15:31:33 +02:00
2020-02-18 14:08:02 +01:00
2020-06-26 08:59:03 +02:00
Description
No description provided
388 KiB
Languages
Rust 99.4%
Makefile 0.6%