Plugins: Require signing of external back-end plugins (#24075)
* PluginManager: Require signing of external plugins Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com> Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
This commit is contained in:
co-authored by
Marcus Efraimsson
Diana Payton
parent
827f99f0cb
commit
96ffcaa134
+11
-3
@@ -230,9 +230,10 @@ type Cfg struct {
|
||||
ServeFromSubPath bool
|
||||
|
||||
// Paths
|
||||
ProvisioningPath string
|
||||
DataPath string
|
||||
LogsPath string
|
||||
ProvisioningPath string
|
||||
DataPath string
|
||||
LogsPath string
|
||||
BundledPluginsPath string
|
||||
|
||||
// SMTP email settings
|
||||
Smtp SmtpSettings
|
||||
@@ -258,6 +259,7 @@ type Cfg struct {
|
||||
PluginsEnableAlpha bool
|
||||
PluginsAppsSkipVerifyTLS bool
|
||||
PluginSettings PluginSettings
|
||||
PluginsAllowUnsigned []string
|
||||
DisableSanitizeHtml bool
|
||||
EnterpriseLicensePath string
|
||||
|
||||
@@ -636,6 +638,7 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
|
||||
return err
|
||||
}
|
||||
PluginsPath = makeAbsolute(plugins, HomePath)
|
||||
cfg.BundledPluginsPath = makeAbsolute("plugins-bundled", HomePath)
|
||||
provisioning, err := valueAsString(iniFile.Section("paths"), "provisioning", "")
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -988,6 +991,11 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
|
||||
cfg.PluginsEnableAlpha = pluginsSection.Key("enable_alpha").MustBool(false)
|
||||
cfg.PluginsAppsSkipVerifyTLS = pluginsSection.Key("app_tls_skip_verify_insecure").MustBool(false)
|
||||
cfg.PluginSettings = extractPluginSettings(iniFile.Sections())
|
||||
pluginsAllowUnsigned := pluginsSection.Key("allow_loading_unsigned_plugins").MustString("")
|
||||
for _, plug := range strings.Split(pluginsAllowUnsigned, ",") {
|
||||
plug = strings.TrimSpace(plug)
|
||||
cfg.PluginsAllowUnsigned = append(cfg.PluginsAllowUnsigned, plug)
|
||||
}
|
||||
|
||||
// Read and populate feature toggles list
|
||||
featureTogglesSection := iniFile.Section("feature_toggles")
|
||||
|
||||
Reference in New Issue
Block a user