[security] fix vulnerability when handling remote file redirects

Also adds the ability for an admin to just completely disable this service if it is not needed on the node.
This commit is contained in:
Dane Everitt
2021-01-09 17:52:27 -08:00
parent 6701aa6dc1
commit 96256ac63e
5 changed files with 47 additions and 5 deletions

View File

@@ -88,11 +88,16 @@ type ApiConfiguration struct {
// SSL configuration for the daemon.
Ssl struct {
Enabled bool `default:"false"`
Enabled bool `json:"enabled" yaml:"enabled"`
CertificateFile string `json:"cert" yaml:"cert"`
KeyFile string `json:"key" yaml:"key"`
}
// Determines if functionality for allowing remote download of files into server directories
// is enabled on this instance. If set to "true" remote downloads will not be possible for
// servers.
DisableRemoteDownload bool `json:"disable_remote_download" yaml:"disable_remote_download"`
// The maximum size for files uploaded through the Panel in bytes.
UploadLimit int `default:"100" json:"upload_limit" yaml:"upload_limit"`
}