fix: add protected fields to settings to mitigate high-severity vulnerability

Credits to @jorgectf for the advisories.
This commit is contained in:
Hintay 2023-12-20 03:44:14 +09:00
parent 0a9e23daf4
commit 827e76c46e
No known key found for this signature in database
GPG key ID: 120FC7FF121F2F2D
3 changed files with 57 additions and 42 deletions

View file

@ -3,11 +3,11 @@ package settings
type Nginx struct {
AccessLogPath string `json:"access_log_path"`
ErrorLogPath string `json:"error_log_path"`
ConfigDir string `json:"config_dir"`
PIDPath string `json:"pid_path"`
TestConfigCmd string `json:"test_config_cmd"`
ReloadCmd string `json:"reload_cmd"`
RestartCmd string `json:"restart_cmd"`
ConfigDir string `json:"config_dir" protected:"true"`
PIDPath string `json:"pid_path" protected:"true"`
TestConfigCmd string `json:"test_config_cmd" protected:"true"`
ReloadCmd string `json:"reload_cmd" protected:"true"`
RestartCmd string `json:"restart_cmd" protected:"true"`
}
var NginxSettings = Nginx{