ipn/serve: validate service paths in HasPathHandler

Fixes #17839

Signed-off-by: Sachin Iyer <siyer@detail.dev>
This commit is contained in:
Sachin Iyer
2025-11-10 16:52:26 -08:00
committed by Adrian Dewhurst
parent c54d243690
commit 53476ce872
2 changed files with 44 additions and 0 deletions
+14
View File
@@ -238,6 +238,20 @@ func (sc *ServeConfig) HasPathHandler() bool {
}
}
if sc.Services != nil {
for _, serviceConfig := range sc.Services {
if serviceConfig.Web != nil {
for _, webServerConfig := range serviceConfig.Web {
for _, httpHandler := range webServerConfig.Handlers {
if httpHandler.Path != "" {
return true
}
}
}
}
}
}
if sc.Foreground != nil {
for _, fgConfig := range sc.Foreground {
if fgConfig.HasPathHandler() {