Skip to content

Commit

Permalink
fix: Ensure that access from the internet is not possible when login …
Browse files Browse the repository at this point in the history
…information is not filled in (#904)
  • Loading branch information
jeessy2 authored Nov 4, 2023
1 parent 857f2a6 commit 28799ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ func GetConfigCached() (conf Config, err error) {
return *cache.ConfigSingle, err
}

// 未填写登录信息, 确保不能从公网访问
if cache.ConfigSingle.Username == "" && cache.ConfigSingle.Password == "" {
cache.ConfigSingle.NotAllowWanAccess = true
}

// remove err
cache.Err = nil
return *cache.ConfigSingle, err
Expand Down

0 comments on commit 28799ce

Please sign in to comment.