diff options
Diffstat (limited to 'include/openbmc_dbus_rest.hpp')
-rw-r--r-- | include/openbmc_dbus_rest.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp index 51257642cb..0fbef04921 100644 --- a/include/openbmc_dbus_rest.hpp +++ b/include/openbmc_dbus_rest.hpp @@ -101,7 +101,7 @@ const constexpr char* forbiddenResDesc = inline bool validateFilename(const std::string& filename) { - std::regex validFilename(R"(^[\w\- ]+(\.?[\w\- ]*)$)"); + static std::regex validFilename(R"(^[\w\- ]+(\.?[\w\- ]*)$)"); return std::regex_match(filename, validFilename); } @@ -2562,7 +2562,7 @@ inline void requestRoutes(App& app) // Filename should be in alphanumeric, dot and underscore // Its based on phosphor-debug-collector application // dumpfile format - std::regex dumpFileRegex("[a-zA-Z0-9\\._]+"); + static std::regex dumpFileRegex("[a-zA-Z0-9\\._]+"); if (!std::regex_match(dumpFileName, dumpFileRegex)) { BMCWEB_LOG_ERROR << "Invalid dump filename " << dumpFileName; |