Tycho Andersen
ef0b2e00ce
Merge pull request #3496 from stgraber/main
...
Add core.https_allowed_websocket_origin
2026-06-14 10:57:30 -06:00
Stéphane Graber
267891c544
shared/ws: Validate websocket origin against trusted origins
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-13 23:43:35 -04:00
augustodsgv
f2dab164b6
incus/keepalive: Fix comment typo
...
Signed-off-by: augustodsgv <augustodsgv@gmail.com>
2026-06-13 23:02:35 -04:00
Stéphane Graber
6728a1eafc
global: Update for go-yaml/v4 rc5
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-10 22:26:22 -04:00
Stéphane Graber
f830526711
shared/cliconfig: Remove duplicate file closing
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-10 11:25:56 -04:00
Stéphane Graber
191206b420
shared/util: Log deferred errors with WarnOnError
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-06 19:15:14 -04:00
Stéphane Graber
b002734cb6
shared/simplestreams: Log deferred errors with WarnOnError
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-06 19:15:13 -04:00
Stéphane Graber
3675d12eba
shared/subprocess: Log deferred errors with WarnOnError
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-06 19:15:12 -04:00
Stéphane Graber
e00a8f5745
shared/archive: Log deferred errors with WarnOnError
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-06 19:15:11 -04:00
Stéphane Graber
6e887997ff
shared/cliconfig: Log deferred errors with WarnOnError
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-06 19:15:10 -04:00
Stéphane Graber
583b48422a
shared/idmap: Log deferred errors with WarnOnError
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-06 19:15:09 -04:00
Stéphane Graber
16b4399772
shared/resources/usbid: Log deferred errors with WarnOnError
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-06 19:15:08 -04:00
Stéphane Graber
3fbc20137a
shared/resources: Log deferred errors with WarnOnError
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-06 19:15:07 -04:00
Stéphane Graber
1bc4d3feb8
shared/logger: Add WarnOnError helper
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-06 19:14:33 -04:00
Stéphane Graber
3732e84290
shared/api: Add Server.Filtered()
...
This returns a filtered version of the struct where sensitive keys are
replaced with SENSITIVE and where some other noisy keys are removed or
summarized.
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-06 00:34:07 -04:00
Stéphane Graber
dc4f57c57d
global: Clean latest gofumpt
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-05 01:56:18 -04:00
Stéphane Graber
ba407ebf09
shared/api: Remove legacy logic
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-04 14:23:12 -04:00
Stéphane Graber
d59a96e45c
shared/tls: Detect Lego version/behavior based on help
...
The previous attempt at detecting Lego v5 wasn't successful as various
distribution and packages appear to be messing with reporting of the
version string...
Most notably the Debian lego package reports the version as "dev".
Some others report it based on git tag ("v4" prefix) while others report
the actual version ("4.x").
This is enough of a mess that we should instead just scan the help message.
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-31 10:10:08 -04:00
Stéphane Graber
ea9eeba6b7
shared/tls: Add support for Lego v5
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-31 08:37:19 -04:00
Stéphane Graber
094db782bf
shared/validate: Add CPU topology parsing helper
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-28 12:58:29 -04:00
Benjamin Somers
ae5b55a706
shared/api/url: Add URL fragment setter
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-05-28 10:07:02 +00:00
Benjamin Somers
eb79979573
incus: Keep track of last working remote
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-05-27 19:35:26 +00:00
Benjamin Somers
19ce43ffd4
incus/remote: Add support for multiple URLs
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-05-27 19:31:13 +00:00
Stéphane Graber
0be992c3de
Merge pull request #3404 from stgraber/rebuild
...
Implement storage volume rebuild
2026-05-27 14:54:01 -04:00
Stéphane Graber
75bcc0159a
shared/api: Drop no-op omitempty on nested struct fields
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-27 03:37:58 -04:00
Stéphane Graber
b7a3c767f8
global: Use strings.Cut instead of strings.Split/SplitN
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-27 03:37:55 -04:00
Stéphane Graber
a172b4ef43
shared/api: Add StorageVolumeRebuildPost
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-26 18:35:05 -04:00
Stéphane Graber
1d64af1e40
shared/simplestreams: Add combined_type
...
That key is used to indicate the type of a combined image as we can't
rely on the ftype of the root disk to detect it.
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-24 22:54:03 -04:00
Stéphane Graber
5b6b50b707
shared/archive: Improved ENOSPC detection
...
Closes #3303
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-22 11:12:52 -04:00
Stéphane Graber
d56e91ceda
shared/api: Fix swagger examples
...
This fixes a few inconsistencies/issues with the current examples.
Closes #3335
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-21 11:34:33 +02:00
Stéphane Graber
40dd4f151d
Rewrite Go import path to v7
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-02 01:18:25 +02:00
Stéphane Graber
a18b30213a
shared/api/scriptlet: Add InstancePlacementReasonRebalance
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-01 03:29:27 +02:00
Benjamin Somers
a14ec478be
shared/cliconfig: Drop legacy <remote> syntax
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-04-29 14:21:39 +00:00
Stéphane Graber
e8b2db4134
shared/idmap: Keep respecting INCUS_IDMAPPED_MOUNTS_DISABLE
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-04-28 23:51:57 +02:00
Stéphane Graber
ab0375fba6
incusd: Remove kernel feature detection
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-04-28 23:51:45 +02:00
Benjamin Somers
68db650ea6
incus: Wrap addition of native integer flags
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-04-28 02:36:42 +02:00
Benjamin Somers
1d26fd0ee5
incus: Wrap addition of boolean flags
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-04-28 02:36:41 +02:00
Benjamin Somers
17bdaeff59
incus: Wrap addition of integer flags
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-04-28 02:36:40 +02:00
Benjamin Somers
4bd27e7954
incus: Wrap addition of string array flags
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-04-28 02:36:39 +02:00
Benjamin Somers
802bd453f2
incus: Wrap addition of string flags
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-04-28 02:36:38 +02:00
Stéphane Graber
a05cb3bd0a
shared/validate: Fix name validation on single character
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-04-24 17:53:40 +02:00
Stéphane Graber
dc6833bbb7
shared/archive: Avoid concurrent calls to Wait
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-04-20 14:29:01 -04:00
Stéphane Graber
309a2e60b2
shared/util: Switch io.Copy to util.SafeCopy
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-04-18 15:42:35 -04:00
Stéphane Graber
efc0c11e16
shared/cliconfig: Switch io.Copy to util.SafeCopy
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-04-18 15:42:34 -04:00
Stéphane Graber
a08d2db1b5
shared/ws: Switch io.Copy to util.SafeCopy
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-04-18 15:42:33 -04:00
Stéphane Graber
9fb55bf99d
shared/util: Introduce SafeCopy
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-04-18 15:42:28 -04:00
Stéphane Graber
e57a32b762
shared/subprocess: Cleanup pointless check
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-04-17 21:02:28 -04:00
Stéphane Graber
42278bd2b5
shared/archive: Improve detection and error handling
...
Fuzzing by the 7asecurity team has discovered a few issues with our
handling of compressed images and backups.
This fixes 3 different issues:
- We weren't checking that 0 bytes at the trailing end of a header were
in fact 0 in the file itself (checking read length).
- In case of unpacker error, the client may hang reading from the
uncompressed pipe unless it implements its own timeout/context mechanism
calling the canceler.
- The signature of an uncompressed tarball is based on trailing bytes
and so should be checked after all of those using leading bytes.
No crashes would result from such bad input but some of the consumers of
those archive functions would be left hanging indefinitely, wasting a
few goroutines.
Reported-by: https://7asecurity.com
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-04-17 20:41:13 -04:00
Piotr Resztak
f4ad06efbe
shared/api: Add structs for managing dirty bitmaps
...
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
2026-04-13 01:12:10 -04:00
Stéphane Graber
2889445b3b
incusd/forksyscall: Handle mount arguments when using idmap
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-04-02 18:20:24 -04:00