fix: add protected fields to settings to mitigate high-severity vulne… · 0xJacky/nginx-ui@827e76c · GitHub
Skip to content

Commit 827e76c

Browse files
committed
fix: add protected fields to settings to mitigate high-severity vulnerability
Credits to @jorgectf for the advisories.
1 parent 0a9e23d commit 827e76c

3 files changed

Lines changed: 61 additions & 46 deletions

File tree

api/system/settings.go

Lines changed: 46 additions & 31 deletions

settings/nginx.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ package settings
33
type Nginx struct {
44
AccessLogPath string `json:"access_log_path"`
55
ErrorLogPath string `json:"error_log_path"`
6-
ConfigDir string `json:"config_dir"`
7-
PIDPath string `json:"pid_path"`
8-
TestConfigCmd string `json:"test_config_cmd"`
9-
ReloadCmd string `json:"reload_cmd"`
10-
RestartCmd string `json:"restart_cmd"`
6+
ConfigDir string `json:"config_dir" protected:"true"`
7+
PIDPath string `json:"pid_path" protected:"true"`
8+
TestConfigCmd string `json:"test_config_cmd" protected:"true"`
9+
ReloadCmd string `json:"reload_cmd" protected:"true"`
10+
RestartCmd string `json:"restart_cmd" protected:"true"`
1111
}
1212

1313
var NginxSettings = Nginx{

settings/server.go

Lines changed: 10 additions & 10 deletions

0 commit comments

Comments
 (0)