mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-20 02:57:12 +03:00
Limit the amount of transformations inside the cache storage
This commit is contained in:
@@ -36,6 +36,12 @@ class UrlDecodeInstantCache : public std::unordered_map<std::string, std::string
|
||||
return instance;
|
||||
}
|
||||
|
||||
void cache(const std::string& value, const std::string& out) {
|
||||
emplace(value, out);
|
||||
if (size() > 100) {
|
||||
erase(begin());
|
||||
}
|
||||
}
|
||||
private:
|
||||
UrlDecodeInstantCache() {};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user