aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-06-08 11:20:18 +0200
committerGitHub <[email protected]>2022-06-08 11:20:18 +0200
commit5faa4ecce9b59d46f617eeb693c50e118e7ff6fb (patch)
treea9d846c38fb864a14c2c15b961f39e5839be8ea2
parentMerge pull request #123 from EpicGames/de/fix-gc-over-multiple-namespaces (diff)
parentMerge branch 'main' into de/add-log-for-invalid-names (diff)
downloadzen-5faa4ecce9b59d46f617eeb693c50e118e7ff6fb.tar.xz
zen-5faa4ecce9b59d46f617eeb693c50e118e7ff6fb.zip
Merge pull request #125 from EpicGames/de/add-log-for-invalid-names
add warnings on illegal namespace/bucket names
-rw-r--r--CHANGELOG.md5
-rw-r--r--zenserver/cache/structuredcache.cpp5
2 files changed, 9 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3bbe1d001..ea472ddde 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,8 @@
##
-- Fixed expired cache keys overwriting between namespaces when bucket names were the same in multiple namespaces
+-- Add logging of namespace name and bucket name if we get invalid names in requests
+-- Updated README.md with Linux dev prerequisites
+-- asio: added some logging to indicate concurrency
+-- Fixed expired cache keys overwriting between namespaces when bucket names were the same in multiple namespaces
## v0.1.2
- Tweak bundle compression settings to streamline build
diff --git a/zenserver/cache/structuredcache.cpp b/zenserver/cache/structuredcache.cpp
index 79d15a204..4590df48b 100644
--- a/zenserver/cache/structuredcache.cpp
+++ b/zenserver/cache/structuredcache.cpp
@@ -94,15 +94,18 @@ namespace {
{
if (Name.empty())
{
+ ZEN_WARN("Namspace is invalid, empty namespace is not allowed");
return {};
}
if (Name.length() > 64)
{
+ ZEN_WARN("Namspace '{}' is invalid, length exceeds 64 charaters", Name);
return {};
}
if (Name.find_first_not_of(ValidNamespaceNameCharacters) != std::string::npos)
{
+ ZEN_WARN("Namspace '{}' is invalid, invalid characters detected", Name);
return {};
}
return ToLower(Name);
@@ -112,10 +115,12 @@ namespace {
{
if (Name.empty())
{
+ ZEN_WARN("Bucket name is invalid, empty bucket name is not allowed");
return {};
}
if (Name.find_first_not_of(ValidBucketNameCharacters) != std::string::npos)
{
+ ZEN_WARN("Bucket name '{}' is invalid, invalid characters detected", Name);
return {};
}
return ToLower(Name);