mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-26 02:51:07 +01:00
fix(agent): fix agent host validatation and improve file path handling
This commit is contained in:
@@ -126,8 +126,8 @@ func VerifyNewAgent(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
filename := certs.AgentCertsFilename(data.Host)
|
||||
if !strutils.IsValidFilename(filename) {
|
||||
filename, ok := certs.AgentCertsFilepath(data.Host)
|
||||
if !ok {
|
||||
gphttp.ClientError(w, gphttp.ErrInvalidKey("host"))
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user