mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-05-23 18:38:09 +08:00
fix: external-ui-name
must in local
This commit is contained in:
parent
d036d98128
commit
608ddb1b44
@ -7,6 +7,7 @@ import (
|
||||
"net"
|
||||
"net/netip"
|
||||
"net/url"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
_ "unsafe"
|
||||
@ -759,6 +760,9 @@ func parseController(cfg *RawConfig) (*Controller, error) {
|
||||
if path := cfg.ExternalUI; path != "" && !C.Path.IsSafePath(path) {
|
||||
return nil, C.Path.ErrNotSafePath(path)
|
||||
}
|
||||
if uiName := cfg.ExternalUIName; uiName != "" && !filepath.IsLocal(uiName) {
|
||||
return nil, fmt.Errorf("external UI name is not local: %s", uiName)
|
||||
}
|
||||
return &Controller{
|
||||
ExternalController: cfg.ExternalController,
|
||||
ExternalUI: cfg.ExternalUI,
|
||||
|
Loading…
Reference in New Issue
Block a user