Skip to content

Commit 608ddb1

Browse files
committed
fix: external-ui-name must in local
1 parent d036d98 commit 608ddb1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

config/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"net"
88
"net/netip"
99
"net/url"
10+
"path/filepath"
1011
"strings"
1112
"time"
1213
_ "unsafe"
@@ -759,6 +760,9 @@ func parseController(cfg *RawConfig) (*Controller, error) {
759760
if path := cfg.ExternalUI; path != "" && !C.Path.IsSafePath(path) {
760761
return nil, C.Path.ErrNotSafePath(path)
761762
}
763+
if uiName := cfg.ExternalUIName; uiName != "" && !filepath.IsLocal(uiName) {
764+
return nil, fmt.Errorf("external UI name is not local: %s", uiName)
765+
}
762766
return &Controller{
763767
ExternalController: cfg.ExternalController,
764768
ExternalUI: cfg.ExternalUI,

0 commit comments

Comments
 (0)