aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/storage/admin/admin.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2026-02-04 13:20:20 +0100
committerGitHub Enterprise <[email protected]>2026-02-04 13:20:20 +0100
commit05108dad394952733838daf442ffdd553a62b727 (patch)
tree8fd64eb6ba26e93da5b1a165750a9f7ad2fc67de /src/zenserver/storage/admin/admin.cpp
parentimplemented chunking for TransmitFile path (#736) (diff)
downloadzen-05108dad394952733838daf442ffdd553a62b727.tar.xz
zen-05108dad394952733838daf442ffdd553a62b727.zip
use matcher over regex (#744)
* replace http router AddPattern with AddMatcher * fix scrub logging
Diffstat (limited to 'src/zenserver/storage/admin/admin.cpp')
-rw-r--r--src/zenserver/storage/admin/admin.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/zenserver/storage/admin/admin.cpp b/src/zenserver/storage/admin/admin.cpp
index cd6002d59..19155e02b 100644
--- a/src/zenserver/storage/admin/admin.cpp
+++ b/src/zenserver/storage/admin/admin.cpp
@@ -121,7 +121,10 @@ HttpAdminService::HttpAdminService(GcScheduler& Scheduler,
},
HttpVerb::kGet);
- m_Router.AddPattern("jobid", "([[:digit:]]+?)");
+ static constexpr AsciiSet ValidNumberCharactersSet{"0123456789"};
+
+ m_Router.AddMatcher("jobid",
+ [](std::string_view Str) -> bool { return !Str.empty() && AsciiSet::HasOnly(Str, ValidNumberCharactersSet); });
m_Router.RegisterRoute(
"jobs",