diff --git a/repertory/librepertory/include/types/repertory.hpp b/repertory/librepertory/include/types/repertory.hpp index 4527d2c0..8ed2d10b 100644 --- a/repertory/librepertory/include/types/repertory.hpp +++ b/repertory/librepertory/include/types/repertory.hpp @@ -41,6 +41,7 @@ constexpr const auto default_task_wait_ms{100U}; constexpr const auto default_timeout_ms{60000U}; constexpr const auto max_orphaned_file_retention_days{std::uint16_t(31U)}; constexpr const auto max_ring_buffer_file_size{std::uint16_t(1024U)}; +constexpr const auto max_s3_object_name_length{1024U}; constexpr const auto min_cache_size_bytes{ std::uint64_t(100UL * 1024UL * 1024UL)}; constexpr const auto min_download_timeout_secs{std::uint8_t(5U)}; diff --git a/repertory/librepertory/src/providers/s3/s3_provider.cpp b/repertory/librepertory/src/providers/s3/s3_provider.cpp index 9ffe51af..7df29af1 100644 --- a/repertory/librepertory/src/providers/s3/s3_provider.cpp +++ b/repertory/librepertory/src/providers/s3/s3_provider.cpp @@ -44,7 +44,7 @@ namespace { const std::string &object_name) -> repertory::api_error { request.path = object_name; - if (request.path.substr(1U).size() > 1024U) { + if (request.path.substr(1U).size() > max_s3_object_name_length) { return repertory::api_error::name_too_long; }