diff options
author | Colin Walters <walters@verbum.org> | 2018-09-30 20:10:14 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-10-01 13:23:50 +0000 |
commit | 2c55bc699778a69c77d66b4448a9dfa284764057 (patch) | |
tree | dcdbc01b7e1797888a2a46beaab04e1f8dbc8abe /src/libostree/ostree-core.h | |
parent | 5cada0f051403255059e6eeeb27665f87311a4e5 (diff) | |
download | ostree-2c55bc699778a69c77d66b4448a9dfa284764057.tar.gz |
Only verify OSTREE_MAX_METADATA_SIZE for HTTP fetches
There are use cases for libostree as a local content store
for content derived or delivered via other mechanisms (e.g. OCI
images, RPMs, etc.). rpm-ostree today imports RPMs into OSTree
branches, and puts the RPM header value as commit metadata.
Some of these can be quite large because the header includes
permissions for each file. Similarly, some OCI metadata is large.
Since there's no security issues with this, support committing
such content.
We still by default limit the size of metadata fetches, although
for good measure we make this configurable too via a new
`max-metadata-size` value.
Closes: https://github.com/ostreedev/ostree/issues/1721
Closes: #1744
Approved by: jlebon
Diffstat (limited to 'src/libostree/ostree-core.h')
-rw-r--r-- | src/libostree/ostree-core.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libostree/ostree-core.h b/src/libostree/ostree-core.h index 08b7d451..69477a75 100644 --- a/src/libostree/ostree-core.h +++ b/src/libostree/ostree-core.h @@ -31,18 +31,18 @@ G_BEGIN_DECLS /** * OSTREE_MAX_METADATA_SIZE: - * - * Maximum permitted size in bytes of metadata objects. This is an - * arbitrary number, but really, no one should be putting humongous - * data in metadata. + * + * Default limit for maximum permitted size in bytes of metadata objects fetched + * over HTTP (including repo/config files, refs, and commit/dirtree/dirmeta + * objects). This is an arbitrary number intended to mitigate disk space + * exhaustion attacks. */ #define OSTREE_MAX_METADATA_SIZE (10 * 1024 * 1024) /** * OSTREE_MAX_METADATA_WARN_SIZE: - * - * Objects committed above this size will be allowed, but a warning - * will be emitted. + * + * This variable is no longer meaningful, it is kept only for compatibility. */ #define OSTREE_MAX_METADATA_WARN_SIZE (7 * 1024 * 1024) |