libkeepass 0.2.0
KeePass key database importer/exporter library
Loading...
Searching...
No Matches
keepass::detail::ResourceLimits Struct Reference

Configurable resource budgets for database import and XML parsing. More...

#include <limits.hh>

Public Attributes

uint64_t max_total_bytes = (1ULL << 32)
 
uint64_t max_block_count = 100000
 
uint32_t max_block_size = 1024 * 1024
 
uint32_t max_xml_depth = 128
 
uint32_t max_groups = 100000
 
uint32_t max_entries = 100000
 
uint32_t max_history_items = 10000
 
uint64_t max_string_field_bytes = 16ULL * 1024 * 1024
 
uint64_t max_binary_bytes = 128ULL * 1024 * 1024
 

Detailed Description

Configurable resource budgets for database import and XML parsing.

All limits are upper bounds; a value of zero disables nothing (any payload still counts) but is a valid explicit budget. The defaults are chosen so that genuine databases are unaffected while zip bombs and hostile XML documents are rejected early.

Member Data Documentation

◆ max_binary_bytes

uint64_t keepass::detail::ResourceLimits::max_binary_bytes = 128ULL * 1024 * 1024

Max bytes of a single binary attachment or custom icon.

◆ max_block_count

uint64_t keepass::detail::ResourceLimits::max_block_count = 100000

Max number of non-empty hashed/HMAC data blocks.

◆ max_block_size

uint32_t keepass::detail::ResourceLimits::max_block_size = 1024 * 1024

Max declared payload size of a single hashed/HMAC block.

◆ max_entries

uint32_t keepass::detail::ResourceLimits::max_entries = 100000

Max number of entries (including history entries) in the XML document.

◆ max_groups

uint32_t keepass::detail::ResourceLimits::max_groups = 100000

Max number of groups in the XML document.

◆ max_history_items

uint32_t keepass::detail::ResourceLimits::max_history_items = 10000

Max number of entry history items in the XML document.

◆ max_string_field_bytes

uint64_t keepass::detail::ResourceLimits::max_string_field_bytes = 16ULL * 1024 * 1024

Max bytes of a single string field value (empty strings are free).

◆ max_total_bytes

uint64_t keepass::detail::ResourceLimits::max_total_bytes = (1ULL << 32)

Max total bytes produced by gzip inflation and hashed/HMAC blocks.

◆ max_xml_depth

uint32_t keepass::detail::ResourceLimits::max_xml_depth = 128

Max XML group nesting depth (the root group has depth 0).


The documentation for this struct was generated from the following file: